914
914
(The ImGuiWindowFlags_NoDecoration flag itself is a shortcut for NoTitleBar | NoResize | NoScrollbar | NoCollapse)
915
915
Then you can retrieve the ImDrawList* via GetWindowDrawList() and draw to it in any way you like.
916
916
- You can call ImGui::GetBackgroundDrawList() or ImGui::GetForegroundDrawList() and use those draw list to display
917
- contents behind or over every other imgui windows.
917
+ contents behind or over every other imgui windows (one bg/fg drawlist per viewport) .
918
918
- You can create your own ImDrawList instance. You'll need to initialize them ImGui::GetDrawListSharedData(), or create
919
919
your own ImDrawListSharedData, and then call your rendered code with your own ImDrawList or ImDrawData data.
920
920
@@ -1065,7 +1065,7 @@ static float NavUpdatePageUpPageDown(int allowed_dir_flags);
1065
1065
static inline void NavUpdateAnyRequestFlag ();
1066
1066
static void NavProcessItem (ImGuiWindow* window, const ImRect& nav_bb, ImGuiID id);
1067
1067
static ImVec2 NavCalcPreferredRefPos ();
1068
- static void NavSaveLastChildNavWindow (ImGuiWindow* nav_window);
1068
+ static void NavSaveLastChildNavWindowIntoParent (ImGuiWindow* nav_window);
1069
1069
static ImGuiWindow* NavRestoreLastChildNavWindow (ImGuiWindow* window);
1070
1070
1071
1071
// Misc
@@ -3609,6 +3609,7 @@ void ImGui::NewFrame()
3609
3609
{
3610
3610
ImGuiWindow* window = g.Windows [i];
3611
3611
window->WasActive = window->Active ;
3612
+ window->BeginCount = 0 ;
3612
3613
window->Active = false ;
3613
3614
window->WriteAccessed = false ;
3614
3615
}
@@ -3791,6 +3792,7 @@ static void AddWindowToDrawData(ImVector<ImDrawList*>* out_render_list, ImGuiWin
3791
3792
}
3792
3793
}
3793
3794
3795
+ // Layer is locked for the root window, however child windows may use a different viewport (e.g. extruding menu)
3794
3796
static void AddRootWindowToDrawData (ImGuiWindow* window)
3795
3797
{
3796
3798
ImGuiContext& g = *GImGui;
@@ -4916,6 +4918,13 @@ static void ImGui::UpdateManualResize(ImGuiWindow* window, const ImVec2& size_au
4916
4918
window->Size = window->SizeFull ;
4917
4919
}
4918
4920
4921
+ static inline void ClampWindowRect (ImGuiWindow* window, const ImRect& rect, const ImVec2& padding)
4922
+ {
4923
+ ImGuiContext& g = *GImGui;
4924
+ ImVec2 size_for_clamping = (g.IO .ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar)) ? ImVec2 (window->Size .x , window->TitleBarHeight ()) : window->Size ;
4925
+ window->Pos = ImMin (rect.Max - padding, ImMax (window->Pos + size_for_clamping, rect.Min + padding) - size_for_clamping);
4926
+ }
4927
+
4919
4928
static void ImGui::RenderOuterBorders (ImGuiWindow* window)
4920
4929
{
4921
4930
ImGuiContext& g = *GImGui;
@@ -5002,18 +5011,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5002
5011
const int current_frame = g.FrameCount ;
5003
5012
const bool first_begin_of_the_frame = (window->LastFrameActive != current_frame);
5004
5013
5005
- // Update Flags, LastFrameActive, BeginOrderXXX fields
5006
- if (first_begin_of_the_frame)
5007
- window->Flags = (ImGuiWindowFlags)flags;
5008
- else
5009
- flags = window->Flags ;
5010
-
5011
- // Parent window is latched only on the first call to Begin() of the frame, so further append-calls can be done from a different window stack
5012
- ImGuiWindow* parent_window_in_stack = g.CurrentWindowStack .empty () ? NULL : g.CurrentWindowStack .back ();
5013
- ImGuiWindow* parent_window = first_begin_of_the_frame ? ((flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup)) ? parent_window_in_stack : NULL ) : window->ParentWindow ;
5014
- IM_ASSERT (parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow));
5015
- window->HasCloseButton = (p_open != NULL );
5016
-
5017
5014
// Update the Appearing flag
5018
5015
bool window_just_activated_by_user = (window->LastFrameActive < current_frame - 1 ); // Not using !WasActive because the implicit "Debug" window would always toggle off->on
5019
5016
const bool window_just_appearing_after_hidden_for_resize = (window->HiddenFramesCannotSkipItems > 0 );
@@ -5027,9 +5024,28 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5027
5024
if (window->Appearing )
5028
5025
SetWindowConditionAllowFlags (window, ImGuiCond_Appearing, true );
5029
5026
5027
+ // Update Flags, LastFrameActive, BeginOrderXXX fields
5028
+ if (first_begin_of_the_frame)
5029
+ {
5030
+ window->Flags = (ImGuiWindowFlags)flags;
5031
+ window->LastFrameActive = current_frame;
5032
+ window->BeginOrderWithinParent = 0 ;
5033
+ window->BeginOrderWithinContext = (short )(g.WindowsActiveCount ++);
5034
+ }
5035
+ else
5036
+ {
5037
+ flags = window->Flags ;
5038
+ }
5039
+
5040
+ // Parent window is latched only on the first call to Begin() of the frame, so further append-calls can be done from a different window stack
5041
+ ImGuiWindow* parent_window_in_stack = g.CurrentWindowStack .empty () ? NULL : g.CurrentWindowStack .back ();
5042
+ ImGuiWindow* parent_window = first_begin_of_the_frame ? ((flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup)) ? parent_window_in_stack : NULL ) : window->ParentWindow ;
5043
+ IM_ASSERT (parent_window != NULL || !(flags & ImGuiWindowFlags_ChildWindow));
5044
+
5030
5045
// Add to stack
5046
+ // We intentionally set g.CurrentWindow to NULL to prevent usage until when the viewport is set, then will call SetCurrentWindow()
5031
5047
g.CurrentWindowStack .push_back (window);
5032
- SetCurrentWindow (window) ;
5048
+ g. CurrentWindow = NULL ;
5033
5049
CheckStacksSize (window, true );
5034
5050
if (flags & ImGuiWindowFlags_Popup)
5035
5051
{
@@ -5093,11 +5109,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5093
5109
UpdateWindowParentAndRootLinks (window, flags, parent_window);
5094
5110
5095
5111
window->Active = true ;
5096
- window->BeginOrderWithinParent = 0 ;
5097
- window->BeginOrderWithinContext = (short )(g.WindowsActiveCount ++);
5098
- window->BeginCount = 0 ;
5112
+ window->HasCloseButton = (p_open != NULL );
5099
5113
window->ClipRect = ImVec4 (-FLT_MAX,-FLT_MAX,+FLT_MAX,+FLT_MAX);
5100
- window->LastFrameActive = current_frame;
5101
5114
window->IDStack .resize (1 );
5102
5115
5103
5116
// Update stored window name when it changes (which can _only_ happen with the "###" operator, so the ID would stay unchanged).
@@ -5143,7 +5156,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5143
5156
SetCurrentWindow (window);
5144
5157
5145
5158
// Lock border size and padding for the frame (so that altering them doesn't cause inconsistencies)
5146
- window->WindowBorderSize = (flags & ImGuiWindowFlags_ChildWindow) ? style.ChildBorderSize : ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupBorderSize : style.WindowBorderSize ;
5159
+ if (flags & ImGuiWindowFlags_ChildWindow)
5160
+ window->WindowBorderSize = style.ChildBorderSize ;
5161
+ else
5162
+ window->WindowBorderSize = ((flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_Tooltip)) && !(flags & ImGuiWindowFlags_Modal)) ? style.PopupBorderSize : style.WindowBorderSize ;
5147
5163
window->WindowPadding = style.WindowPadding ;
5148
5164
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & (ImGuiWindowFlags_AlwaysUseWindowPadding | ImGuiWindowFlags_Popup)) && window->WindowBorderSize == 0 .0f )
5149
5165
window->WindowPadding = ImVec2 (0 .0f , (flags & ImGuiWindowFlags_MenuBar) ? style.WindowPadding .y : 0 .0f );
@@ -5247,14 +5263,13 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5247
5263
5248
5264
// Clamp position so it stays visible
5249
5265
// Ignore zero-sized display explicitly to avoid losing positions if a window manager reports zero-sized window when initializing or minimizing.
5266
+ ImRect viewport_rect (GetViewportRect ());
5250
5267
if (!window_pos_set_by_api && !(flags & ImGuiWindowFlags_ChildWindow) && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0 )
5251
5268
{
5252
5269
if (g.IO .DisplaySize .x > 0 .0f && g.IO .DisplaySize .y > 0 .0f ) // Ignore zero-sized display explicitly to avoid losing positions if a window manager reports zero-sized window when initializing or minimizing.
5253
5270
{
5254
- ImVec2 padding = ImMax (style.DisplayWindowPadding , style.DisplaySafeAreaPadding );
5255
- ImVec2 size_for_clamping = ((g.IO .ConfigWindowsMoveFromTitleBarOnly ) && !(window->Flags & ImGuiWindowFlags_NoTitleBar)) ? ImVec2 (window->Size .x , window->TitleBarHeight ()) : window->Size ;
5256
- window->Pos = ImMax (window->Pos + size_for_clamping, padding) - size_for_clamping;
5257
- window->Pos = ImMin (window->Pos , g.IO .DisplaySize - padding);
5271
+ ImVec2 clamp_padding = ImMax (style.DisplayWindowPadding , style.DisplaySafeAreaPadding );
5272
+ ClampWindowRect (window, viewport_rect, clamp_padding);
5258
5273
}
5259
5274
}
5260
5275
window->Pos = ImFloor (window->Pos );
@@ -5297,7 +5312,6 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5297
5312
window->DrawList ->Clear ();
5298
5313
window->DrawList ->Flags = (g.Style .AntiAliasedLines ? ImDrawListFlags_AntiAliasedLines : 0 ) | (g.Style .AntiAliasedFill ? ImDrawListFlags_AntiAliasedFill : 0 );
5299
5314
window->DrawList ->PushTextureID (g.Font ->ContainerAtlas ->TexID );
5300
- ImRect viewport_rect (GetViewportRect ());
5301
5315
if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup) && !window_is_child_tooltip)
5302
5316
PushClipRect (parent_window->ClipRect .Min , parent_window->ClipRect .Max , true );
5303
5317
else
@@ -5364,7 +5378,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5364
5378
{
5365
5379
ImRect menu_bar_rect = window->MenuBarRect ();
5366
5380
menu_bar_rect.ClipWith (window->Rect ()); // Soft clipping, in particular child window don't have minimum size covering the menu bar so this is useful for them.
5367
- window->DrawList ->AddRectFilled (menu_bar_rect.Min , menu_bar_rect.Max , GetColorU32 (ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0 .0f , ImDrawCornerFlags_Top);
5381
+ window->DrawList ->AddRectFilled (menu_bar_rect.Min + ImVec2 (window_border_size, 0 ), menu_bar_rect.Max - ImVec2 (window_border_size, 0 ) , GetColorU32 (ImGuiCol_MenuBarBg), (flags & ImGuiWindowFlags_NoTitleBar) ? window_rounding : 0 .0f , ImDrawCornerFlags_Top);
5368
5382
if (style.FrameBorderSize > 0 .0f && menu_bar_rect.Max .y < window->Pos .y + window->Size .y )
5369
5383
window->DrawList ->AddLine (menu_bar_rect.GetBL (), menu_bar_rect.GetBR (), GetColorU32 (ImGuiCol_Border), style.FrameBorderSize );
5370
5384
}
@@ -5485,9 +5499,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5485
5499
// Close button
5486
5500
if (p_open != NULL )
5487
5501
{
5488
- const float pad = style.FramePadding .y ;
5489
5502
const float rad = g.FontSize * 0 .5f ;
5490
- if (CloseButton (window->GetID (" #CLOSE" ), window->Rect (). GetTR () + ImVec2 (-pad - rad, pad + rad), rad + 1 ))
5503
+ if (CloseButton (window->GetID (" #CLOSE" ), ImVec2 ( window->Pos . x + window-> Size . x - style. FramePadding . x - rad, window-> Pos . y + style. FramePadding . y + rad), rad + 1 ))
5491
5504
*p_open = false ;
5492
5505
}
5493
5506
@@ -5547,7 +5560,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5547
5560
window->InnerClipRect .Max .x = ImFloor (0 .5f + window->InnerMainRect .Max .x - ImMax (0 .0f , ImFloor (window->WindowPadding .x *0 .5f - window->WindowBorderSize )));
5548
5561
window->InnerClipRect .Max .y = ImFloor (0 .5f + window->InnerMainRect .Max .y );
5549
5562
5550
- // We fill last item data based on Title Bar, in order for IsItemHovered() and IsItemActive() to be usable after Begin().
5563
+ // We fill last item data based on Title Bar/Tab , in order for IsItemHovered() and IsItemActive() to be usable after Begin().
5551
5564
// This is useful to allow creating context menus on title bar only, etc.
5552
5565
window->DC .LastItemId = window->MoveId ;
5553
5566
window->DC .LastItemStatusFlags = IsMouseHoveringRect (title_bar_rect.Min , title_bar_rect.Max , false ) ? ImGuiItemStatusFlags_HoveredRect : 0 ;
@@ -5557,6 +5570,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
5557
5570
IMGUI_TEST_ENGINE_ITEM_ADD (window->DC .LastItemRect , window->DC .LastItemId );
5558
5571
#endif
5559
5572
}
5573
+ else
5574
+ {
5575
+ // Append
5576
+ SetCurrentWindow (window);
5577
+ }
5560
5578
5561
5579
PushClipRect (window->InnerClipRect .Min , window->InnerClipRect .Max , true );
5562
5580
@@ -7126,14 +7144,6 @@ bool ImGui::BeginPopupContextVoid(const char* str_id, int mouse_button)
7126
7144
return BeginPopupEx (id, ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings);
7127
7145
}
7128
7146
7129
- ImRect ImGui::GetWindowAllowedExtentRect (ImGuiWindow*)
7130
- {
7131
- ImVec2 padding = GImGui->Style .DisplaySafeAreaPadding ;
7132
- ImRect r_screen = GetViewportRect ();
7133
- r_screen.Expand (ImVec2 ((r_screen.GetWidth () > padding.x * 2 ) ? -padding.x : 0 .0f , (r_screen.GetHeight () > padding.y * 2 ) ? -padding.y : 0 .0f ));
7134
- return r_screen;
7135
- }
7136
-
7137
7147
// r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.)
7138
7148
// r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it.
7139
7149
ImVec2 ImGui::FindBestWindowPosForPopupEx (const ImVec2& ref_pos, const ImVec2& size, ImGuiDir* last_dir, const ImRect& r_outer, const ImRect& r_avoid, ImGuiPopupPositionPolicy policy)
@@ -7189,6 +7199,15 @@ ImVec2 ImGui::FindBestWindowPosForPopupEx(const ImVec2& ref_pos, const ImVec2& s
7189
7199
return pos;
7190
7200
}
7191
7201
7202
+ ImRect ImGui::GetWindowAllowedExtentRect (ImGuiWindow* window)
7203
+ {
7204
+ IM_UNUSED (window);
7205
+ ImVec2 padding = GImGui->Style .DisplaySafeAreaPadding ;
7206
+ ImRect r_screen = GetViewportRect ();
7207
+ r_screen.Expand (ImVec2 ((r_screen.GetWidth () > padding.x * 2 ) ? -padding.x : 0 .0f , (r_screen.GetHeight () > padding.y * 2 ) ? -padding.y : 0 .0f ));
7208
+ return r_screen;
7209
+ }
7210
+
7192
7211
ImVec2 ImGui::FindBestWindowPosForPopup (ImGuiWindow* window)
7193
7212
{
7194
7213
ImGuiContext& g = *GImGui;
@@ -7530,7 +7549,9 @@ void ImGui::NavMoveRequestTryWrapping(ImGuiWindow* window, ImGuiNavMoveFlags mov
7530
7549
}
7531
7550
}
7532
7551
7533
- static void ImGui::NavSaveLastChildNavWindow (ImGuiWindow* nav_window)
7552
+ // FIXME: This could be replaced by updating a frame number in each window when (window == NavWindow) and (NavLayer == 0).
7553
+ // This way we could find the last focused window among our children. It would be much less confusing this way?
7554
+ static void ImGui::NavSaveLastChildNavWindowIntoParent (ImGuiWindow* nav_window)
7534
7555
{
7535
7556
ImGuiWindow* parent_window = nav_window;
7536
7557
while (parent_window && (parent_window->Flags & ImGuiWindowFlags_ChildWindow) != 0 && (parent_window->Flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_ChildMenu)) == 0 )
@@ -7539,7 +7560,8 @@ static void ImGui::NavSaveLastChildNavWindow(ImGuiWindow* nav_window)
7539
7560
parent_window->NavLastChildNavWindow = nav_window;
7540
7561
}
7541
7562
7542
- // Call when we are expected to land on Layer 0 after FocusWindow()
7563
+ // Restore the last focused child.
7564
+ // Call when we are expected to land on the Main Layer (0) after FocusWindow()
7543
7565
static ImGuiWindow* ImGui::NavRestoreLastChildNavWindow (ImGuiWindow* window)
7544
7566
{
7545
7567
return window->NavLastChildNavWindow ? window->NavLastChildNavWindow : window;
@@ -7767,7 +7789,7 @@ static void ImGui::NavUpdate()
7767
7789
7768
7790
// Store our return window (for returning from Layer 1 to Layer 0) and clear it as soon as we step back in our own Layer 0
7769
7791
if (g.NavWindow )
7770
- NavSaveLastChildNavWindow (g.NavWindow );
7792
+ NavSaveLastChildNavWindowIntoParent (g.NavWindow );
7771
7793
if (g.NavWindow && g.NavWindow ->NavLastChildNavWindow != NULL && g.NavLayer == 0 )
7772
7794
g.NavWindow ->NavLastChildNavWindow = NULL ;
7773
7795
@@ -8166,7 +8188,9 @@ static void ImGui::NavUpdateWindowing()
8166
8188
8167
8189
// Keyboard: Press and Release ALT to toggle menu layer
8168
8190
// FIXME: We lack an explicit IO variable for "is the imgui window focused", so compare mouse validity to detect the common case of back-end clearing releases all keys on ALT-TAB
8169
- if ((g.ActiveId == 0 || g.ActiveIdAllowOverlap ) && IsNavInputPressed (ImGuiNavInput_KeyMenu_, ImGuiInputReadMode_Released))
8191
+ if (IsNavInputPressed (ImGuiNavInput_KeyMenu_, ImGuiInputReadMode_Pressed))
8192
+ g.NavWindowingToggleLayer = true ;
8193
+ if ((g.ActiveId == 0 || g.ActiveIdAllowOverlap ) && g.NavWindowingToggleLayer && IsNavInputPressed (ImGuiNavInput_KeyMenu_, ImGuiInputReadMode_Released))
8170
8194
if (IsMousePosValid (&g.IO .MousePos ) == IsMousePosValid (&g.IO .MousePosPrev ))
8171
8195
apply_toggle_layer = true ;
8172
8196
@@ -8212,7 +8236,8 @@ static void ImGui::NavUpdateWindowing()
8212
8236
{
8213
8237
// Move to parent menu if necessary
8214
8238
ImGuiWindow* new_nav_window = g.NavWindow ;
8215
- while ((new_nav_window->DC .NavLayerActiveMask & (1 << 1 )) == 0
8239
+ while (new_nav_window->ParentWindow
8240
+ && (new_nav_window->DC .NavLayerActiveMask & (1 << ImGuiNavLayer_Menu)) == 0
8216
8241
&& (new_nav_window->Flags & ImGuiWindowFlags_ChildWindow) != 0
8217
8242
&& (new_nav_window->Flags & (ImGuiWindowFlags_Popup | ImGuiWindowFlags_ChildMenu)) == 0 )
8218
8243
new_nav_window = new_nav_window->ParentWindow ;
@@ -8224,7 +8249,10 @@ static void ImGui::NavUpdateWindowing()
8224
8249
}
8225
8250
g.NavDisableHighlight = false ;
8226
8251
g.NavDisableMouseHover = true ;
8227
- NavRestoreLayer ((g.NavWindow ->DC .NavLayerActiveMask & (1 << ImGuiNavLayer_Menu)) ? (ImGuiNavLayer)((int )g.NavLayer ^ 1 ) : ImGuiNavLayer_Main);
8252
+
8253
+ // When entering a regular menu bar with the Alt key, we always reinitialize the navigation ID.
8254
+ const ImGuiNavLayer new_nav_layer = (g.NavWindow ->DC .NavLayerActiveMask & (1 << ImGuiNavLayer_Menu)) ? (ImGuiNavLayer)((int )g.NavLayer ^ 1 ) : ImGuiNavLayer_Main;
8255
+ NavRestoreLayer (new_nav_layer);
8228
8256
}
8229
8257
}
8230
8258
@@ -9515,7 +9543,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
9515
9543
}
9516
9544
ImDrawIdx* idx_buffer = (draw_list->IdxBuffer .Size > 0 ) ? draw_list->IdxBuffer .Data : NULL ;
9517
9545
bool pcmd_node_open = ImGui::TreeNode ((void *)(pcmd - draw_list->CmdBuffer .begin ()), " Draw %4d %s vtx, tex 0x%p, clip_rect (%4.0f,%4.0f)-(%4.0f,%4.0f)" , pcmd->ElemCount , draw_list->IdxBuffer .Size > 0 ? " indexed" : " non-indexed" , pcmd->TextureId , pcmd->ClipRect .x , pcmd->ClipRect .y , pcmd->ClipRect .z , pcmd->ClipRect .w );
9518
- if (show_draw_cmd_clip_rects && ImGui::IsItemHovered ())
9546
+ if (show_draw_cmd_clip_rects && fg_draw_list && ImGui::IsItemHovered ())
9519
9547
{
9520
9548
ImRect clip_rect = pcmd->ClipRect ;
9521
9549
ImRect vtxs_rect;
@@ -9544,7 +9572,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
9544
9572
(n == 0 ) ? " idx" : " " , idx_i, v.pos .x , v.pos .y , v.uv .x , v.uv .y , v.col );
9545
9573
}
9546
9574
ImGui::Selectable (buf, false );
9547
- if (ImGui::IsItemHovered ())
9575
+ if (fg_draw_list && ImGui::IsItemHovered ())
9548
9576
{
9549
9577
ImDrawListFlags backup_flags = fg_draw_list->Flags ;
9550
9578
fg_draw_list->Flags &= ~ImDrawListFlags_AntiAliasedLines; // Disable AA on triangle outlines at is more readable for very large and thin triangles.
0 commit comments