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) | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
							
								
								
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							| @@ -10059,20 +10059,24 @@ bool ImGui::BeginMenu(const char* label, bool enabled) | ||||
|             g.NavMoveRequest = false; | ||||
|         } | ||||
|     } | ||||
|     else if (menu_is_open && pressed && menuset_is_open) // Menu bar: click an open menu again to close it | ||||
|     else | ||||
|     { | ||||
|         // Menu bar | ||||
|         if (menu_is_open && pressed && menuset_is_open) // Click an open menu again to close it | ||||
|         { | ||||
|             want_close = true; | ||||
|             want_open = menu_is_open = false; | ||||
|         } | ||||
|     else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // Menu bar: first click to open, then hover to open others | ||||
|         else if (pressed || (hovered && menuset_is_open && !menu_is_open)) // First click to open, then hover to open others | ||||
|         { | ||||
|             want_open = true; | ||||
|         } | ||||
|     else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Menu bar: Nav-Down to open | ||||
|         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.. }' | ||||
|         want_close = true; | ||||
|   | ||||
| @@ -178,7 +178,7 @@ enum ImGuiButtonFlags_ | ||||
|     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_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_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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user