mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-14 23:24:00 +00:00
Demo tweaks
This commit is contained in:
parent
525ef5b357
commit
785f51227a
@ -527,9 +527,10 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool a=false;
|
static int clicked = 0;
|
||||||
if (ImGui::Button("Button")) { printf("Clicked\n"); a ^= 1; }
|
if (ImGui::Button("Button"))
|
||||||
if (a)
|
clicked++;
|
||||||
|
if (clicked & 1)
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Text("Thanks for clicking me!");
|
ImGui::Text("Thanks for clicking me!");
|
||||||
@ -1833,9 +1834,11 @@ static void ShowExampleMenuFile()
|
|||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
static float f = 0.5f;
|
static float f = 0.5f;
|
||||||
static int n = 0;
|
static int n = 0;
|
||||||
|
static bool b = true;
|
||||||
ImGui::SliderFloat("Value", &f, 0.0f, 1.0f);
|
ImGui::SliderFloat("Value", &f, 0.0f, 1.0f);
|
||||||
ImGui::InputFloat("Input", &f, 0.1f);
|
ImGui::InputFloat("Input", &f, 0.1f);
|
||||||
ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0");
|
ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0");
|
||||||
|
ImGui::Checkbox("Check", &b);
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
if (ImGui::BeginMenu("Colors"))
|
if (ImGui::BeginMenu("Colors"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user