From 3273b7112c6575b47d86765f2b0bf690804c0cdd Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:28:19 +0100 Subject: [PATCH] ImGui: better name for blinker timer in logger --- r5dev/thirdparty/imgui/misc/imgui_logger.cpp | 10 +++++----- r5dev/thirdparty/imgui/misc/imgui_logger.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/r5dev/thirdparty/imgui/misc/imgui_logger.cpp b/r5dev/thirdparty/imgui/misc/imgui_logger.cpp index 312aa528..b9ed3cdb 100644 --- a/r5dev/thirdparty/imgui/misc/imgui_logger.cpp +++ b/r5dev/thirdparty/imgui/misc/imgui_logger.cpp @@ -34,7 +34,7 @@ CTextLogger::CTextLogger() , m_flLineSpacing(1.0f) , m_SelectionMode(SelectionMode::Normal) , m_flLastClick(-1.0) - , m_nStartTime(-1.0f) + , m_flCursorBlinkerStartTime(-1.0f) { m_Lines.push_back(Line()); } @@ -835,11 +835,11 @@ void CTextLogger::Render() // Initialize the cursor start render time, this is done here // as Dear ImGui typically isn't initialized during the // construction of this class - if (m_nStartTime == -1.0) - m_nStartTime = ImGui::GetTime(); + if (m_flCursorBlinkerStartTime == -1.0) + m_flCursorBlinkerStartTime = ImGui::GetTime(); const double currTime = ImGui::GetTime(); - const double elapsed = currTime - m_nStartTime; + const double elapsed = currTime - m_flCursorBlinkerStartTime; if (elapsed > 0.4) { @@ -852,7 +852,7 @@ void CTextLogger::Render() drawList->AddRectFilled(cstart, cend, 0xffe0e0e0); if (elapsed > 0.8) - m_nStartTime = currTime; + m_flCursorBlinkerStartTime = currTime; } } diff --git a/r5dev/thirdparty/imgui/misc/imgui_logger.h b/r5dev/thirdparty/imgui/misc/imgui_logger.h index ed37f411..af82d45c 100644 --- a/r5dev/thirdparty/imgui/misc/imgui_logger.h +++ b/r5dev/thirdparty/imgui/misc/imgui_logger.h @@ -239,7 +239,7 @@ private: float m_flLineSpacing; SelectionMode m_SelectionMode; double m_flLastClick; - double m_nStartTime; + double m_flCursorBlinkerStartTime; Coordinates m_InteractiveStart; Coordinates m_InteractiveEnd;