#include "gui_emu_tools.h" #include "gui.h" #include "gui_emummc_tools.h" #include #include #include #include static lv_obj_t *_create_container(lv_obj_t *parent){ static lv_style_t h_style; lv_style_copy(&h_style, &lv_style_transp); h_style.body.padding.inner = 0; h_style.body.padding.hor = 0; h_style.body.padding.ver = 0; lv_obj_t *h1 = lv_cont_create(parent, NULL); lv_cont_set_style(h1, &h_style); lv_cont_set_fit(h1, false, true); lv_obj_set_width(h1, LV_HOR_RES - 62); lv_obj_set_click(h1, false); lv_cont_set_layout(h1, LV_LAYOUT_OFF); return h1; } lv_res_t create_win_emu_tools(lv_obj_t *btn){ lv_obj_t *win = nyx_create_standard_window(SYMBOL_EDIT " emuMMC Manage"); static lv_style_t win_style_no_pad; lv_style_copy(&win_style_no_pad, lv_win_get_style(win, LV_WIN_STYLE_CONTENT_BG)); win_style_no_pad.body.padding.hor = 0; win_style_no_pad.body.padding.inner = 0; lv_win_set_style(win, LV_WIN_STYLE_CONTENT_BG, &win_style_no_pad); /* Create container on window; win's CHILD_CHG moves it to the page, so we protect and re-parent to win */ lv_obj_t *cont = _create_container(win); lv_obj_set_protect(cont, LV_PROTECT_PARENT); lv_obj_set_parent(cont, win); lv_obj_set_height(cont, 572); create_tab_emummc_tools(cont); /* Align to content area; y offset works now because cont stays on win */ lv_obj_t *content = lv_win_get_content(win); lv_obj_align(cont, content, LV_ALIGN_IN_TOP_MID, -20, 50); return LV_RES_OK; }