35 lines
836 B
C
35 lines
836 B
C
#include "core/core_inc.h"
|
|
#include "app/app.h"
|
|
#include "ui/ui.h"
|
|
|
|
#include "core/core_inc.c"
|
|
#include "app/app.c"
|
|
#include "render/render_inc.c"
|
|
|
|
#include "wasm_app.gen.c"
|
|
#include "ui/ui_iter.c"
|
|
#include "ui/ui.gen.c"
|
|
#include "ui/ui.c"
|
|
|
|
fn void app_init(f32 dpr) {
|
|
ma_arena_t *perm = &tcx._perm;
|
|
unused(perm);
|
|
mt_tweak_f32(font_size, 50, 4, 200);
|
|
mt_tweak_f32(_font_size, 50, 50, 50);
|
|
|
|
rn_init(perm, 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(font_size, frame->dpr);
|
|
}
|
|
ui_demo_update(frame);
|
|
// v2f32_t size = rn_measure_string(rn_state.main_font, s8_lit("Memes and other things"));
|
|
// debugf("font size = %f %f", size.x, size.y);
|
|
|
|
return true;
|
|
}
|