Change style and order of the patterns buttons

This commit is contained in:
Eugene Serb 2022-06-17 12:42:19 +03:00
parent dc19e312a8
commit 5b65f5b97a
2 changed files with 47 additions and 45 deletions

View File

@ -420,20 +420,22 @@ legend {
}
.pattern-item {
width: 128px;
height: 128px;
width: 300px;
height: 64px;
padding: 16px;
border-radius: 8px;
background: var(--color-pattern-button);
display: flex;
flex-direction: column;
justify-content: flex-end;
flex-direction: row;
justify-content: flex-start;
gap: 32px;
align-items: center;
text-align: center;
overflow: hidden;
}
.pattern-item__icon{
font-size: 64px;
font-size: 32px;
}
.pattern-item__name {

View File

@ -5,46 +5,6 @@
'use strict';
const __PATTERNS = [
/* Constant, 0s, 1s */
{
name: 'Constant Weak',
type: 'Simple',
icon: '😏',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 1.0,
strongMagnitude: 0.0,
},
],
},
{
name: 'Constant Strong',
type: 'Simple',
icon: '🤩',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 0.0,
strongMagnitude: 1.0,
},
],
},
{
name: 'Constant Max',
type: 'Simple',
icon: '😍',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 1.0,
strongMagnitude: 1.0,
},
],
},
/* Dotted, 0.1s, 0.1s */
{
name: 'Dotted Weak',
@ -165,6 +125,46 @@ const __PATTERNS = [
},
],
},
/* Constant, 0s, 1s */
{
name: 'Constant Weak',
type: 'Simple',
icon: '😏',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 1.0,
strongMagnitude: 0.0,
},
],
},
{
name: 'Constant Strong',
type: 'Simple',
icon: '🤩',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 0.0,
strongMagnitude: 1.0,
},
],
},
{
name: 'Constant Max',
type: 'Simple',
icon: '😍',
pattern: [
{
startDelay: 0,
duration: 1000,
weakMagnitude: 1.0,
strongMagnitude: 1.0,
},
],
},
];
class Gamepad {