Forma value and name settings arrays

This commit is contained in:
Willy-JL
2023-08-14 03:19:18 +02:00
parent 5e8efe8281
commit 520b4ace2e
3 changed files with 78 additions and 13 deletions

View File

@@ -27,10 +27,34 @@ static void xtreme_app_scene_interface_graphics_asset_pack_changed(VariableItem*
app->apply_pack = true;
}
const char* const anim_speed_names[] =
{"25%", "50%", "75%", "100%", "125%", "150%", "175%", "200%", "225%", "250%", "275%", "300%"};
const uint32_t anim_speed_values[COUNT_OF(anim_speed_names)] =
{25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300};
const char* const anim_speed_names[] = {
"25%",
"50%",
"75%",
"100%",
"125%",
"150%",
"175%",
"200%",
"225%",
"250%",
"275%",
"300%",
};
const uint32_t anim_speed_values[COUNT_OF(anim_speed_names)] = {
25,
50,
75,
100,
125,
150,
175,
200,
225,
250,
275,
300,
};
static void xtreme_app_scene_interface_graphics_anim_speed_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);
@@ -52,9 +76,23 @@ const char* const cycle_anims_names[] = {
"2 H",
"6 H",
"12 H",
"24 H"};
const int32_t cycle_anims_values[COUNT_OF(cycle_anims_names)] =
{-1, 0, 30, 60, 300, 600, 900, 1800, 3600, 7200, 21600, 43200, 86400};
"24 H",
};
const int32_t cycle_anims_values[COUNT_OF(cycle_anims_names)] = {
-1,
0,
30,
60,
300,
600,
900,
1800,
3600,
7200,
21600,
43200,
86400,
};
static void xtreme_app_scene_interface_graphics_cycle_anims_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);

View File

@@ -13,8 +13,15 @@ void xtreme_app_scene_interface_statusbar_var_item_list_callback(void* context,
view_dispatcher_send_custom_event(app->view_dispatcher, index);
}
const char* const battery_icon_names[BatteryIconCount] =
{"OFF", "Bar", "%", "Inv. %", "Retro 3", "Retro 5", "Bar %"};
const char* const battery_icon_names[BatteryIconCount] = {
"OFF",
"Bar",
"%",
"Inv. %",
"Retro 3",
"Retro 5",
"Bar %",
};
static void xtreme_app_scene_interface_statusbar_battery_icon_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);

View File

@@ -29,10 +29,30 @@ static void xtreme_app_scene_misc_dolphin_dolphin_angry_changed(VariableItem* it
app->save_angry = true;
}
const char* const butthurt_timer_names[] =
{"OFF", "30 M", "1 H", "2 H", "4 H", "6 H", "8 H", "12 H", "24 H", "48 H"};
const uint32_t butthurt_timer_values[COUNT_OF(butthurt_timer_names)] =
{0, 1800, 3600, 7200, 14400, 21600, 28800, 43200, 86400, 172800};
const char* const butthurt_timer_names[] = {
"OFF",
"30 M",
"1 H",
"2 H",
"4 H",
"6 H",
"8 H",
"12 H",
"24 H",
"48 H",
};
const uint32_t butthurt_timer_values[COUNT_OF(butthurt_timer_names)] = {
0,
1800,
3600,
7200,
14400,
21600,
28800,
43200,
86400,
172800,
};
static void xtreme_app_scene_misc_dolphin_butthurt_timer_changed(VariableItem* item) {
XtremeApp* app = variable_item_get_context(item);
uint8_t index = variable_item_get_current_value_index(item);