Demonstrate create a simple property editor.
| 7088 | |
| 7089 | // Demonstrate create a simple property editor. |
| 7090 | static void ShowExampleAppPropertyEditor(bool* p_open) |
| 7091 | { |
| 7092 | ImGui::SetNextWindowSize(ImVec2(430, 450), ImGuiCond_FirstUseEver); |
| 7093 | if (!ImGui::Begin("Example: Property editor", p_open)) |
| 7094 | { |
| 7095 | ImGui::End(); |
| 7096 | return; |
| 7097 | } |
| 7098 | IMGUI_DEMO_MARKER("Examples/Property Editor"); |
| 7099 | |
| 7100 | HelpMarker( |
| 7101 | "This example shows how you may implement a property editor using two columns.\n" |
| 7102 | "All objects/fields data are dummies here.\n" |
| 7103 | "Remember that in many simple cases, you can use ImGui::SameLine(xxx) to position\n" |
| 7104 | "your cursor horizontally instead of using the Columns() API."); |
| 7105 | |
| 7106 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2)); |
| 7107 | if (ImGui::BeginTable("split", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable)) |
| 7108 | { |
| 7109 | // Iterate placeholder objects (all the same data) |
| 7110 | for (int obj_i = 0; obj_i < 4; obj_i++) |
| 7111 | { |
| 7112 | ShowPlaceholderObject("Object", obj_i); |
| 7113 | //ImGui::Separator(); |
| 7114 | } |
| 7115 | ImGui::EndTable(); |
| 7116 | } |
| 7117 | ImGui::PopStyleVar(); |
| 7118 | ImGui::End(); |
| 7119 | } |
| 7120 | |
| 7121 | //----------------------------------------------------------------------------- |
| 7122 | // [SECTION] Example App: Long Text / ShowExampleAppLongText() |
no test coverage detected