Demonstrate create a simple property editor.
| 6909 | |
| 6910 | // Demonstrate create a simple property editor. |
| 6911 | static void ShowExampleAppPropertyEditor(bool* p_open) |
| 6912 | { |
| 6913 | ImGui::SetNextWindowSize(ImVec2(430, 450), ImGuiCond_FirstUseEver); |
| 6914 | if (!ImGui::Begin("Example: Property editor", p_open)) |
| 6915 | { |
| 6916 | ImGui::End(); |
| 6917 | return; |
| 6918 | } |
| 6919 | |
| 6920 | HelpMarker( |
| 6921 | "This example shows how you may implement a property editor using two columns.\n" |
| 6922 | "All objects/fields data are dummies here.\n" |
| 6923 | "Remember that in many simple cases, you can use ImGui::SameLine(xxx) to position\n" |
| 6924 | "your cursor horizontally instead of using the Columns() API."); |
| 6925 | |
| 6926 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2)); |
| 6927 | if (ImGui::BeginTable("split", 2, ImGuiTableFlags_BordersOuter | ImGuiTableFlags_Resizable)) |
| 6928 | { |
| 6929 | // Iterate placeholder objects (all the same data) |
| 6930 | for (int obj_i = 0; obj_i < 4; obj_i++) |
| 6931 | { |
| 6932 | ShowPlaceholderObject("Object", obj_i); |
| 6933 | //ImGui::Separator(); |
| 6934 | } |
| 6935 | ImGui::EndTable(); |
| 6936 | } |
| 6937 | ImGui::PopStyleVar(); |
| 6938 | ImGui::End(); |
| 6939 | } |
| 6940 | |
| 6941 | //----------------------------------------------------------------------------- |
| 6942 | // [SECTION] Example App: Long Text / ShowExampleAppLongText() |
no test coverage detected