#include "../../include/mgui/mgui.h" #include "../../include/mgui/widget.h" #include static mgl_clock global_timer; void mgui_init() { mgl_clock_init(&global_timer); } void mgui_draw(mgui_widget *root_widget, mgl_window *window) { mgui_widget_draw(root_widget, window); } double mgui_get_seconds_since_last_update() { double elapsed_time_sec = mgl_clock_restart(&global_timer); if(elapsed_time_sec > 1.0) elapsed_time_sec = 1.0; return elapsed_time_sec; }