Nyx: emuMMC Manage window, Tools UI, and misc updates
- Add gui_emu_tools: emuMMC Manage window with correct positioning (LV_PROTECT_PARENT + re-parent to win) - Tools: single SD button (tap = SD partition manager, 3s hold = eMMC) - Remove emuSD from Nyx UI (tabs, UMS, partition manager); keep bootloader emusd - Shorten Create emuMMC description text by one character - Storage/build/config and dependency updates Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025 CTCaer
|
||||
* Copyright (c) 2018-2020 CTCaer
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
@@ -101,7 +101,7 @@ static void _create_window_backup_restore(emmcPartType_t type, const char* win_l
|
||||
lv_obj_align(label_info, label_sep, LV_ALIGN_OUT_BOTTOM_LEFT, LV_DPI / 4, LV_DPI / 10);
|
||||
emmc_tool_gui_ctxt.label_info = label_info;
|
||||
|
||||
static lv_style_t bar_teal_bg, bar_teal_ind, bar_orange_bg, bar_orange_ind, bar_white_ind;
|
||||
static lv_style_t bar_teal_bg, bar_teal_ind, bar_white_ind;
|
||||
|
||||
lv_style_copy(&bar_teal_bg, lv_theme_get_current()->bar.bg);
|
||||
bar_teal_bg.body.main_color = LV_COLOR_HEX(0x005a47);
|
||||
@@ -111,23 +111,12 @@ static void _create_window_backup_restore(emmcPartType_t type, const char* win_l
|
||||
bar_teal_ind.body.main_color = LV_COLOR_HEX(0x00FFC9);
|
||||
bar_teal_ind.body.grad_color = bar_teal_ind.body.main_color;
|
||||
|
||||
lv_style_copy(&bar_orange_bg, lv_theme_get_current()->bar.bg);
|
||||
bar_orange_bg.body.main_color = LV_COLOR_HEX(0x755000);
|
||||
bar_orange_bg.body.grad_color = bar_orange_bg.body.main_color;
|
||||
|
||||
lv_style_copy(&bar_orange_ind, lv_theme_get_current()->bar.indic);
|
||||
bar_orange_ind.body.main_color = LV_COLOR_HEX(0xFFAE00);
|
||||
bar_orange_ind.body.grad_color = bar_orange_ind.body.main_color;
|
||||
|
||||
lv_style_copy(&bar_white_ind, lv_theme_get_current()->bar.indic);
|
||||
bar_white_ind.body.main_color = LV_COLOR_HEX(0xF0F0F0);
|
||||
bar_white_ind.body.grad_color = bar_white_ind.body.main_color;
|
||||
|
||||
emmc_tool_gui_ctxt.bar_teal_bg = &bar_teal_bg;
|
||||
emmc_tool_gui_ctxt.bar_teal_ind = &bar_teal_ind;
|
||||
emmc_tool_gui_ctxt.bar_orange_bg = &bar_orange_bg;
|
||||
emmc_tool_gui_ctxt.bar_orange_ind = &bar_orange_ind;
|
||||
emmc_tool_gui_ctxt.bar_white_bg = lv_theme_get_current()->bar.bg;
|
||||
emmc_tool_gui_ctxt.bar_white_ind = &bar_white_ind;
|
||||
|
||||
lv_obj_t *bar = lv_bar_create(h1, NULL);
|
||||
@@ -250,15 +239,15 @@ static lv_res_t _emmc_backup_buttons_raw_toggle(lv_obj_t *btn)
|
||||
else // Backup/Restore from and to emuMMC.
|
||||
{
|
||||
if (!emmc_btn_ctxt.restore)
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_boot, NULL), SYMBOL_UPLOAD" SD emuMMC BOOT0 & BOOT1");
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_boot, NULL), SYMBOL_UPLOAD" emuMMC BOOT0 & BOOT1");
|
||||
else
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_boot, NULL), SYMBOL_DOWNLOAD" SD emuMMC BOOT0 & BOOT1");
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_boot, NULL), SYMBOL_DOWNLOAD" emuMMC BOOT0 & BOOT1");
|
||||
lv_obj_realign(emmc_btn_ctxt.emmc_boot);
|
||||
|
||||
if (!emmc_btn_ctxt.restore)
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_raw_gpp, NULL), SYMBOL_UPLOAD" SD emuMMC RAW GPP");
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_raw_gpp, NULL), SYMBOL_UPLOAD" emuMMC RAW GPP");
|
||||
else
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_raw_gpp, NULL), SYMBOL_DOWNLOAD" SD emuMMC RAW GPP");
|
||||
lv_label_set_static_text(lv_obj_get_child(emmc_btn_ctxt.emmc_raw_gpp, NULL), SYMBOL_DOWNLOAD" emuMMC RAW GPP");
|
||||
lv_obj_realign(emmc_btn_ctxt.emmc_raw_gpp);
|
||||
|
||||
lv_obj_set_click(emmc_btn_ctxt.emmc_sys, false);
|
||||
@@ -464,7 +453,7 @@ lv_res_t create_window_backup_restore_tool(lv_obj_t *btn)
|
||||
|
||||
lv_obj_t *sd_emummc_raw = lv_btn_create(h3, NULL);
|
||||
nyx_create_onoff_button(lv_theme_get_current(), h3,
|
||||
sd_emummc_raw, SYMBOL_SD" SD emuMMC Raw Partition", _emmc_backup_buttons_raw_toggle, false);
|
||||
sd_emummc_raw, SYMBOL_SD" emuMMC Raw Partition", _emmc_backup_buttons_raw_toggle, false);
|
||||
emmc_btn_ctxt.raw_emummc = false;
|
||||
|
||||
return LV_RES_OK;
|
||||
|
||||
Reference in New Issue
Block a user