#include #include "ui.hpp" #include "imgui.h" #include "log.hpp" #include "locales.hpp" void ui_draw_log() { log* l = get_log(); for (int i = (int)l->history_length-1; i >= 0; i--) { u32 cursor = l->write_cursor - l->history_length + i; if (cursor < 0) { cursor = (l->write_cursor + i) % MAX_LEN_LOG_HISTORY; } ImGui::Text(l->history[cursor]); } }