From 20905406daf4add6f6b288ca8125a38202f49a57 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 18 Sep 2024 19:12:47 +0200 Subject: [PATCH] Don't use obsolete ImGui functionality. --- profiler/src/main.cpp | 2 +- profiler/src/profiler/TracyView.cpp | 2 +- profiler/src/profiler/TracyView_Messages.cpp | 2 +- profiler/src/profiler/TracyView_Playback.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index d5ba6be8..e6d0b587 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -952,7 +952,7 @@ static void DrawContents() { memcpy( addr, str.c_str(), str.size() + 1 ); } - if( ImGui::IsItemHovered() && ImGui::IsKeyPressed( ImGui::GetKeyIndex( ImGuiKey_Delete ), false ) ) + if( ImGui::IsItemHovered() && ImGui::IsKeyPressed( ImGuiKey_Delete, false ) ) { idxRemove = (int)i; } diff --git a/profiler/src/profiler/TracyView.cpp b/profiler/src/profiler/TracyView.cpp index 6865cbec..7a165d3d 100644 --- a/profiler/src/profiler/TracyView.cpp +++ b/profiler/src/profiler/TracyView.cpp @@ -1084,7 +1084,7 @@ bool View::DrawImpl() DrawFrames(); const auto dockspaceId = ImGui::GetID( "tracyDockspace" ); - ImGui::DockSpace( dockspaceId, ImVec2( 0, 0 ), ImGuiDockNodeFlags_NoDockingInCentralNode ); + ImGui::DockSpace( dockspaceId, ImVec2( 0, 0 ), ImGuiDockNodeFlags_NoDockingOverCentralNode ); if( ImGuiDockNode* node = ImGui::DockBuilderGetCentralNode( dockspaceId ) ) { node->LocalFlags |= ImGuiDockNodeFlags_NoTabBar; diff --git a/profiler/src/profiler/TracyView_Messages.cpp b/profiler/src/profiler/TracyView_Messages.cpp index ed63b8fe..c3c2e0a0 100644 --- a/profiler/src/profiler/TracyView_Messages.cpp +++ b/profiler/src/profiler/TracyView_Messages.cpp @@ -247,7 +247,7 @@ void View::DrawMessageLine( const MessageData& msg, bool hasCallstack, int& idx const auto text = m_worker.GetString( msg.ref ); const auto tid = m_worker.DecompressThread( msg.thread ); ImGui::PushID( &msg ); - if( ImGui::Selectable( TimeToStringExact( msg.time ), m_msgHighlight == &msg, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap ) ) + if( ImGui::Selectable( TimeToStringExact( msg.time ), m_msgHighlight == &msg, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap ) ) { CenterAtTime( msg.time ); } diff --git a/profiler/src/profiler/TracyView_Playback.cpp b/profiler/src/profiler/TracyView_Playback.cpp index b18aaa2a..bf4f7569 100644 --- a/profiler/src/profiler/TracyView_Playback.cpp +++ b/profiler/src/profiler/TracyView_Playback.cpp @@ -115,7 +115,7 @@ void View::DrawPlayback() changed = true; } changed |= ImGui::SliderInt( "Frame image", &tmp, 1, ficnt, "%d" ); - ImGui::SetItemUsingMouseWheel(); + ImGui::SetItemKeyOwner( ImGuiKey_MouseWheelY ); if( wheel && ImGui::IsItemHovered() ) { if( ImGui::IsItemActive() )