mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 17:38:36 -07:00
Add Dummy Mode Game Shortcuts to Scene & View
This commit is contained in:
@@ -195,6 +195,46 @@ bool desktop_scene_main_on_event(void* context, SceneManagerEvent event) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case DesktopMainEventOpenTetris: {
|
||||||
|
LoaderStatus status = loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("/apps/Games/Tetris.fap"));
|
||||||
|
if(status != LoaderStatusOk) {
|
||||||
|
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DesktopMainEventOpenArkanoid: {
|
||||||
|
LoaderStatus status = loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("/apps/Games/Arkanoid.fap"));
|
||||||
|
if(status != LoaderStatusOk) {
|
||||||
|
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DesktopMainEventOpenDOOM: {
|
||||||
|
LoaderStatus status = loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("/apps/Games/DOOM.fap"));
|
||||||
|
if(status != LoaderStatusOk) {
|
||||||
|
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DesktopMainEventOpenZombiez: {
|
||||||
|
LoaderStatus status = loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("/apps/Games/Zombiez.fap"));
|
||||||
|
if(status != LoaderStatusOk) {
|
||||||
|
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case DesktopMainEventOpenHeap: {
|
||||||
|
LoaderStatus status = loader_start(
|
||||||
|
desktop->loader, FAP_LOADER_APP_NAME, EXT_PATH("/apps/Games/heap_defence.fap"));
|
||||||
|
if(status != LoaderStatusOk) {
|
||||||
|
FURI_LOG_E(TAG, "loader_start failed: %d", status);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case DesktopLockedEventUpdate:
|
case DesktopLockedEventUpdate:
|
||||||
desktop_view_locked_update(desktop->locked_view);
|
desktop_view_locked_update(desktop->locked_view);
|
||||||
consumed = true;
|
consumed = true;
|
||||||
|
|||||||
@@ -74,15 +74,25 @@ 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);
|
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(DesktopMainEventOpenPassport, main_view->context);
|
main_view->callback(DesktopMainEventOpenTetris, main_view->context); // OPENS Tetris
|
||||||
} else if(event->key == InputKeyLeft) {
|
} else if(event->key == InputKeyLeft) {
|
||||||
main_view->callback(DesktopMainEventOpenPassport, main_view->context);
|
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) {
|
||||||
|
if(event->key == InputKeyOk) {
|
||||||
|
main_view->callback(DesktopAnimationEventNewIdleAnimation, main_view->context);
|
||||||
|
} else if(event->key == InputKeyUp) {
|
||||||
|
main_view->callback(DesktopMainEventOpenDOOM, main_view->context); // OPENS DOOM
|
||||||
|
} else if(event->key == InputKeyDown) {
|
||||||
|
main_view->callback(DesktopMainEventOpenZombiez, main_view->context); // OPENS Zombiez
|
||||||
|
} else if(event->key == InputKeyLeft) {
|
||||||
|
main_view->callback(DesktopMainEventOpenHeap, main_view->context); // OPENS Heap Defence
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user