2024-01-16 21:26:57 +01:00
|
|
|
@use 'sass:math';
|
|
|
|
|
|
|
|
// Probably will need to adjust for other langs...
|
2024-04-21 17:54:48 +02:00
|
|
|
$mapping-min-width: 80 * 8;
|
2024-01-19 20:06:06 +01:00
|
|
|
$visual-max-width: $base-modal-max-width - $mapping-min-width - $scrollbar-width;
|
2024-01-16 21:26:57 +01:00
|
|
|
|
|
|
|
.input-config {
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__horizontal-split {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
flex-direction: row;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__mappings {
|
|
|
|
display: block;
|
|
|
|
flex: 1 1 auto;
|
|
|
|
min-width: space($mapping-min-width);
|
2024-04-21 17:54:48 +02:00
|
|
|
height: 100%;
|
2024-01-16 21:26:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__mappings-scroll {
|
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
|
2024-01-18 21:49:29 +01:00
|
|
|
.input-config__mappings-wrapper {
|
|
|
|
padding: space(8);
|
2024-01-16 21:26:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual-wrapper {
|
|
|
|
display: block;
|
2024-04-21 17:54:48 +02:00
|
|
|
flex: 1 1 100%;
|
2024-01-16 21:26:57 +01:00
|
|
|
width: auto;
|
|
|
|
max-width: space($visual-max-width);
|
2024-04-21 17:54:48 +02:00
|
|
|
height: auto;
|
2024-01-19 20:06:06 +01:00
|
|
|
max-height: space(math.div($visual-max-width, 4) * 3);
|
2024-01-16 21:26:57 +01:00
|
|
|
margin: auto 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual-aspect {
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
2024-04-21 17:54:48 +02:00
|
|
|
margin: auto 0;
|
2024-01-16 21:26:57 +01:00
|
|
|
padding-bottom: 75%;
|
2024-01-22 17:43:21 +01:00
|
|
|
background-color: $color-bg-shadow;
|
2024-01-16 21:26:57 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual {
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
2024-01-29 16:42:23 +01:00
|
|
|
top: space(16);
|
|
|
|
right: space(16);
|
|
|
|
bottom: space(16);
|
|
|
|
left: space(16);
|
2024-04-21 17:54:48 +02:00
|
|
|
flex-direction: column;
|
2024-01-29 16:42:23 +01:00
|
|
|
border-radius: space(108);
|
|
|
|
background-color: $color-white-a5;
|
2024-01-16 21:26:57 +01:00
|
|
|
}
|
2024-01-17 16:54:13 +01:00
|
|
|
|
2024-01-22 17:43:21 +01:00
|
|
|
.input-config__visual-half {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
flex: 1 1 100%;
|
2024-04-21 17:54:48 +02:00
|
|
|
flex-direction: row;
|
2024-01-22 17:43:21 +01:00
|
|
|
padding: 6%;
|
|
|
|
|
|
|
|
&--bottom {
|
|
|
|
align-items: flex-end;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual-quarter-left {
|
|
|
|
display: flex;
|
2024-02-24 19:51:58 +01:00
|
|
|
flex: 1 1 50%;
|
2024-01-22 17:43:21 +01:00
|
|
|
align-items: flex-start;
|
|
|
|
justify-content: flex-start;
|
2024-04-21 17:54:48 +02:00
|
|
|
width: auto;
|
2024-01-22 17:43:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual-quarter-right {
|
|
|
|
display: flex;
|
|
|
|
flex: 1 1 100%;
|
|
|
|
align-items: flex-start;
|
|
|
|
justify-content: flex-end;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__visual-stick-wrapper {
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
2024-04-21 17:54:48 +02:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2024-01-22 17:43:21 +01:00
|
|
|
}
|
|
|
|
|
2024-01-21 20:07:37 +01:00
|
|
|
.input-viz {
|
2024-02-24 19:51:58 +01:00
|
|
|
@include trans-colors-opa;
|
2024-01-22 17:43:21 +01:00
|
|
|
display: flex;
|
2024-04-21 17:54:48 +02:00
|
|
|
position: relative;
|
2024-01-22 17:43:21 +01:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
2024-02-24 19:51:58 +01:00
|
|
|
> svg:not(.input-viz__dpad-arrow) {
|
2024-01-22 17:43:21 +01:00
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2024-04-21 17:54:48 +02:00
|
|
|
left: 0;
|
2024-01-22 17:43:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&__mappings div {
|
|
|
|
@extend %prompt-font-sm;
|
|
|
|
}
|
2024-01-21 20:07:37 +01:00
|
|
|
}
|
2024-01-17 16:54:13 +01:00
|
|
|
|
2024-04-21 17:54:48 +02:00
|
|
|
$all-inputs: A,
|
2024-01-17 16:54:13 +01:00
|
|
|
B,
|
|
|
|
Z,
|
|
|
|
START,
|
|
|
|
DPAD_UP,
|
|
|
|
DPAD_DOWN,
|
|
|
|
DPAD_LEFT,
|
|
|
|
DPAD_RIGHT,
|
|
|
|
L,
|
|
|
|
R,
|
|
|
|
C_UP,
|
|
|
|
C_DOWN,
|
|
|
|
C_LEFT,
|
|
|
|
C_RIGHT,
|
|
|
|
X_AXIS_NEG,
|
|
|
|
X_AXIS_POS,
|
|
|
|
Y_AXIS_NEG,
|
|
|
|
Y_AXIS_POS;
|
|
|
|
|
|
|
|
// Show default state while no inputs are active
|
2024-01-21 20:07:37 +01:00
|
|
|
[cur-input="NONE"] .input-viz[visual-input] {
|
2024-01-17 16:54:13 +01:00
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
@each $inp in $all-inputs {
|
2024-02-24 19:51:58 +01:00
|
|
|
.input-viz[visual-input~="#{$inp}"] {
|
|
|
|
opacity: 0.25;
|
2024-01-17 16:54:13 +01:00
|
|
|
|
|
|
|
[cur-input="#{$inp}"] & {
|
|
|
|
opacity: 1.0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-01-21 20:07:37 +01:00
|
|
|
|
|
|
|
@mixin set-sizes($sz) {
|
|
|
|
width: space($sz);
|
|
|
|
height: space($sz);
|
|
|
|
|
2024-02-24 19:51:58 +01:00
|
|
|
> svg {
|
2024-01-21 20:07:37 +01:00
|
|
|
width: space($sz);
|
|
|
|
height: space($sz);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz__button {
|
|
|
|
@include set-color($color-text);
|
|
|
|
|
|
|
|
&--sm {
|
|
|
|
@include set-sizes(64);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--md {
|
|
|
|
@include set-sizes(76);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--lg {
|
|
|
|
@include set-sizes(84);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--C {
|
|
|
|
@include set-svgs-color($color-warning);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--A {
|
|
|
|
@include set-svgs-color($color-a);
|
2024-03-03 18:33:49 +01:00
|
|
|
margin-top: auto;
|
2024-01-21 20:07:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&--B {
|
|
|
|
@include set-svgs-color($color-success);
|
|
|
|
}
|
2024-03-03 18:33:49 +01:00
|
|
|
|
|
|
|
&--Start {
|
|
|
|
@include set-svgs-color($color-error);
|
|
|
|
}
|
2024-01-21 20:07:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz__Z {
|
|
|
|
@include set-svgs-color($color-warning);
|
|
|
|
@include set-sizes(136);
|
|
|
|
}
|
2024-01-22 17:43:21 +01:00
|
|
|
|
2024-02-24 19:51:58 +01:00
|
|
|
$dpad-size: 192;
|
2024-04-21 17:54:48 +02:00
|
|
|
|
2024-02-24 19:51:58 +01:00
|
|
|
.input-viz.input-viz__dpad {
|
|
|
|
@include set-svgs-color($color-text);
|
|
|
|
@include set-sizes($dpad-size);
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
2024-03-03 21:06:13 +01:00
|
|
|
$stick-size: 200;
|
2024-04-21 17:54:48 +02:00
|
|
|
|
2024-03-03 21:06:13 +01:00
|
|
|
.input-config__visual-stick {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
width: space($stick-size);
|
|
|
|
height: space($stick-size);
|
|
|
|
border-radius: space(math.div($stick-size, 2));
|
|
|
|
background-color: $color-white-a5;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz__dpad-split,
|
|
|
|
.input-viz__stick-split {
|
2024-02-24 19:51:58 +01:00
|
|
|
@include inset-block(0);
|
|
|
|
display: flex;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
&--vertical {
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--horizontal {
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
> div {
|
|
|
|
display: flex;
|
|
|
|
flex: 1 1 100%;
|
2024-04-21 17:54:48 +02:00
|
|
|
flex-direction: row;
|
2024-02-24 19:51:58 +01:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-03 21:06:13 +01:00
|
|
|
.input-viz__dpad-split > div {
|
|
|
|
width: space(math.div($dpad-size, 3));
|
|
|
|
height: space(math.div($dpad-size, 3));
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz__stick-split > div {
|
|
|
|
width: space(math.div($stick-size, 3));
|
|
|
|
height: space(math.div($stick-size, 3));
|
|
|
|
}
|
|
|
|
|
2024-02-24 19:51:58 +01:00
|
|
|
.input-viz__dpad-arrow {
|
2024-04-21 17:54:48 +02:00
|
|
|
$edge-dist: space(4);
|
2024-02-24 19:51:58 +01:00
|
|
|
position: absolute;
|
|
|
|
width: space(60);
|
|
|
|
height: space(60);
|
|
|
|
|
|
|
|
&--up {
|
|
|
|
top: $edge-dist;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--down {
|
|
|
|
bottom: $edge-dist;
|
|
|
|
margin: 0 auto;
|
|
|
|
transform: rotate(180deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--left {
|
|
|
|
left: $edge-dist;
|
|
|
|
margin: auto 0;
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
&--right {
|
|
|
|
right: $edge-dist;
|
|
|
|
margin: auto 0;
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-01-22 17:43:21 +01:00
|
|
|
.input-viz__R {
|
|
|
|
@include set-svgs-color($color-white);
|
|
|
|
@include set-sizes(96);
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz__L {
|
|
|
|
@include set-svgs-color($color-secondary);
|
|
|
|
@include set-sizes(136);
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-config__c-buttons {
|
|
|
|
position: relative;
|
2024-04-21 17:54:48 +02:00
|
|
|
width: space(76 + 76 + 56);
|
|
|
|
height: space(76 + 56);
|
2024-01-22 17:43:21 +01:00
|
|
|
|
|
|
|
&-lr, &-du {
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2024-04-21 17:54:48 +02:00
|
|
|
left: 0;
|
2024-01-22 17:43:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
&-lr {
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: flex-start;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-du {
|
|
|
|
flex-direction: column-reverse;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.input-viz {
|
|
|
|
&[visual-input="C_UP"] {
|
|
|
|
margin-top: space(-32);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-03-03 18:33:49 +01:00
|
|
|
|
|
|
|
.input-config__main-buttons {
|
|
|
|
display: flex;
|
2024-04-21 17:54:48 +02:00
|
|
|
position: relative;
|
2024-03-03 18:33:49 +01:00
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: space(268);
|
|
|
|
height: space(128);
|
|
|
|
margin-right: space(10);
|
|
|
|
}
|