mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-12 14:58:57 +00:00
[zr] draw window offscreen till a better solution is available
This commit is contained in:
parent
75c05a5d7f
commit
8d89b1fa86
@ -252,14 +252,20 @@ static void zrmenu_set_style(struct zr_context *ctx, enum zr_theme theme)
|
||||
}
|
||||
|
||||
static int zrmenu_wnd_control(struct zr_context *ctx,
|
||||
int width, int height, struct zrmenu *gui)
|
||||
int width, int height, struct zrmenu *gui, bool visible)
|
||||
{
|
||||
|
||||
|
||||
int i;
|
||||
struct zr_panel layout;
|
||||
if (zr_begin(ctx, &layout, "Control", zr_rect(900, 60, 350, 520),
|
||||
ZR_WINDOW_CLOSABLE|ZR_WINDOW_MINIMIZABLE|ZR_WINDOW_MOVABLE|
|
||||
ZR_WINDOW_SCALABLE|ZR_WINDOW_BORDER))
|
||||
{
|
||||
if (visible)
|
||||
zr_window_set_position(ctx, zr_vec2(900, 60));
|
||||
else
|
||||
zr_window_set_position(ctx, zr_vec2(width + 10 , height + 10));
|
||||
/* Style */
|
||||
if (zr_layout_push(ctx, ZR_LAYOUT_TAB, "Metrics", ZR_MINIMIZED))
|
||||
{
|
||||
@ -437,7 +443,7 @@ static void zrmenu_wnd_main(struct zr_context *ctx, int width, int height, struc
|
||||
zr_layout_row_dynamic(ctx, 25, 1);
|
||||
|
||||
if (zr_menu_item(ctx, ZR_TEXT_LEFT, "Control"))
|
||||
wnd_control_visible = !wnd_control_visible;
|
||||
wnd_control_visible = !wnd_control_visible;
|
||||
|
||||
zr_menu_end(ctx);
|
||||
}
|
||||
@ -454,10 +460,7 @@ static void zrmenu_frame(struct zrmenu *gui, int width, int height)
|
||||
|
||||
zrmenu_wnd_main(ctx, width, height, gui);
|
||||
zrmenu_wnd_demo(ctx, width, height, gui);
|
||||
|
||||
if (wnd_control_visible)
|
||||
zrmenu_wnd_control(ctx, width, height, gui);
|
||||
|
||||
zrmenu_wnd_control(ctx, width, height, gui, wnd_control_visible);
|
||||
|
||||
zr_buffer_info(&gui->status, &gui->ctx.memory);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user