You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// (We pass an error message in the assert expression to make it visible to programmers who are not using a debugger, as most assert handlers display their argument)
IM_ASSERT(g.Style.Alpha >= 0.0f && g.Style.Alpha <= 1.0f && "Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)!");
IM_ASSERT(g.IO.KeyMap[n] >= -1 && g.IO.KeyMap[n] < IM_ARRAYSIZE(g.IO.KeysDown) && "io.KeyMap[] contains an out of bound value (need to be 0..512, or -1 for unmapped key)");
3697
-
3698
-
// Perform simple check: required key mapping (we intentionally do NOT check all keys to not pressure user into setting up everything, but Space is required and was only recently added in 1.60 WIP)
3699
-
if (g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard)
3700
-
IM_ASSERT(g.IO.KeyMap[ImGuiKey_Space] != -1 && "ImGuiKey_Space is not mapped, required for keyboard navigation.");
3701
-
3702
-
// Perform simple check: the beta io.ConfigWindowsResizeFromEdges option requires back-end to honor mouse cursor changes and set the ImGuiBackendFlags_HasMouseCursors flag accordingly.
3703
-
if (g.IO.ConfigWindowsResizeFromEdges && !(g.IO.BackendFlags & ImGuiBackendFlags_HasMouseCursors))
3704
-
g.IO.ConfigWindowsResizeFromEdges = false;
3705
-
}
3706
-
3707
3679
static ImGuiKeyModFlags GetMergedKeyModFlags()
3708
3680
{
3709
3681
ImGuiContext& g = *GImGui;
@@ -3725,7 +3697,7 @@ void ImGui::NewFrame()
3725
3697
#endif
3726
3698
3727
3699
// Check and assert for various common IO and Configuration mistakes
3728
-
NewFrameSanityChecks();
3700
+
ErrorCheckNewFrameSanityChecks();
3729
3701
3730
3702
// Load settings on first frame, save settings when modified (after a delay)
3731
3703
UpdateSettings();
@@ -4171,19 +4143,21 @@ void ImGui::EndFrame()
4171
4143
{
4172
4144
ImGuiContext& g = *GImGui;
4173
4145
IM_ASSERT(g.Initialized);
4174
-
if (g.FrameCountEnded == g.FrameCount) // Don't process EndFrame() multiple times.
4146
+
4147
+
// Don't process EndFrame() multiple times.
4148
+
if (g.FrameCountEnded == g.FrameCount)
4175
4149
return;
4176
4150
IM_ASSERT(g.WithinFrameScope && "Forgot to call ImGui::NewFrame()?");
4177
4151
4152
+
ErrorCheckEndFrameSanityChecks();
4153
+
4178
4154
// Notify OS when our Input Method Editor cursor has moved (e.g. CJK inputs using Microsoft IME)
// (We pass an error message in the assert expression to make it visible to programmers who are not using a debugger, as most assert handlers display their argument)
IM_ASSERT(g.Style.Alpha >= 0.0f && g.Style.Alpha <= 1.0f && "Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)!");
IM_ASSERT(g.IO.KeyMap[n] >= -1 && g.IO.KeyMap[n] < IM_ARRAYSIZE(g.IO.KeysDown) && "io.KeyMap[] contains an out of bound value (need to be 0..512, or -1 for unmapped key)");
6727
+
6728
+
// Perform simple check: required key mapping (we intentionally do NOT check all keys to not pressure user into setting up everything, but Space is required and was only recently added in 1.60 WIP)
6729
+
if (g.IO.ConfigFlags & ImGuiConfigFlags_NavEnableKeyboard)
6730
+
IM_ASSERT(g.IO.KeyMap[ImGuiKey_Space] != -1 && "ImGuiKey_Space is not mapped, required for keyboard navigation.");
6731
+
6732
+
// Perform simple check: the beta io.ConfigWindowsResizeFromEdges option requires back-end to honor mouse cursor changes and set the ImGuiBackendFlags_HasMouseCursors flag accordingly.
6733
+
if (g.IO.ConfigWindowsResizeFromEdges && !(g.IO.BackendFlags & ImGuiBackendFlags_HasMouseCursors))
0 commit comments