fixed win32 demo
This commit is contained in:
parent
3e0ff05f9e
commit
69e13ea482
@ -100,7 +100,7 @@ show_test_window(struct zr_window *window, struct zr_style *config, enum theme *
|
||||
/* menubar */
|
||||
struct zr_context menu;
|
||||
static int file_state = ZR_MINIMIZED;
|
||||
static size_t mprog = 60;
|
||||
static zr_size mprog = 60;
|
||||
static int mslider = 10;
|
||||
static int mcheck = zr_true;
|
||||
|
||||
@ -111,7 +111,7 @@ show_test_window(struct zr_window *window, struct zr_style *config, enum theme *
|
||||
zr_menu_begin(&layout, &menu, "MENU", 100, &file_state);
|
||||
{
|
||||
static size_t prog = 40;
|
||||
static int slider = 10;
|
||||
static zr_size slider = 10;
|
||||
static int check = zr_true;
|
||||
zr_layout_row_dynamic(&menu, 25, 1);
|
||||
zr_progress(&menu, &prog, 100, ZR_MODIFYABLE);
|
||||
|
@ -95,7 +95,7 @@ font_new(HDC hdc, const char *name, int height)
|
||||
}
|
||||
|
||||
size_t
|
||||
font_get_text_width(zr_handle handle, const char *text, size_t len)
|
||||
font_get_text_width(zr_handle handle, float font_height, const char *text, size_t len)
|
||||
{
|
||||
SIZE size;
|
||||
HFONT old;
|
||||
@ -401,7 +401,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE prev, LPSTR lpCmdLine, int shown)
|
||||
memset(&gui, 0, sizeof gui);
|
||||
zr_command_queue_init_fixed(&gui.queue, calloc(MAX_MEMORY, 1), MAX_MEMORY);
|
||||
gui.font.userdata = zr_handle_ptr(&xw);
|
||||
gui.font.height = (zr_float)xw.font->height;
|
||||
gui.font.height = (float)xw.font->height;
|
||||
gui.font.width = font_get_text_width;
|
||||
init_demo(&gui);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user