This commit is contained in:
vurtun 2016-01-04 00:19:38 +01:00
parent 333d5f33e7
commit 1be6475e5b
3 changed files with 14 additions and 14 deletions

View File

@ -170,8 +170,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme)
zr_label(ctx, "By Micha Mettke", ZR_TEXT_LEFT); zr_label(ctx, "By Micha Mettke", ZR_TEXT_LEFT);
zr_label(ctx, "Zahnrad is licensed under the MIT License.", ZR_TEXT_LEFT); zr_label(ctx, "Zahnrad is licensed under the MIT License.", ZR_TEXT_LEFT);
zr_label(ctx, "See LICENSE for more information", ZR_TEXT_LEFT); zr_label(ctx, "See LICENSE for more information", ZR_TEXT_LEFT);
} else show_app_about = zr_false;
zr_popup_end(ctx); zr_popup_end(ctx);
} else show_app_about = zr_false;
} }
if (show_close_popup) if (show_close_popup)
@ -191,8 +191,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme)
show_close_popup = zr_false; show_close_popup = zr_false;
zr_popup_close(ctx); zr_popup_close(ctx);
} }
} else show_close_popup = zr_false;
zr_popup_end(ctx); zr_popup_end(ctx);
} else show_close_popup = zr_false;
} }
if (show_color_picker_popup) if (show_color_picker_popup)
@ -224,8 +224,8 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme)
zr_popup_close(ctx); zr_popup_close(ctx);
show_color_picker_popup = zr_false; show_color_picker_popup = zr_false;
} }
} else show_color_picker_popup = zr_false;
zr_popup_end(ctx); zr_popup_end(ctx);
} else show_color_picker_popup = zr_false;
} }
/* contextual menu */ /* contextual menu */
@ -590,7 +590,7 @@ demo_window(struct zr_layout *layout, struct zr_context *ctx, enum theme *theme)
zr_layout_pop(ctx); zr_layout_pop(ctx);
} }
if (zr_layout_push(ctx, ZR_LAYOUT_TAB, "chart")) if (zr_layout_push(ctx, ZR_LAYOUT_TAB, "Chart"))
{ {
float id = 0; float id = 0;
static int col_index = -1; static int col_index = -1;

View File

@ -375,8 +375,7 @@ basic_demo(struct zr_context *ctx, struct icons *img)
*------------------------------------------------*/ *------------------------------------------------*/
if (image_active) { if (image_active) {
struct zr_layout popup; struct zr_layout popup;
zr_popup_begin(ctx, &popup, ZR_POPUP_STATIC, "Image Popup", 0, if (zr_popup_begin(ctx, &popup, ZR_POPUP_STATIC, "Image Popup", 0, zr_rect(265, 0, 320, 220))) {
zr_rect(265, 0, 320, 220));
zr_layout_row_static(ctx, 82, 82, 3); zr_layout_row_static(ctx, 82, 82, 3);
for (i = 0; i < 9; ++i) { for (i = 0; i < 9; ++i) {
if (zr_button_image(ctx, zr_image_id(img->images[i]), ZR_BUTTON_DEFAULT)) { if (zr_button_image(ctx, zr_image_id(img->images[i]), ZR_BUTTON_DEFAULT)) {
@ -387,6 +386,7 @@ basic_demo(struct zr_context *ctx, struct icons *img)
} }
zr_popup_end(ctx); zr_popup_end(ctx);
} }
}
/*------------------------------------------------ /*------------------------------------------------
* COMBOBOX * COMBOBOX
*------------------------------------------------*/ *------------------------------------------------*/

View File

@ -9790,8 +9790,8 @@ zr_tooltip(struct zr_context *ctx, const char *text)
if (zr_tooltip_begin(ctx, &layout, (float)text_width)) { if (zr_tooltip_begin(ctx, &layout, (float)text_width)) {
zr_layout_row_dynamic(ctx, (float)text_height, 1); zr_layout_row_dynamic(ctx, (float)text_height, 1);
zr_text(ctx, text, text_len, ZR_TEXT_LEFT); zr_text(ctx, text, text_len, ZR_TEXT_LEFT);
}
zr_tooltip_end(ctx); zr_tooltip_end(ctx);
}
} }
/* /*