}
}
-needs_update :: () -> bool {
+needs_redraw :: () -> bool {
return ui.has_active_animation() || debug_log_y_offset != debug_log_y_offset_target;
}
use package immediate_mode { Color4 }
-ONLY_UPDATE_ON_EVENTS :: true
+ONLY_REDRAW_ON_EVENTS :: true
-color_scheme_file :: "/res/colors_light.json"
+color_scheme_file :: "/res/colors_dark.json"
Colors : struct {
dark_background : Color4;
dt := cast(f32) (now - last_time) / 1000.0f;
last_time = now;
- #if #defined(config.ONLY_UPDATE_ON_EVENTS) {
- if poll_events() || app.needs_update() {
- app.update(dt);
- app.draw();
- }
+ #if #defined(config.ONLY_REDRAW_ON_EVENTS) {
+ redraw := poll_events() || app.needs_redraw();
+ app.update(dt);
+ if redraw do app.draw();
} else {
poll_events();