Demo: Custom Rendering: enable LiveEdit. Tweaks.

This commit is contained in:
ocornut
2026-07-30 16:12:31 +02:00
parent e47e6b0d9d
commit ffbf21af6b

View File

@@ -10265,6 +10265,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
{
IMGUI_DEMO_MARKER("Examples/Custom rendering/Primitives");
ImGui::PushItemWidth(-ImGui::GetFontSize() * 15);
ImGui::PushItemFlag(ImGuiItemFlags_LiveEditOnInput, true);
ImDrawList* draw_list = ImGui::GetWindowDrawList();
// Draw gradients
@@ -10291,7 +10292,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
// Draw a bunch of primitives
ImGui::Text("All primitives");
static float sz = 36.0f;
static float sz = 42.0f;
static float thickness = 3.0f;
static int ngon_sides = 6;
static bool circle_segments_override = false;
@@ -10385,6 +10386,7 @@ static void ShowExampleAppCustomRendering(bool* p_open)
x += sz + spacing;
ImGui::Dummy(ImVec2((sz + spacing) * 13.2f, (sz + spacing) * 3.0f));
ImGui::PopItemFlag();
ImGui::PopItemWidth();
ImGui::EndTabItem();
}