mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-30 20:51:06 +01:00 
			
		
		
		
	Demo: Removed the color button from the context menu example because it is misleading now that our color widget have tooltip/context menus themselves. (#346)
This commit is contained in:
		| @@ -1317,15 +1317,17 @@ void ImGui::ShowTestWindow(bool* p_open) | |||||||
|             { |             { | ||||||
|                 if (ImGui::Selectable("Set to zero")) value = 0.0f; |                 if (ImGui::Selectable("Set to zero")) value = 0.0f; | ||||||
|                 if (ImGui::Selectable("Set to PI")) value = 3.1415f; |                 if (ImGui::Selectable("Set to PI")) value = 3.1415f; | ||||||
|  |                 ImGui::DragFloat("Value", &value, 0.1f, 0.0f, 0.0f); | ||||||
|                 ImGui::EndPopup(); |                 ImGui::EndPopup(); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             static ImVec4 color = ImColor(0.8f, 0.5f, 1.0f, 1.0f); |             static char name[32] = "Label1"; | ||||||
|             ImGui::ColorButton("##color", color); |             char buf[64]; sprintf(buf, "Button: %s###Button", name); // ### operator override ID ignoring the preceeding label | ||||||
|             if (ImGui::BeginPopupContextItem("color context menu")) |             ImGui::Button(buf); | ||||||
|  |             if (ImGui::BeginPopupContextItem("rename context menu")) | ||||||
|             { |             { | ||||||
|                 ImGui::Text("Edit color"); |                 ImGui::Text("Edit name:"); | ||||||
|                 ImGui::ColorEdit3("##edit", (float*)&color); |                 ImGui::InputText("##edit", name, IM_ARRAYSIZE(name)); | ||||||
|                 if (ImGui::Button("Close")) |                 if (ImGui::Button("Close")) | ||||||
|                     ImGui::CloseCurrentPopup(); |                     ImGui::CloseCurrentPopup(); | ||||||
|                 ImGui::EndPopup(); |                 ImGui::EndPopup(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user