mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
GUI: Add Sreen Settings shortcut to Control Center brightness click (#487)
* Enhance momentum app to support command line arguments for scene navigation and add RGB settings event to desktop lock menu. * Rename to ScreenSettings * Format * Update changelog * ugh * ugh * Update changelog again --------- Co-authored-by: tototo31 <Recipient7966@proton.me> Co-authored-by: WillyJL <me@willyjl.dev>
This commit is contained in:
@@ -114,7 +114,9 @@
|
||||
- Input Settings: Add Vibro Trigger option (#429 by @956MB)
|
||||
- Archive: Support opening and favoriting Picopass files (by @WillyJL)
|
||||
- Bad KB: Colemak keyboard layout (#466 by @Ashe-Sterling)
|
||||
- OFW: GUI: Add date/time input module (by @aaronjamt)
|
||||
- GUI:
|
||||
- GUI: Add Sreen Settings shortcut to Control Center brightness click (#487 by @tototo31)
|
||||
- OFW: Add date/time input module (by @aaronjamt)
|
||||
|
||||
### Updated:
|
||||
- Apps:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "momentum_app.h"
|
||||
#include <string.h>
|
||||
|
||||
static bool momentum_app_custom_event_callback(void* context, uint32_t event) {
|
||||
furi_assert(context);
|
||||
@@ -483,9 +484,17 @@ void momentum_app_free(MomentumApp* app) {
|
||||
}
|
||||
|
||||
extern int32_t momentum_app(void* p) {
|
||||
UNUSED(p);
|
||||
MomentumApp* app = momentum_app_alloc();
|
||||
scene_manager_next_scene(app->scene_manager, MomentumAppSceneStart);
|
||||
|
||||
// Check for command line arguments to navigate to specific scenes
|
||||
uint32_t first_scene = MomentumAppSceneStart;
|
||||
if(p && strlen(p)) {
|
||||
if(!strcmp(p, "MiscScreen")) {
|
||||
first_scene = MomentumAppSceneMiscScreen;
|
||||
}
|
||||
}
|
||||
|
||||
scene_manager_next_scene(app->scene_manager, first_scene);
|
||||
view_dispatcher_run(app->view_dispatcher);
|
||||
momentum_app_free(app);
|
||||
return 0;
|
||||
|
||||
@@ -121,6 +121,11 @@ bool desktop_scene_lock_menu_on_event(void* context, SceneManagerEvent event) {
|
||||
loader_start_detached_with_gui_error(desktop->loader, "Momentum", NULL);
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopLockMenuEventScreenSettings:
|
||||
desktop_scene_lock_menu_save_settings(desktop);
|
||||
loader_start_detached_with_gui_error(desktop->loader, "Momentum", "MiscScreen");
|
||||
consumed = true;
|
||||
break;
|
||||
case DesktopLockMenuEventStealthModeOn:
|
||||
desktop_set_stealth_mode_state(desktop, true);
|
||||
break;
|
||||
|
||||
@@ -65,4 +65,5 @@ typedef enum {
|
||||
DesktopLockMenuEventLockKeypad,
|
||||
DesktopLockMenuEventLockPinOff,
|
||||
DesktopLockMenuEventMomentum,
|
||||
DesktopLockMenuEventScreenSettings,
|
||||
} DesktopEvent;
|
||||
|
||||
@@ -307,6 +307,9 @@ bool desktop_lock_menu_input_callback(InputEvent* event, void* context) {
|
||||
case DesktopLockMenuIndexMomentum:
|
||||
desktop_event = DesktopLockMenuEventMomentum;
|
||||
break;
|
||||
case DesktopLockMenuIndexBrightness:
|
||||
desktop_event = DesktopLockMenuEventScreenSettings;
|
||||
break;
|
||||
case DesktopLockMenuIndexVolume:
|
||||
desktop_event = stealth_mode ? DesktopLockMenuEventStealthModeOff :
|
||||
DesktopLockMenuEventStealthModeOn;
|
||||
|
||||
Reference in New Issue
Block a user