mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Merge branch 'master' into navigation
# Conflicts: # imgui.cpp # imgui_internal.h
This commit is contained in:
		| @@ -98,9 +98,9 @@ See the [Screenshots Thread](https://github.com/ocornut/imgui/issues/123) for so | |||||||
|  |  | ||||||
| [](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v148/profiler.png) | [](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v148/profiler.png) | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										28
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								imgui.cpp
									
									
									
									
									
								
							| @@ -10059,19 +10059,23 @@ bool ImGui::BeginMenu(const char* label, bool enabled) | |||||||
|             g.NavMoveRequest = false; |             g.NavMoveRequest = false; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (menu_is_open && pressed && menuset_is_open) // Menu bar: click an open menu again to close it |     else | ||||||
|     { |     { | ||||||
|         want_close = true; |         // Menu bar | ||||||
|         want_open = menu_is_open = false; |         if (menu_is_open && pressed && menuset_is_open) // Click an open menu again to close it | ||||||
|     } |         { | ||||||
|     else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // Menu bar: first click to open, then hover to open others |             want_close = true; | ||||||
|     { |             want_open = menu_is_open = false; | ||||||
|         want_open = true; |         } | ||||||
|     } |         else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // First click to open, then hover to open others | ||||||
|     else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Menu bar: Nav-Down to open |         { | ||||||
|     { |             want_open = true; | ||||||
|         g.NavMoveRequest = false; |         } | ||||||
|         want_open = true; |         else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Nav-Down to open | ||||||
|  |         { | ||||||
|  |             g.NavMoveRequest = false; | ||||||
|  |             want_open = true; | ||||||
|  |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }' |     if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }' | ||||||
|   | |||||||
| @@ -178,7 +178,7 @@ enum ImGuiButtonFlags_ | |||||||
|     ImGuiButtonFlags_FlattenChilds          = 1 << 5,   // allow interactions even if a child window is overlapping |     ImGuiButtonFlags_FlattenChilds          = 1 << 5,   // allow interactions even if a child window is overlapping | ||||||
|     ImGuiButtonFlags_DontClosePopups        = 1 << 6,   // disable automatically closing parent popup on press // [UNUSED] |     ImGuiButtonFlags_DontClosePopups        = 1 << 6,   // disable automatically closing parent popup on press // [UNUSED] | ||||||
|     ImGuiButtonFlags_Disabled               = 1 << 7,   // disable interactions |     ImGuiButtonFlags_Disabled               = 1 << 7,   // disable interactions | ||||||
|     ImGuiButtonFlags_AlignTextBaseLine      = 1 << 8,   // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled SmallButton(), not possible currently because of DC.CursorPosPrevLine |     ImGuiButtonFlags_AlignTextBaseLine      = 1 << 8,   // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine | ||||||
|     ImGuiButtonFlags_NoKeyModifiers         = 1 << 9,   // disable interaction if a key modifier is held |     ImGuiButtonFlags_NoKeyModifiers         = 1 << 9,   // disable interaction if a key modifier is held | ||||||
|     ImGuiButtonFlags_AllowOverlapMode       = 1 << 10,  // require previous frame HoveredId to either match id or be null before being usable |     ImGuiButtonFlags_AllowOverlapMode       = 1 << 10,  // require previous frame HoveredId to either match id or be null before being usable | ||||||
|     ImGuiButtonFlags_NoNavOverride          = 1 << 11   // don't override navigation id when activated |     ImGuiButtonFlags_NoNavOverride          = 1 << 11   // don't override navigation id when activated | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user