feat: Introduce TimingManager for Accurate Frame Timing

- Added TimingManager class to provide precise timing for animations and frame pacing, addressing issues with ImGui::GetIO().DeltaTime.
- Updated event handling in the window management to use SDL_PollEvent for improved responsiveness.
- Integrated TimingManager into EditorManager, BackgroundRenderer, and WelcomeScreen for consistent delta time usage across the application.
- Enhanced animation updates to utilize accurate frame timing, improving visual performance and user experience.
This commit is contained in:
scawful
2025-10-06 09:53:03 -04:00
parent 8688f0c502
commit e58bc3f007
5 changed files with 152 additions and 24 deletions

View File

@@ -3,6 +3,7 @@
#include <algorithm>
#include <cmath>
#include "app/core/timing.h"
#include "app/gui/theme_manager.h"
#include "imgui/imgui.h"
@@ -23,7 +24,7 @@ void BackgroundRenderer::RenderDockingBackground(ImDrawList* draw_list, const Im
const ImVec2& window_size, const Color& theme_color) {
if (!draw_list) return;
UpdateAnimation(ImGui::GetIO().DeltaTime);
UpdateAnimation(core::TimingManager::Get().GetDeltaTime());
// Get current theme colors
auto& theme_manager = ThemeManager::Get();