properly seperate tick and render

This commit is contained in:
2024-01-07 16:33:08 +01:00
parent a0ba0b39d8
commit e8234f2a4a
6 changed files with 36 additions and 27 deletions

View File

@ -158,7 +158,7 @@ void SendImagePopup::sendMemory(
}
void SendImagePopup::render(void) {
void SendImagePopup::render(float time_delta) {
if (_open_popup) {
_open_popup = false;
ImGui::OpenPopup("send image##SendImagePopup");
@ -171,7 +171,7 @@ void SendImagePopup::render(void) {
preview_image.doAnimation(getNowMS());
time += 1.f/60.f; // TODO: actual delay
time += time_delta;
time = fmod(time, 1.f); // fract()
//ImGui::Text("send file....\n......");