updated Readme
This commit is contained in:
parent
f88e92dd43
commit
b2ea6fb155
@ -44,15 +44,15 @@ draw the GUI.
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
```c
|
```c
|
||||||
|
/* allocate memory to hold draw commands */
|
||||||
|
struct zr_command_queue queue;
|
||||||
|
zr_command_queue_init_fixed(&queue, malloc(MEMORY_SIZE), MEMORY_SIZE);
|
||||||
|
|
||||||
/* setup configuration */
|
/* setup configuration */
|
||||||
struct zr_style style;
|
struct zr_style style;
|
||||||
struct zr_user_font font = {...};
|
struct zr_user_font font = {...};
|
||||||
zr_style_default(&style, ZR_DEFAULT_ALL, &font);
|
zr_style_default(&style, ZR_DEFAULT_ALL, &font);
|
||||||
|
|
||||||
/* allocate memory to hold draw commands */
|
|
||||||
struct zr_command_queue queue;
|
|
||||||
zr_command_queue_init_fixed(&queue, malloc(MEMORY_SIZE), MEMORY_SIZE);
|
|
||||||
|
|
||||||
/* initialize window */
|
/* initialize window */
|
||||||
struct zr_window window;
|
struct zr_window window;
|
||||||
zr_window_init(&window, zr_rect(50, 50, 220, 180),
|
zr_window_init(&window, zr_rect(50, 50, 220, 180),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user