rntviewer/src/render.cpp

18 lines
578 B
C++
Raw Normal View History

2024-07-10 17:38:16 +00:00
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 });
2024-07-10 18:11:42 +00:00
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
2024-07-10 17:38:16 +00:00
if (ImGui::Begin("test")) {
2024-07-10 18:11:42 +00:00
ImGui::InputTextMultiline("##text_buf", text_buf, text_buf_size);
2024-07-10 17:38:16 +00:00
ImGui::End();
}
}