mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
[zr] add wizard window stub
This commit is contained in:
parent
a0eb17200b
commit
0eba3fe791
@ -88,18 +88,25 @@ static void zrmenu_main(zrmenu_handle_t *zr)
|
||||
{
|
||||
struct zr_context *ctx = &zr->ctx;
|
||||
|
||||
zrmenu_wnd_main(ctx, zr);
|
||||
|
||||
if (zr->window_enabled[ZRMENU_WND_MAIN])
|
||||
zrmenu_wnd_main(ctx, zr);
|
||||
if (zr->window_enabled[ZRMENU_WND_CONTROL])
|
||||
zrmenu_wnd_control(ctx, zr);
|
||||
if (zr->window_enabled[ZRMENU_WND_SHADER_PARAMETERS])
|
||||
zrmenu_wnd_shader_parameters(ctx, zr);
|
||||
if (zr->window_enabled[ZRMENU_WND_TEST])
|
||||
zrmenu_wnd_test(ctx, zr);
|
||||
if (zr->window_enabled[ZRMENU_WND_WIZARD])
|
||||
zrmenu_wnd_wizard(ctx, zr);
|
||||
|
||||
zr->window_enabled[ZRMENU_WND_CONTROL] = !zr_window_is_closed(ctx, "Control");
|
||||
zr->window_enabled[ZRMENU_WND_SHADER_PARAMETERS] = !zr_window_is_closed(ctx, "Shader Parameters");
|
||||
zr->window_enabled[ZRMENU_WND_TEST] = !zr_window_is_closed(ctx, "Test");
|
||||
zr->window_enabled[ZRMENU_WND_WIZARD] = !zr_window_is_closed(ctx, "Setup Wizard");
|
||||
|
||||
if(zr_window_is_closed(ctx, "Setup Wizard"))
|
||||
zr->window_enabled[ZRMENU_WND_MAIN] = true;
|
||||
|
||||
zr_buffer_info(&zr->status, &zr->ctx.memory);
|
||||
}
|
||||
|
||||
@ -622,6 +629,8 @@ static void *zrmenu_init(void **userdata)
|
||||
"DroidSans.ttf", sizeof(zr_font_path));
|
||||
zrmenu_init_device(zr);
|
||||
|
||||
zr->window_enabled[ZRMENU_WND_WIZARD] = true;
|
||||
|
||||
return menu;
|
||||
error:
|
||||
if (menu)
|
||||
|
@ -390,6 +390,13 @@ void zrmenu_wnd_main(struct zr_context *ctx, zrmenu_handle_t *zr)
|
||||
!zr->window_enabled[ZRMENU_WND_TEST];
|
||||
}
|
||||
|
||||
if (zr_menu_item(ctx, ZR_TEXT_LEFT, "Wizard"))
|
||||
{
|
||||
zr_window_close(ctx, "Test");
|
||||
zr->window_enabled[ZRMENU_WND_WIZARD] =
|
||||
!zr->window_enabled[ZRMENU_WND_WIZARD];
|
||||
}
|
||||
|
||||
zr_menu_end(ctx);
|
||||
}
|
||||
zr_layout_row_push(ctx, 60);
|
||||
@ -402,3 +409,23 @@ void zrmenu_wnd_main(struct zr_context *ctx, zrmenu_handle_t *zr)
|
||||
|
||||
zr_end(ctx);
|
||||
}
|
||||
|
||||
void zrmenu_wnd_wizard(struct zr_context *ctx, zrmenu_handle_t *zr)
|
||||
{
|
||||
static int width = 600;
|
||||
static int height = 500;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct zr_panel layout;
|
||||
|
||||
if (zr_begin(ctx, &layout, "Setup Wizard", zr_rect(zr->width/2 -width/2,
|
||||
zr->height/2 - height/2, width, height),
|
||||
ZR_WINDOW_CLOSABLE|ZR_WINDOW_MINIMIZABLE|ZR_WINDOW_MOVABLE|
|
||||
ZR_WINDOW_BORDER))
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
zr_end(ctx);
|
||||
}
|
||||
|
@ -4,15 +4,6 @@
|
||||
enum
|
||||
{
|
||||
ZR_TEXTURE_POINTER = 0,
|
||||
ZR_TEXTURE_BACK,
|
||||
ZR_TEXTURE_SWITCH_ON,
|
||||
ZR_TEXTURE_SWITCH_OFF,
|
||||
ZR_TEXTURE_TAB_MAIN_ACTIVE,
|
||||
ZR_TEXTURE_TAB_PLAYLISTS_ACTIVE,
|
||||
ZR_TEXTURE_TAB_SETTINGS_ACTIVE,
|
||||
ZR_TEXTURE_TAB_MAIN_PASSIVE,
|
||||
ZR_TEXTURE_TAB_PLAYLISTS_PASSIVE,
|
||||
ZR_TEXTURE_TAB_SETTINGS_PASSIVE,
|
||||
ZR_TEXTURE_LAST
|
||||
};
|
||||
|
||||
@ -21,7 +12,8 @@ enum
|
||||
ZRMENU_WND_MAIN = 0,
|
||||
ZRMENU_WND_CONTROL,
|
||||
ZRMENU_WND_SHADER_PARAMETERS,
|
||||
ZRMENU_WND_TEST
|
||||
ZRMENU_WND_TEST,
|
||||
ZRMENU_WND_WIZARD
|
||||
};
|
||||
|
||||
enum zrmenu_theme
|
||||
@ -33,7 +25,7 @@ enum zrmenu_theme
|
||||
typedef struct zrmenu_handle
|
||||
{
|
||||
char box_message[PATH_MAX_LENGTH];
|
||||
bool window_enabled[4];
|
||||
bool window_enabled[5];
|
||||
bool resize;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
@ -52,6 +44,9 @@ typedef struct zrmenu_handle
|
||||
} zrmenu_handle_t;
|
||||
|
||||
void zrmenu_set_style(struct zr_context *ctx, enum zrmenu_theme theme);
|
||||
|
||||
|
||||
void zrmenu_wnd_wizard(struct zr_context *ctx, zrmenu_handle_t *zr);
|
||||
void zrmenu_wnd_shader_parameters(struct zr_context *ctx, zrmenu_handle_t *zr);
|
||||
void zrmenu_wnd_control(struct zr_context *ctx, zrmenu_handle_t *zr);
|
||||
void zrmenu_wnd_test(struct zr_context *ctx, zrmenu_handle_t *zr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user