rntviewer/src/render.cpp
2024-07-10 20:11:42 +02:00

17 lines
578 B
C++

internal void update_and_render(Arena *arena, App_State &app, f32 delta_time)
{
ImGui::SetNextWindowPos({ 0, 0 });
ImGui::SetNextWindowSize({ (f32)app.win_data.width, (f32)app.win_data.height });
Temp scratch = temp_begin(arena);
defer { temp_end(scratch); };
u64 text_buf_size = min(app.inspected_file_size, 2048);
char *text_buf = arena_push_array<char>(scratch.arena, text_buf_size);
// TODO: convert file content to human readable
if (ImGui::Begin("test")) {
ImGui::InputTextMultiline("##text_buf", text_buf, text_buf_size);
ImGui::End();
}
}