mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Merge branch 'master' into docking
# Conflicts: # imgui.cpp # imgui_internal.h
This commit is contained in:
		| @@ -1668,7 +1668,7 @@ static void ShowDemoWindowWidgets() | ||||
|     { | ||||
|         // Submit an item (various types available) so we can query their status in the following block. | ||||
|         static int item_type = 1; | ||||
|         ImGui::Combo("Item Type", &item_type, "Text\0Button\0Button (w/ repeat)\0Checkbox\0SliderFloat\0InputText\0InputFloat\0InputFloat3\0ColorEdit4\0MenuItem\0TreeNode (w/ double-click)\0ListBox\0"); | ||||
|         ImGui::Combo("Item Type", &item_type, "Text\0Button\0Button (w/ repeat)\0Checkbox\0SliderFloat\0InputText\0InputFloat\0InputFloat3\0ColorEdit4\0MenuItem\0TreeNode\0TreeNode (w/ double-click)\0ListBox\0", 20); | ||||
|         ImGui::SameLine(); | ||||
|         HelpMarker("Testing how various types of items are interacting with the IsItemXXX functions."); | ||||
|         bool ret = false; | ||||
| @@ -1685,8 +1685,9 @@ static void ShowDemoWindowWidgets() | ||||
|         if (item_type == 7) { ret = ImGui::InputFloat3("ITEM: InputFloat3", col4f); }                   // Testing multi-component items (IsItemXXX flags are reported merged) | ||||
|         if (item_type == 8) { ret = ImGui::ColorEdit4("ITEM: ColorEdit4", col4f); }                     // Testing multi-component items (IsItemXXX flags are reported merged) | ||||
|         if (item_type == 9) { ret = ImGui::MenuItem("ITEM: MenuItem"); }                                // Testing menu item (they use ImGuiButtonFlags_PressedOnRelease button policy) | ||||
|         if (item_type == 10){ ret = ImGui::TreeNodeEx("ITEM: TreeNode w/ ImGuiTreeNodeFlags_OpenOnDoubleClick", ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_NoTreePushOnOpen); } // Testing tree node with ImGuiButtonFlags_PressedOnDoubleClick button policy. | ||||
|         if (item_type == 11){ const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi" }; static int current = 1; ret = ImGui::ListBox("ITEM: ListBox", ¤t, items, IM_ARRAYSIZE(items), IM_ARRAYSIZE(items)); } | ||||
|         if (item_type == 10){ ret = ImGui::TreeNode("ITEM: TreeNode"); if (ret) ImGui::TreePop(); }     // Testing tree node | ||||
|         if (item_type == 11){ ret = ImGui::TreeNodeEx("ITEM: TreeNode w/ ImGuiTreeNodeFlags_OpenOnDoubleClick", ImGuiTreeNodeFlags_OpenOnDoubleClick | ImGuiTreeNodeFlags_NoTreePushOnOpen); } // Testing tree node with ImGuiButtonFlags_PressedOnDoubleClick button policy. | ||||
|         if (item_type == 12){ const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi" }; static int current = 1; ret = ImGui::ListBox("ITEM: ListBox", ¤t, items, IM_ARRAYSIZE(items), IM_ARRAYSIZE(items)); } | ||||
|  | ||||
|         // Display the value of IsItemHovered() and other common item state functions. | ||||
|         // Note that the ImGuiHoveredFlags_XXX flags can be combined. | ||||
| @@ -1707,6 +1708,7 @@ static void ShowDemoWindowWidgets() | ||||
|             "IsItemDeactivatedAfterEdit() = %d\n" | ||||
|             "IsItemVisible() = %d\n" | ||||
|             "IsItemClicked() = %d\n" | ||||
|             "IsItemToggledOpen() = %d\n" | ||||
|             "GetItemRectMin() = (%.1f, %.1f)\n" | ||||
|             "GetItemRectMax() = (%.1f, %.1f)\n" | ||||
|             "GetItemRectSize() = (%.1f, %.1f)", | ||||
| @@ -1724,6 +1726,7 @@ static void ShowDemoWindowWidgets() | ||||
|             ImGui::IsItemDeactivatedAfterEdit(), | ||||
|             ImGui::IsItemVisible(), | ||||
|             ImGui::IsItemClicked(), | ||||
|             ImGui::IsItemToggledOpen(), | ||||
|             ImGui::GetItemRectMin().x, ImGui::GetItemRectMin().y, | ||||
|             ImGui::GetItemRectMax().x, ImGui::GetItemRectMax().y, | ||||
|             ImGui::GetItemRectSize().x, ImGui::GetItemRectSize().y | ||||
|   | ||||
		Reference in New Issue
	
	Block a user