Update imgui to 1.92.6
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From bf64125b461a33d9e67e9b6f3da2f0e0726cfb03 Mon Sep 17 00:00:00 2001
|
||||
From 818da9ceb2ec8e59f7ff600de4255bd237165146 Mon Sep 17 00:00:00 2001
|
||||
From: Guillaume Meunier <guillaume.meunier@centraliens.net>
|
||||
Date: Wed, 16 Oct 2024 20:51:52 +0200
|
||||
Subject: [PATCH 1/2] Change ImGui::ButtonBehavior default flags when using
|
||||
@@ -12,23 +12,23 @@ Subject: [PATCH 1/2] Change ImGui::ButtonBehavior default flags when using
|
||||
4 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/imgui.cpp b/imgui.cpp
|
||||
index 99819ffe..c1a16c42 100644
|
||||
index 93cff908c..6a914bc3c 100644
|
||||
--- a/imgui.cpp
|
||||
+++ b/imgui.cpp
|
||||
@@ -10140,7 +10140,7 @@ static const char* GetInputSourceName(ImGuiInputSource source)
|
||||
@@ -10351,7 +10351,7 @@ static const char* GetInputSourceName(ImGuiInputSource source)
|
||||
}
|
||||
static const char* GetMouseSourceName(ImGuiMouseSource source)
|
||||
{
|
||||
- const char* mouse_source_names[] = { "Mouse", "TouchScreen", "Pen" };
|
||||
+ const char* mouse_source_names[] = { "Mouse", "TouchScreen", "Pen", "VRHandTracking", "VRController" };
|
||||
IM_ASSERT(IM_ARRAYSIZE(mouse_source_names) == ImGuiMouseSource_COUNT && source >= 0 && source < ImGuiMouseSource_COUNT);
|
||||
return mouse_source_names[source];
|
||||
}
|
||||
IM_ASSERT(IM_COUNTOF(mouse_source_names) == ImGuiMouseSource_COUNT);
|
||||
if (source < 0 || source >= ImGuiMouseSource_COUNT)
|
||||
return "Unknown";
|
||||
diff --git a/imgui.h b/imgui.h
|
||||
index a2b2a1fa..64d5f758 100644
|
||||
index e3edac89c..af1cb686d 100644
|
||||
--- a/imgui.h
|
||||
+++ b/imgui.h
|
||||
@@ -1935,6 +1935,8 @@ enum ImGuiMouseSource : int
|
||||
@@ -1979,6 +1979,8 @@ enum ImGuiMouseSource : int
|
||||
ImGuiMouseSource_Mouse = 0, // Input is coming from an actual mouse.
|
||||
ImGuiMouseSource_TouchScreen, // Input is coming from a touch screen (no hovering prior to initial press, less precise initial press aiming, dual-axis wheeling possible).
|
||||
ImGuiMouseSource_Pen, // Input is coming from a pressure/magnetic pen (often used in conjunction with high-sampling rates).
|
||||
@@ -38,12 +38,12 @@ index a2b2a1fa..64d5f758 100644
|
||||
};
|
||||
|
||||
diff --git a/imgui_demo.cpp b/imgui_demo.cpp
|
||||
index 991676f7..b360e69e 100644
|
||||
index c0c4de946..d570f1f74 100644
|
||||
--- a/imgui_demo.cpp
|
||||
+++ b/imgui_demo.cpp
|
||||
@@ -7768,6 +7768,11 @@ static void DemoWindowInputs()
|
||||
@@ -7838,6 +7838,11 @@ static void DemoWindowInputs()
|
||||
ImGui::Text("Mouse clicked count:");
|
||||
for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++) if (io.MouseClickedCount[i] > 0) { ImGui::SameLine(); ImGui::Text("b%d: %d", i, io.MouseClickedCount[i]); }
|
||||
for (int i = 0; i < IM_COUNTOF(io.MouseDown); i++) if (io.MouseClickedCount[i] > 0) { ImGui::SameLine(); ImGui::Text("b%d: %d", i, io.MouseClickedCount[i]); }
|
||||
|
||||
+ const char* mouse_source_names[] = { "Mouse", "TouchScreen", "Pen", "VRHandTracking", "VRController" };
|
||||
+ IM_ASSERT(IM_ARRAYSIZE(mouse_source_names) == ImGuiMouseSource_COUNT && io.MouseSource >= 0 && io.MouseSource < ImGuiMouseSource_COUNT);
|
||||
@@ -54,7 +54,7 @@ index 991676f7..b360e69e 100644
|
||||
// displaying the data for old/new backends.
|
||||
// User code should never have to go through such hoops!
|
||||
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp
|
||||
index a0c4f14f..11709bd1 100644
|
||||
index 23a75aa8c..f5a0e52d5 100644
|
||||
--- a/imgui_widgets.cpp
|
||||
+++ b/imgui_widgets.cpp
|
||||
@@ -557,7 +557,12 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
@@ -72,5 +72,5 @@ index a0c4f14f..11709bd1 100644
|
||||
ImGuiWindow* backup_hovered_window = g.HoveredWindow;
|
||||
const bool flatten_hovered_children = (flags & ImGuiButtonFlags_FlattenChildren) && g.HoveredWindow && g.HoveredWindow->RootWindow == window->RootWindow;
|
||||
--
|
||||
2.50.0
|
||||
2.55.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user