mirror of
https://github.com/ocornut/imgui.git
synced 2026-11-06 06:25:54 +01:00
Demo: Custom Rendering: enable LiveEdit. Tweaks.
This commit is contained in:
parent
e47e6b0d9d
commit
ffbf21af6b
@ -10265,6 +10265,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
|
|||||||
{
|
{
|
||||||
IMGUI_DEMO_MARKER("Examples/Custom rendering/Primitives");
|
IMGUI_DEMO_MARKER("Examples/Custom rendering/Primitives");
|
||||||
ImGui::PushItemWidth(-ImGui::GetFontSize() * 15);
|
ImGui::PushItemWidth(-ImGui::GetFontSize() * 15);
|
||||||
|
ImGui::PushItemFlag(ImGuiItemFlags_LiveEditOnInput, true);
|
||||||
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
ImDrawList* draw_list = ImGui::GetWindowDrawList();
|
||||||
|
|
||||||
// Draw gradients
|
// Draw gradients
|
||||||
@ -10291,7 +10292,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
|
|||||||
|
|
||||||
// Draw a bunch of primitives
|
// Draw a bunch of primitives
|
||||||
ImGui::Text("All primitives");
|
ImGui::Text("All primitives");
|
||||||
static float sz = 36.0f;
|
static float sz = 42.0f;
|
||||||
static float thickness = 3.0f;
|
static float thickness = 3.0f;
|
||||||
static int ngon_sides = 6;
|
static int ngon_sides = 6;
|
||||||
static bool circle_segments_override = false;
|
static bool circle_segments_override = false;
|
||||||
@ -10385,6 +10386,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
|
|||||||
x += sz + spacing;
|
x += sz + spacing;
|
||||||
|
|
||||||
ImGui::Dummy(ImVec2((sz + spacing) * 13.2f, (sz + spacing) * 3.0f));
|
ImGui::Dummy(ImVec2((sz + spacing) * 13.2f, (sz + spacing) * 3.0f));
|
||||||
|
ImGui::PopItemFlag();
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user