mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 14:48:35 -07:00
ability to switch animations only when debug -> on
This commit is contained in:
@@ -74,24 +74,31 @@ bool desktop_main_input_callback(InputEvent* event, void* context) {
|
|||||||
} else {
|
} else {
|
||||||
if(event->type == InputTypeShort) {
|
if(event->type == InputTypeShort) {
|
||||||
if(event->key == InputKeyOk) {
|
if(event->key == InputKeyOk) {
|
||||||
main_view->callback(DesktopMainEventOpenGameMenu, main_view->context); // OPENS Snake
|
main_view->callback(
|
||||||
|
DesktopMainEventOpenGameMenu, main_view->context); // OPENS Snake
|
||||||
} else if(event->key == InputKeyUp) {
|
} else if(event->key == InputKeyUp) {
|
||||||
main_view->callback(DesktopMainEventOpenLockMenu, main_view->context);
|
main_view->callback(DesktopMainEventOpenLockMenu, main_view->context);
|
||||||
} else if(event->key == InputKeyDown) {
|
} else if(event->key == InputKeyDown) {
|
||||||
main_view->callback(DesktopMainEventOpenTetris, main_view->context); // OPENS Tetris
|
main_view->callback(
|
||||||
|
DesktopMainEventOpenTetris, main_view->context); // OPENS Tetris
|
||||||
} else if(event->key == InputKeyLeft) {
|
} else if(event->key == InputKeyLeft) {
|
||||||
main_view->callback(DesktopMainEventOpenArkanoid, main_view->context); // OPENS Arkanoid
|
main_view->callback(
|
||||||
|
DesktopMainEventOpenArkanoid, main_view->context); // OPENS Arkanoid
|
||||||
}
|
}
|
||||||
// Right key is handled by animation manager
|
// Right key is handled by animation manager
|
||||||
} else if(event->type == InputTypeLong) {
|
} else if(event->type == InputTypeLong) {
|
||||||
if(event->key == InputKeyOk) {
|
if(event->key == InputKeyOk) {
|
||||||
|
if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagDebug)) {
|
||||||
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
||||||
|
}
|
||||||
} else if(event->key == InputKeyUp) {
|
} else if(event->key == InputKeyUp) {
|
||||||
main_view->callback(DesktopMainEventOpenDOOM, main_view->context); // OPENS DOOM
|
main_view->callback(DesktopMainEventOpenDOOM, main_view->context); // OPENS DOOM
|
||||||
} else if(event->key == InputKeyDown) {
|
} else if(event->key == InputKeyDown) {
|
||||||
main_view->callback(DesktopMainEventOpenZombiez, main_view->context); // OPENS Zombiez
|
main_view->callback(
|
||||||
|
DesktopMainEventOpenZombiez, main_view->context); // OPENS Zombiez
|
||||||
} else if(event->key == InputKeyLeft) {
|
} else if(event->key == InputKeyLeft) {
|
||||||
main_view->callback(DesktopMainEventOpenHeap, main_view->context); // OPENS Heap Defence
|
main_view->callback(
|
||||||
|
DesktopMainEventOpenHeap, main_view->context); // OPENS Heap Defence
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user