From 0e23d0e0fdc0cf1b0a91bce43ca9b64532d4d804 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Fri, 4 Oct 2024 22:14:51 +0300 Subject: [PATCH] nyx: name button list object appropriately --- nyx/nyx_gui/frontend/gui.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nyx/nyx_gui/frontend/gui.c b/nyx/nyx_gui/frontend/gui.c index 7ed7954..ca7bfa3 100644 --- a/nyx/nyx_gui/frontend/gui.c +++ b/nyx/nyx_gui/frontend/gui.c @@ -1832,7 +1832,7 @@ ini_parsing: } // Add button mask/radius and align icon. - lv_obj_t *btn = lv_btn_create(launch_ctxt.btn[curr_btn_idx], NULL); + lv_obj_t *btns = lv_btn_create(launch_ctxt.btn[curr_btn_idx], NULL); u32 btn_width = 200; u32 btn_height = 200; if (img_noborder) @@ -1848,25 +1848,25 @@ ini_parsing: lv_btn_set_style(launch_ctxt.btn[curr_btn_idx], LV_BTN_STYLE_REL, &btn_home_noborder_rel); lv_btn_set_style(launch_ctxt.btn[curr_btn_idx], LV_BTN_STYLE_PR, &btn_home_noborder_rel); } - lv_obj_set_size(btn, btn_width, btn_height); - lv_btn_set_style(btn, LV_BTN_STYLE_REL, img_noborder ? &btn_home_noborder_rel : &btn_home_transp_rel); - lv_btn_set_style(btn, LV_BTN_STYLE_PR, &btn_home_transp_pr); + lv_obj_set_size(btns, btn_width, btn_height); + lv_btn_set_style(btns, LV_BTN_STYLE_REL, img_noborder ? &btn_home_noborder_rel : &btn_home_transp_rel); + lv_btn_set_style(btns, LV_BTN_STYLE_PR, &btn_home_transp_pr); if (img) lv_obj_align(img, NULL, LV_ALIGN_CENTER, 0, 0); if (img_noborder) - lv_obj_align(btn, NULL, LV_ALIGN_CENTER, 0, 0); + lv_obj_align(btns, NULL, LV_ALIGN_CENTER, 0, 0); // Set autoboot index. - ext = lv_obj_get_ext_attr(btn); + ext = lv_obj_get_ext_attr(btns); ext->idx = entry_idx; ext = lv_obj_get_ext_attr(launch_ctxt.btn[curr_btn_idx]); // Redundancy. ext->idx = entry_idx; // Set action. if (!more_cfg) - lv_btn_set_action(btn, LV_BTN_ACTION_CLICK, _launch_action); + lv_btn_set_action(btns, LV_BTN_ACTION_CLICK, _launch_action); else - lv_btn_set_action(btn, LV_BTN_ACTION_CLICK, _launch_more_cfg_action); + lv_btn_set_action(btns, LV_BTN_ACTION_CLICK, _launch_more_cfg_action); // Set button's label text. lv_label_set_text(launch_ctxt.label[curr_btn_idx], ini_sec->name);