mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-01 22:08:55 -07:00
Main Menu: Adds info toggles to PS4/Vertical/MNTM
- Adds more info to a few of the menu styles that can fit it, as well as the option to toggle any/all of it on or off. - Also fixes a potential overlap in the MTNM style in the rare case a device name is max length.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "../momentum_app.h"
|
||||
|
||||
#define ONLY_MSG "Only in PS4,\nVertical and\nMNTM styles!"
|
||||
#define CANT_MSG "Can't show in\nthe selected\nstyle!"
|
||||
|
||||
enum VarItemListIndex {
|
||||
VarItemListIndexMenuStyle,
|
||||
VarItemListIndexResetMenu,
|
||||
@@ -30,6 +33,51 @@ static void momentum_app_scene_interface_mainmenu_menu_style_changed(VariableIte
|
||||
variable_item_set_current_value_text(item, menu_style_names[index]);
|
||||
momentum_settings.menu_style = index;
|
||||
app->save_settings = true;
|
||||
|
||||
// Quick and dirty work around to refresh the list to update the locked items,
|
||||
// and isn't noticeable at all.
|
||||
scene_manager_previous_scene(app->scene_manager);
|
||||
scene_manager_next_scene(app->scene_manager, MomentumAppSceneInterfaceMainmenu);
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_name_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.menu_name = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_level_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.menu_level = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_time_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.menu_time = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_battery_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.menu_battery = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_otg_changed(VariableItem* item) {
|
||||
MomentumApp* app = variable_item_get_context(item);
|
||||
bool value = variable_item_get_current_value_index(item);
|
||||
variable_item_set_current_value_text(item, value ? "ON" : "OFF");
|
||||
momentum_settings.menu_otg = value;
|
||||
app->save_settings = true;
|
||||
}
|
||||
|
||||
static void momentum_app_scene_interface_mainmenu_app_changed(VariableItem* item) {
|
||||
@@ -69,6 +117,7 @@ void momentum_app_scene_interface_mainmenu_on_enter(void* context) {
|
||||
MomentumApp* app = context;
|
||||
VariableItemList* var_item_list = app->var_item_list;
|
||||
VariableItem* item;
|
||||
MenuStyle style = momentum_settings.menu_style;
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list,
|
||||
@@ -107,6 +156,45 @@ void momentum_app_scene_interface_mainmenu_on_enter(void* context) {
|
||||
|
||||
variable_item_list_add(var_item_list, "Remove App", 0, NULL, app);
|
||||
|
||||
bool lock_all = style != MenuStylePs4 && style != MenuStyleVertical && style != MenuStyleMNTM;
|
||||
bool lock_vertical = style == MenuStyleVertical;
|
||||
bool lock_ps4_vertical = style == MenuStylePs4 || style == MenuStyleVertical;
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list, "Show Name", 2, momentum_app_scene_interface_mainmenu_name_changed, app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.menu_name);
|
||||
variable_item_set_current_value_text(item, momentum_settings.menu_name ? "ON" : "OFF");
|
||||
variable_item_set_locked(item, lock_all || lock_vertical, lock_vertical ? CANT_MSG : ONLY_MSG);
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list, "Show Level", 2, momentum_app_scene_interface_mainmenu_level_changed, app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.menu_level);
|
||||
variable_item_set_current_value_text(item, momentum_settings.menu_level ? "ON" : "OFF");
|
||||
variable_item_set_locked(item, lock_all || lock_vertical, lock_vertical ? CANT_MSG : ONLY_MSG);
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list, "Show Time", 2, momentum_app_scene_interface_mainmenu_time_changed, app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.menu_time);
|
||||
variable_item_set_current_value_text(item, momentum_settings.menu_time ? "ON" : "OFF");
|
||||
variable_item_set_locked(item, lock_all, ONLY_MSG);
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list,
|
||||
"Show Battery",
|
||||
2,
|
||||
momentum_app_scene_interface_mainmenu_battery_changed,
|
||||
app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.menu_battery);
|
||||
variable_item_set_current_value_text(item, momentum_settings.menu_battery ? "ON" : "OFF");
|
||||
variable_item_set_locked(item, lock_all, ONLY_MSG);
|
||||
|
||||
item = variable_item_list_add(
|
||||
var_item_list, "Show OTG (5v)", 2, momentum_app_scene_interface_mainmenu_otg_changed, app);
|
||||
variable_item_set_current_value_index(item, momentum_settings.menu_otg);
|
||||
variable_item_set_current_value_text(item, momentum_settings.menu_otg ? "ON" : "OFF");
|
||||
variable_item_set_locked(
|
||||
item, lock_all || lock_ps4_vertical, lock_ps4_vertical ? CANT_MSG : ONLY_MSG);
|
||||
|
||||
variable_item_list_set_enter_callback(
|
||||
var_item_list, momentum_app_scene_interface_mainmenu_var_item_list_callback, app);
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ static void desktop_clock_draw_callback(Canvas* canvas, void* context) {
|
||||
hour -= 12;
|
||||
}
|
||||
if(hour == 0) {
|
||||
hour = (desktop->clock.midnight_format == LocaleMidnightFormatZero) ? 0 : 12;
|
||||
hour = (desktop->clock.midnight_format == LocaleMidnightFormat00) ? 0 : 12;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void desktop_view_locked_draw_lockscreen(Canvas* canvas, void* m) {
|
||||
pm = datetime.hour > 12;
|
||||
snprintf(meridian_str, 3, datetime.hour >= 12 ? "PM" : "AM");
|
||||
if(datetime.hour == 0) {
|
||||
datetime.hour = (model->midnight_format == LocaleMidnightFormatZero) ? 0 : 12;
|
||||
datetime.hour = (model->midnight_format == LocaleMidnightFormat00) ? 0 : 12;
|
||||
}
|
||||
}
|
||||
snprintf(time_str, 9, "%.2d:%.2d", pm ? datetime.hour - 12 : datetime.hour, datetime.minute);
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
|
||||
struct Menu {
|
||||
View* view;
|
||||
|
||||
FuriTimer* scroll_timer;
|
||||
FuriTimer* info_timer;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -35,9 +35,10 @@ ARRAY_DEF(MenuItemArray, MenuItem, M_POD_OPLIST);
|
||||
typedef struct {
|
||||
MenuItemArray_t items;
|
||||
size_t position;
|
||||
|
||||
size_t scroll_counter;
|
||||
size_t vertical_offset;
|
||||
uint8_t battery_pct;
|
||||
DateTime current_time;
|
||||
} MenuModel;
|
||||
|
||||
static void menu_process_up(Menu* menu);
|
||||
@@ -46,6 +47,21 @@ static void menu_process_left(Menu* menu);
|
||||
static void menu_process_right(Menu* menu);
|
||||
static void menu_process_ok(Menu* menu);
|
||||
|
||||
static void menu_get_time_str(DateTime* dt, char* clk, size_t size) {
|
||||
uint8_t hour = dt->hour;
|
||||
uint8_t min = dt->minute;
|
||||
bool format_12 = locale_get_time_format() == LocaleTimeFormat12h;
|
||||
if(format_12) {
|
||||
if(hour > 12) {
|
||||
hour -= 12;
|
||||
}
|
||||
if(hour == 0) {
|
||||
hour = (locale_get_midnight_format() == LocaleMidnightFormat12 && format_12) ? 12 : 0;
|
||||
}
|
||||
}
|
||||
snprintf(clk, size, "%02u:%02u", hour, min);
|
||||
}
|
||||
|
||||
static void menu_get_name(MenuItem* item, FuriString* name, bool shorter) {
|
||||
furi_string_set(name, item->label);
|
||||
if(shorter) {
|
||||
@@ -210,13 +226,52 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
|
||||
}
|
||||
case MenuStylePs4: {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
canvas_draw_str_aligned(
|
||||
canvas, 1, 1, AlignLeft, AlignTop, furi_hal_version_get_name_ptr());
|
||||
char str[10];
|
||||
uint8_t name_w = 1;
|
||||
if(momentum_settings.menu_name) {
|
||||
const char* dev_name = furi_hal_version_get_name_ptr();
|
||||
name_w = canvas_string_width(canvas, dev_name);
|
||||
canvas_draw_str_aligned(canvas, 1, 1, AlignLeft, AlignTop, dev_name);
|
||||
name_w += 6;
|
||||
}
|
||||
|
||||
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
||||
snprintf(str, 10, "Level %i", dolphin_get_level(dolphin->state->data.icounter));
|
||||
uint8_t lvl = dolphin_get_level(dolphin->state->data.icounter);
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
canvas_draw_str_aligned(canvas, 127, 1, AlignRight, AlignTop, str);
|
||||
size_t lvl_x = 127;
|
||||
bool show_time = momentum_settings.menu_time;
|
||||
bool show_battery = momentum_settings.menu_battery;
|
||||
|
||||
if(show_battery || show_time) {
|
||||
size_t time_x = 127;
|
||||
lvl_x = name_w;
|
||||
if(show_battery) {
|
||||
uint8_t battery_percent = model->battery_pct;
|
||||
char bat_display[9];
|
||||
snprintf(bat_display, sizeof(bat_display), "%d%%", battery_percent);
|
||||
uint8_t bat_w = canvas_string_width(canvas, bat_display);
|
||||
canvas_draw_str_aligned(canvas, 127, 1, AlignRight, AlignTop, bat_display);
|
||||
time_x = 127 - bat_w - 5;
|
||||
}
|
||||
|
||||
if(show_time) {
|
||||
char clk[9];
|
||||
menu_get_time_str(&model->current_time, clk, sizeof(clk));
|
||||
canvas_draw_str_aligned(canvas, time_x, 1, AlignRight, AlignTop, clk);
|
||||
}
|
||||
}
|
||||
|
||||
if(momentum_settings.menu_level) {
|
||||
char lvl_str[10];
|
||||
snprintf(lvl_str, 10, "%s%i", show_time && show_battery ? "Lv" : "Level ", lvl);
|
||||
canvas_draw_str_aligned(
|
||||
canvas,
|
||||
lvl_x,
|
||||
1,
|
||||
show_time || show_battery ? AlignLeft : AlignRight,
|
||||
AlignTop,
|
||||
lvl_str);
|
||||
}
|
||||
|
||||
for(int8_t i = -1; i <= 4; i++) {
|
||||
shift_position = position + i;
|
||||
if(shift_position >= items_count) continue;
|
||||
@@ -258,22 +313,39 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
|
||||
}
|
||||
case MenuStyleVertical: {
|
||||
canvas_set_orientation(canvas, CanvasOrientationVertical);
|
||||
bool time_or_battery = momentum_settings.menu_time || momentum_settings.menu_battery;
|
||||
uint8_t cells = time_or_battery ? 7 : 8;
|
||||
shift_position = model->vertical_offset;
|
||||
if(shift_position >= position || shift_position + 7 <= position) {
|
||||
if(shift_position >= position || shift_position + cells <= position) {
|
||||
// In case vertical_offset is out of sync due to changing menu styles
|
||||
shift_position = CLAMP(
|
||||
MAX((int32_t)position - 4, 0),
|
||||
MAX((int32_t)MenuItemArray_size(model->items) - 8, 0),
|
||||
MAX((uint8_t)position - 4, 0),
|
||||
MAX((uint8_t)MenuItemArray_size(model->items) - cells, 0),
|
||||
0);
|
||||
model->vertical_offset = shift_position;
|
||||
}
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
size_t item_i;
|
||||
size_t y_off;
|
||||
for(size_t i = 0; i < 8; i++) {
|
||||
size_t ext_off = 0;
|
||||
if(time_or_battery) {
|
||||
ext_off = 16;
|
||||
if(momentum_settings.menu_battery) {
|
||||
uint8_t battery_percent = model->battery_pct;
|
||||
char bat_display[9];
|
||||
snprintf(bat_display, sizeof(bat_display), "%d%%", battery_percent);
|
||||
canvas_draw_str_aligned(canvas, 63, 1, AlignRight, AlignTop, bat_display);
|
||||
}
|
||||
if(momentum_settings.menu_time) {
|
||||
char clk[9];
|
||||
menu_get_time_str(&model->current_time, clk, sizeof(clk));
|
||||
canvas_draw_str_aligned(canvas, 1, 1, AlignLeft, AlignTop, clk);
|
||||
}
|
||||
}
|
||||
for(size_t i = 0; i < cells; i++) {
|
||||
item_i = shift_position + i;
|
||||
if(item_i >= items_count) continue;
|
||||
y_off = 16 * i;
|
||||
y_off = 16 * i + ext_off;
|
||||
bool selected = item_i == position;
|
||||
if(selected) {
|
||||
elements_slightly_rounded_box(canvas, 0, y_off, 64, 16);
|
||||
@@ -374,54 +446,63 @@ static void menu_draw_callback(Canvas* canvas, void* _model) {
|
||||
canvas_draw_line(canvas, 5, 15, 59, 15);
|
||||
canvas_draw_line(canvas, 7, 17, 61, 17);
|
||||
canvas_draw_line(canvas, 10, 19, 63, 19);
|
||||
char title[20];
|
||||
snprintf(title, sizeof(title), "%s", furi_hal_version_get_name_ptr());
|
||||
canvas_draw_str(canvas, 5, 12, title);
|
||||
DateTime curr_dt;
|
||||
furi_hal_rtc_get_datetime(&curr_dt);
|
||||
uint8_t hour = curr_dt.hour;
|
||||
uint8_t min = curr_dt.minute;
|
||||
if(hour > 12) {
|
||||
hour -= 12;
|
||||
}
|
||||
if(hour == 0) {
|
||||
hour = (locale_get_midnight_format() == LocaleMidnightFormatTwelve &&
|
||||
locale_get_time_format() == LocaleTimeFormat12h) ?
|
||||
12 :
|
||||
0;
|
||||
|
||||
if(momentum_settings.menu_name) {
|
||||
char title[9];
|
||||
snprintf(title, sizeof(title), "%s", furi_hal_version_get_name_ptr());
|
||||
FuriString* title_str = furi_string_alloc();
|
||||
furi_string_set(title_str, title);
|
||||
size_t scroll_counter = menu_scroll_counter(model, true);
|
||||
elements_scrollable_text_line(canvas, 5, 12, 60, title_str, scroll_counter, false);
|
||||
furi_string_free(title_str);
|
||||
}
|
||||
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
char clk[20];
|
||||
snprintf(clk, sizeof(clk), "%02u:%02u", hour, min);
|
||||
canvas_draw_str(canvas, 5, 34, clk);
|
||||
uint8_t info_y = 56;
|
||||
|
||||
uint32_t battery_capacity = furi_hal_power_get_battery_full_capacity();
|
||||
uint32_t battery_remaining = furi_hal_power_get_battery_remaining_capacity();
|
||||
bool ext5v = furi_hal_power_is_otg_enabled();
|
||||
uint16_t battery_percent = (battery_remaining * 100) / battery_capacity;
|
||||
bool charge_state = false;
|
||||
if(momentum_settings.menu_otg) {
|
||||
// Display OTG state
|
||||
char ext5v_display[9];
|
||||
bool ext5v = furi_hal_power_is_otg_enabled();
|
||||
snprintf(ext5v_display, sizeof(ext5v_display), "5v: %s", ext5v ? "On" : "Off");
|
||||
canvas_draw_str(canvas, 5, info_y, ext5v_display);
|
||||
info_y -= 11;
|
||||
}
|
||||
|
||||
// Determine charge state
|
||||
if(furi_hal_power_is_charging()) {
|
||||
if(battery_percent < 100 && !furi_hal_power_is_charging_done()) {
|
||||
charge_state = true;
|
||||
if(momentum_settings.menu_battery) {
|
||||
uint8_t battery_percent = model->battery_pct;
|
||||
bool charge_state = false;
|
||||
|
||||
if(furi_hal_power_is_charging()) {
|
||||
if(battery_percent < 100 && !furi_hal_power_is_charging_done()) {
|
||||
charge_state = true;
|
||||
}
|
||||
}
|
||||
char bat_display[9];
|
||||
snprintf(bat_display, sizeof(bat_display), "%d%%", battery_percent);
|
||||
canvas_draw_str(canvas, 5, info_y, bat_display);
|
||||
info_y -= 11;
|
||||
|
||||
if(charge_state) {
|
||||
canvas_draw_icon(canvas, 28, 33, &I_Voltage_16x16);
|
||||
}
|
||||
}
|
||||
|
||||
// Display battery percentage
|
||||
char bat_display[20];
|
||||
snprintf(bat_display, sizeof(bat_display), "%d%%", battery_percent);
|
||||
canvas_draw_str(canvas, 5, 45, bat_display);
|
||||
|
||||
// Display charge state icon
|
||||
if(charge_state) {
|
||||
canvas_draw_icon(canvas, 28, 33, &I_Voltage_16x16);
|
||||
if(momentum_settings.menu_time) {
|
||||
char clk[9];
|
||||
menu_get_time_str(&model->current_time, clk, sizeof(clk));
|
||||
canvas_draw_str(canvas, 5, info_y, clk);
|
||||
info_y -= 11;
|
||||
}
|
||||
|
||||
// Display OTG state
|
||||
char ext5v_display[20];
|
||||
snprintf(ext5v_display, sizeof(ext5v_display), "5v: %s", ext5v ? "On" : "Off");
|
||||
canvas_draw_str(canvas, 5, 56, ext5v_display);
|
||||
if(!momentum_settings.menu_otg && momentum_settings.menu_level) {
|
||||
Dolphin* dolphin = furi_record_open(RECORD_DOLPHIN);
|
||||
uint8_t lvl = dolphin_get_level(dolphin->state->data.icounter);
|
||||
furi_record_close(RECORD_DOLPHIN);
|
||||
char lvl_str[10];
|
||||
snprintf(lvl_str, 10, "%s%i", lvl >= 10 ? "Lvl " : "Level ", lvl);
|
||||
canvas_draw_str(canvas, 5, info_y, lvl_str);
|
||||
}
|
||||
|
||||
MenuItem* item = MenuItemArray_get(model->items, position);
|
||||
menu_get_name(item, name, true);
|
||||
@@ -504,6 +585,18 @@ static void menu_scroll_timer_callback(void* context) {
|
||||
with_view_model(menu->view, MenuModel * model, { model->scroll_counter++; }, true);
|
||||
}
|
||||
|
||||
static void menu_status_timer_callback(void* context) {
|
||||
Menu* menu = context;
|
||||
with_view_model(
|
||||
menu->view,
|
||||
MenuModel * model,
|
||||
{
|
||||
if(momentum_settings.menu_battery) model->battery_pct = furi_hal_power_get_pct();
|
||||
if(momentum_settings.menu_time) furi_hal_rtc_get_datetime(&model->current_time);
|
||||
},
|
||||
true);
|
||||
}
|
||||
|
||||
static void menu_enter(void* context) {
|
||||
Menu* menu = context;
|
||||
with_view_model(
|
||||
@@ -518,6 +611,7 @@ static void menu_enter(void* context) {
|
||||
},
|
||||
true);
|
||||
furi_timer_start(menu->scroll_timer, 333);
|
||||
if(menu->info_timer) furi_timer_start(menu->info_timer, furi_kernel_get_tick_frequency());
|
||||
}
|
||||
|
||||
static void menu_exit(void* context) {
|
||||
@@ -533,6 +627,7 @@ static void menu_exit(void* context) {
|
||||
},
|
||||
false);
|
||||
furi_timer_stop(menu->scroll_timer);
|
||||
if(menu->info_timer) furi_timer_stop(menu->info_timer);
|
||||
}
|
||||
|
||||
Menu* menu_alloc(void) {
|
||||
@@ -546,6 +641,16 @@ Menu* menu_alloc(void) {
|
||||
view_set_exit_callback(menu->view, menu_exit);
|
||||
|
||||
menu->scroll_timer = furi_timer_alloc(menu_scroll_timer_callback, FuriTimerTypePeriodic, menu);
|
||||
menu->info_timer = NULL;
|
||||
// Settings could be set to true from other styles but we don't want a timer
|
||||
// going if the style doesn't support it (locked in MNTM > Interface > Main Menu > Show ...)
|
||||
bool allowed_style = momentum_settings.menu_style == MenuStylePs4 ||
|
||||
momentum_settings.menu_style == MenuStyleVertical ||
|
||||
momentum_settings.menu_style == MenuStyleMNTM;
|
||||
if(allowed_style && (momentum_settings.menu_time || momentum_settings.menu_battery)) {
|
||||
menu->info_timer =
|
||||
furi_timer_alloc(menu_status_timer_callback, FuriTimerTypePeriodic, menu);
|
||||
}
|
||||
|
||||
with_view_model(
|
||||
menu->view,
|
||||
@@ -553,6 +658,8 @@ Menu* menu_alloc(void) {
|
||||
{
|
||||
MenuItemArray_init(model->items);
|
||||
model->position = 0;
|
||||
if(momentum_settings.menu_battery) model->battery_pct = furi_hal_power_get_pct();
|
||||
if(momentum_settings.menu_time) furi_hal_rtc_get_datetime(&model->current_time);
|
||||
},
|
||||
true);
|
||||
|
||||
@@ -566,6 +673,7 @@ void menu_free(Menu* menu) {
|
||||
with_view_model(menu->view, MenuModel * model, { MenuItemArray_clear(model->items); }, false);
|
||||
view_free(menu->view);
|
||||
furi_timer_free(menu->scroll_timer);
|
||||
if(menu->info_timer) furi_timer_free(menu->info_timer);
|
||||
|
||||
free(menu);
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ typedef enum {
|
||||
} LocaleTimeFormat;
|
||||
|
||||
typedef enum {
|
||||
LocaleMidnightFormatTwelve = 0, /**< 12:XX format */
|
||||
LocaleMidnightFormatZero = 1, /**< 00:XX format */
|
||||
LocaleMidnightFormat12 = 0, /**< 12:XX format */
|
||||
LocaleMidnightFormat00 = 1, /**< 00:XX format */
|
||||
} LocaleMidnightFormat;
|
||||
|
||||
typedef enum {
|
||||
|
||||
@@ -171,8 +171,8 @@ const char* const midnight_format_text[] = {
|
||||
};
|
||||
|
||||
const uint32_t midnight_format_value[] = {
|
||||
LocaleMidnightFormatTwelve,
|
||||
LocaleMidnightFormatZero,
|
||||
LocaleMidnightFormat12,
|
||||
LocaleMidnightFormat00,
|
||||
};
|
||||
|
||||
static void midnight_format_changed(VariableItem* item) {
|
||||
|
||||
@@ -12,6 +12,11 @@ MomentumSettings momentum_settings = {
|
||||
.cycle_anims = 0, // Meta.txt
|
||||
.unlock_anims = false, // OFF
|
||||
.menu_style = MenuStyleDsi, // DSi
|
||||
.menu_name = true, // ON
|
||||
.menu_level = true, // ON
|
||||
.menu_time = true, // ON
|
||||
.menu_battery = true, // ON
|
||||
.menu_otg = true, // ON
|
||||
.lock_on_boot = false, // OFF
|
||||
.bad_pins_format = false, // OFF
|
||||
.allow_locked_rpc_commands = false, // OFF
|
||||
@@ -81,6 +86,11 @@ static const struct {
|
||||
{setting_int(cycle_anims, -1, 86400)},
|
||||
{setting_bool(unlock_anims)},
|
||||
{setting_enum(menu_style, MenuStyleCount)},
|
||||
{setting_bool(menu_name)},
|
||||
{setting_bool(menu_level)},
|
||||
{setting_bool(menu_time)},
|
||||
{setting_bool(menu_battery)},
|
||||
{setting_bool(menu_otg)},
|
||||
{setting_bool(bad_pins_format)},
|
||||
{setting_bool(allow_locked_rpc_commands)},
|
||||
{setting_bool(lock_on_boot)},
|
||||
|
||||
@@ -60,6 +60,11 @@ typedef struct {
|
||||
int32_t cycle_anims;
|
||||
bool unlock_anims;
|
||||
MenuStyle menu_style;
|
||||
bool menu_name;
|
||||
bool menu_level;
|
||||
bool menu_time;
|
||||
bool menu_battery;
|
||||
bool menu_otg;
|
||||
bool lock_on_boot;
|
||||
bool bad_pins_format;
|
||||
bool allow_locked_rpc_commands;
|
||||
|
||||
Reference in New Issue
Block a user