Restrict random buttons, Change button press highlight
This commit is contained in:
parent
58f102af60
commit
cc55cbbe6b
@ -207,13 +207,14 @@ async def _(get_input: InputGetter, set_output: OutputSetter):
|
|||||||
|
|
||||||
set_output(output)
|
set_output(output)
|
||||||
|
|
||||||
|
random_buttons : list[Button]= ["up", "down", "left", "right", "a", "b"];
|
||||||
|
|
||||||
@arbiter.mode("random", allow_multitouch=False, min_time=20, max_time=90)
|
@arbiter.mode("random", allow_multitouch=False, min_time=30, max_time=90)
|
||||||
async def _(get_input: InputGetter, set_output: OutputSetter):
|
async def _(get_input: InputGetter, set_output: OutputSetter):
|
||||||
while True:
|
while True:
|
||||||
await asyncio.sleep(settings.democracy_vote_cycle)
|
await asyncio.sleep(settings.democracy_vote_cycle)
|
||||||
|
|
||||||
the_choice = random.choice([button for button in Button])
|
the_choice = random.choice([button for button in random_buttons])
|
||||||
|
|
||||||
if not the_choice:
|
if not the_choice:
|
||||||
set_output(EMPTY_INPUT)
|
set_output(EMPTY_INPUT)
|
||||||
|
@ -27,10 +27,6 @@
|
|||||||
--button-color: lightgrey;
|
--button-color: lightgrey;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: black;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
line-height: var(--button-height);
|
line-height: var(--button-height);
|
||||||
height: var(--button-height);
|
height: var(--button-height);
|
||||||
@ -42,7 +38,7 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.button.pressed {
|
.button.pressed {
|
||||||
filter: drop-shadow(2px 2px 6px black);
|
filter: drop-shadow(2px 2px 6px white);
|
||||||
}
|
}
|
||||||
.button-a, .button-b {
|
.button-a, .button-b {
|
||||||
--button-height: 50px;
|
--button-height: 50px;
|
||||||
@ -157,5 +153,7 @@ body {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
.client {
|
.client {
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user