mirror of
https://github.com/ocornut/imgui.git
synced 2026-07-31 12:49:15 +00:00
Demo: Custom Rendering: enable LiveEdit. Tweaks.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user