minor improvements
This commit is contained in:
@@ -24,24 +24,23 @@
|
||||
#include "render/font.c"
|
||||
#include "render/render_opengl.c"
|
||||
#include "wasm_app.gen.c"
|
||||
|
||||
#include "ui/ui_iter.c"
|
||||
#include "ui/ui.c"
|
||||
|
||||
fn void app_init(f32 dpr) {
|
||||
ma_arena_t *perm = &tcx._perm;
|
||||
mt_embed_file(font_liberation_mono, "package/liberation-mono.ttf");
|
||||
mt_embed_file(font_data, "package/liberation-mono.ttf");
|
||||
mt_tweak_f32(font_size, 50, 4, 200);
|
||||
mt_tweak_f32(_font_size, 50, 50, 50);
|
||||
|
||||
rn_init(perm, s8_array(font_liberation_mono), font_size * dpr);
|
||||
rn_init(perm, font_data, font_size * dpr);
|
||||
ui_demo_init(perm);
|
||||
}
|
||||
|
||||
fn b32 app_update(app_frame_t *frame) {
|
||||
if (!f32_are_equal(font_size, _font_size)) {
|
||||
_font_size = font_size;
|
||||
rn_reload_font(s8_array(font_liberation_mono), font_size);
|
||||
rn_reload_font(font_data, font_size);
|
||||
debugf("reloading font");
|
||||
}
|
||||
ui_demo_update(frame);
|
||||
|
||||
Reference in New Issue
Block a user