playground/ExampleApps/ExampleAppPropertyEditor.cpp
// Demonstrate create a simple property editor.
Demonstrate create a simple property editor.
Demonstrate create a simple property editor .
static void ShowExampleAppPropertyEditor(bool* p_open)
{
    ImGui::SetNextWindowSize(ImVec2(430, 450), ImGuiCond_FirstUseEver);
    if (!ImGui::Begin("Example: Property editor", p_open))
    {
        ImGui::End();
        return;
    }
    DEMO_MARKER("Examples/Property Editor");
    HelpMarker(
        "This example shows how you may implement a property editor using two columns.\n"
        "All objects/fields data are dummies here.\n"
        "Remember that in many simple cases, you can use ImGui::SameLine(xxx) to position\n"
        "your cursor horizontally instead of using the Columns() API.");
    ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2));
    if (ImGui::BeginTable("split", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable))
    {
        for (int obj_i = 0; obj_i < 4; obj_i++)
        {
            ShowPlaceholderObject("Object", obj_i);
        }
        ImGui::EndTable();
    }
    ImGui::PopStyleVar();
    ImGui::End();
}
static void ShowExampleAppPropertyEditor ( bool * p_open ) { ImGui :: SetNextWindowSize ( ImVec2 ( 430 , 450 ) , ImGuiCond_FirstUseEver ) ; if ( ! ImGui :: Begin ( " " , p_open ) ) { ImGui :: End ( ) ; return ; } DEMO_MARKER ( " " ) ; HelpMarker ( " \n " " \n " " \n " " " ) ; ImGui :: PushStyleVar ( ImGuiStyleVar_FramePadding , ImVec2 ( 2 , 2 ) ) ; if ( ImGui :: BeginTable ( " " , 2 , ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable ) ) { for ( int obj_i = 0 ; obj_i < 4 ; obj_i ++ ) { ShowPlaceholderObject ( " " , obj_i ) ; } ImGui :: EndTable ( ) ; } ImGui :: PopStyleVar ( ) ; ImGui :: End ( ) ; }
Demonstrate create a simple property editor.
Demonstrate create a simple property editor .
// Iterate placeholder objects (all the same data) //ImGui::Separator();