├── .gitignore ├── LICENSE ├── README.md ├── Screenshot's Generated code.txt ├── design_manager.cpp └── design_manager.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Prerequisites 2 | *.d 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | *.smod 22 | 23 | # Compiled Static libraries 24 | *.lai 25 | *.la 26 | *.a 27 | *.lib 28 | 29 | # Executables 30 | *.exe 31 | *.out 32 | *.app 33 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Toikron 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ImGui Visual Design Manager 2 | 3 | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) 4 | 5 | 6 | **ImGui Visual Design Manager is a single-header(cpp - h) C++ library that adds a visual design workflow to Dear ImGui.** 7 | 8 | **It lets you build and arrange UI components interactively—similar to tools like Figma—directly within your ImGui-based application. Designed components can be exported and used as standard ImGui elements with minimal code changes.** 9 | 10 | ![Showcase GIF - Replace with a good GIF showing the editor in action](https://github.com/user-attachments/assets/c978ff4c-dbd3-48d2-8b21-ded9333c2159) 11 | 12 | *(Caption: Visually design shapes, layers, and properties directly within your ImGui application)* 13 | 14 | 15 | --- 16 | 17 | ## Key Features 18 | 19 | * 🎨 **Figma-like Visual Canvas:** 20 | * Design UI layouts using **shapes** (rectangles, circles) with customizable properties (position, size, rotation, corner radius, fill, border, shadow). 21 | * Organize elements using a familiar **layer system** with Z-ordering, visibility, and locking. 22 | * Style elements with solid colors, **gradients** (linear, radial - configurable interpolation), and **embedded images**. 23 | * Add and style **text** elements with font selection, alignment, and rotation. 24 | * 🔗 **Bridge Design and Code:** 25 | * Instantly transform visual shapes into functional **ImGui Buttons** with configurable behavior (Toggle, Hold, SingleClick) and styling (Hover, Clicked colors). 26 | * Attach **ImGui Child Windows** to shapes, allowing you to embed complex ImGui content within your designed layouts. Child windows can optionally sync position/size with their parent shape. 27 | * Trigger standard ImGui windows or custom logic from designed buttons. 28 | * ✨ **Dynamic & Responsive UIs:** 29 | * Create sophisticated **animations** on shapes triggered by clicks or hovers. Define behaviors like play-once, reverse, toggle, loop, and play-while-holding. 30 | * Build complex **chained animations**, sequencing multiple animation steps for intricate UI transitions. 31 | * Implement responsive layouts using **Shape Keys**, automatically adjusting position, size, or rotation based on the parent window's dimensions. 32 | * 🧩 **Modular & Organized Workflow:** 33 | * Manage multiple independent design canvases, each associated with a specific ImGui window (`DesignManager::g_windowsMap`). 34 | * Group buttons and child windows for **exclusive visibility** (e.g., tabbed interfaces). 35 | * Define **logical relationships** between button states and child window visibility (AND, OR, XOR, IF, etc.). 36 | * ⚙️ **Developer Focused:** 37 | * **Built-in Visual Editor:** Use `DesignManager::ShowUI()` to access the powerful editor for real-time design and modification. 38 | * **Code Generation:** Automatically generate C++ code (using a clean Builder pattern) representing your visual designs, ready to be integrated into your project. 39 | * **Single-Header Library:** Easy integration - just drop `design_manager.h` into your project. 40 | * **Parenting System:** Group shapes hierarchically for complex component creation and coordinated transformations. 41 | * * **Easy to Implement SDL, DirectX. Just change in order GLFWwindow* to SDL_Window* and glfwGetWindowSize to SDL_GetWindowSize . Seamless Integration 🧩 42 | ## Why Use ImGui Visual Design Manager? 43 | 44 | * **Rapid Prototyping:** Visually iterate on UI designs much faster than coding them manually. 45 | * **Designer-Friendly:** Empowers developers (and potentially designers) with a visual workflow within the target environment. 46 | * **Seamless Integration:** Designs translate directly to functional ImGui code and widgets. 47 | * **Consistency:** Maintain a consistent look and feel by designing reusable components visually. 48 | * **Dynamic Interfaces:** Easily add complex animations and responsiveness without extensive manual coding. 49 | 50 | ## Visual Examples 51 | 52 | *(These are the images you provided - captions added for context)* 53 | 54 | | | | 55 | |---|---|---| 56 | | | | | 57 | | | | | 58 | | | | | 59 | 60 | ## Getting Started 61 | 62 | ### Installation 63 | 64 | 1. **Clone the repository:** 65 | ```sh 66 | git clone https://github.com/yourusername/design_manager.git # Replace with your actual repo URL 67 | cd design_manager 68 | ``` 69 | 2. **Add Dear ImGui as a submodule (or ensure it's available):** 70 | ```sh 71 | # If you haven't already got ImGui in your project 72 | git submodule add https://github.com/ocornut/imgui.git external/imgui 73 | git submodule update --init --recursive 74 | ``` 75 | 3. **Include the header:** Simply include `design_manager.h` in your C++ project. Ensure Dear ImGui's headers are also accessible. 76 | 77 | ### Basic Usage 78 | 79 | 1. **Initialize DesignManager:** Call `DesignManager::Init()` after setting up ImGui and your rendering backend (like GLFW/OpenGL). 80 | 2. **Load Your Design:** Call `DesignManager::GeneratedCode()` (or your custom function that uses the generated code) to load the UI elements you created with the visual editor. 81 | 3. **Update & Draw:** In your main loop: 82 | * Call `DesignManager::UpdateShapeTransforms_Unified()` to handle responsiveness (Shape Keys). 83 | * Call `DesignManager::UpdateChainAnimations()` to process chained animations. 84 | * Call `DesignManager::DrawAll(dl)` within the target ImGui window's `Begin`/`End` block to render the designed elements. 85 | * (Optional) Call `DesignManager::ShowUI()` to display the visual editor itself. 86 | * (Optional) Call `DesignManager::ShowChainAnimationGUI()` to manage chained animations. 87 | 88 | ```cpp 89 | // --- main.cpp Example Snippet --- 90 | #include "imgui.h" 91 | #include "imgui_impl_glfw.h" 92 | #include "imgui_impl_opengl3.h" 93 | #include // Or your backend header 94 | #include "design_manager.h" // Include the library 95 | 96 | // Your existing ImGui setup code... (Context creation, backend init) 97 | 98 | int main() { 99 | // ... GLFW/Window setup ... 100 | glfwMakeContextCurrent(window); 101 | 102 | // ... ImGui backend setup (ImGui_ImplGlfw_Init*, ImGui_ImplOpenGL3_Init*) ... 103 | 104 | // Initialize the Design Manager 105 | int windowWidth, windowHeight; 106 | glfwGetWindowSize(window, &windowWidth, &windowHeight); 107 | DesignManager::Init(windowWidth, windowHeight, window); 108 | 109 | // Load the design created visually (this function is generated/filled by the editor) 110 | DesignManager::GeneratedCode(); // IMPORTANT! 111 | 112 | double lastTime = glfwGetTime(); 113 | 114 | while (!glfwWindowShouldClose(window)) { 115 | glfwPollEvents(); 116 | 117 | // Start the Dear ImGui frame 118 | ImGui_ImplOpenGL3_NewFrame(); 119 | ImGui_ImplGlfw_NewFrame(); 120 | ImGui::NewFrame(); 121 | 122 | // --- Update Design Manager --- 123 | double currentTime = glfwGetTime(); 124 | float deltaTime = (float)(currentTime - lastTime); 125 | lastTime = currentTime; 126 | DesignManager::UpdateShapeTransforms_Unified(window, deltaTime); // Handles Shape Keys/Responsiveness 127 | DesignManager::UpdateChainAnimations(deltaTime); // Handles chained animations 128 | 129 | // --- Show the Visual Editor (Optional) --- 130 | DesignManager::ShowUI(window); // The main editor window 131 | DesignManager::ShowChainAnimationGUI(); // Editor for chained animations 132 | 133 | // --- Render Your Main Application Window --- 134 | ImGuiViewport* main_viewport = ImGui::GetMainViewport(); 135 | ImGui::SetNextWindowPos(main_viewport->Pos); 136 | ImGui::SetNextWindowSize(main_viewport->Size); 137 | ImGuiWindowFlags main_window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNavFocus; 138 | ImGui::Begin("MainAppWindow", NULL, main_window_flags); // Your main window 139 | 140 | ImDrawList* draw_list = ImGui::GetWindowDrawList(); 141 | 142 | // --- Draw Designed Elements --- 143 | // This draws shapes/buttons/etc. belonging to "MainAppWindow" 144 | DesignManager::DrawAll(draw_list); 145 | 146 | ImGui::End(); // End your main window 147 | 148 | // --- Render other registered ImGui windows (including those opened by designed buttons) --- 149 | DesignManager::RenderAllRegisteredWindows(); // Handles windows defined via RegisterWindow 150 | DesignManager::RenderTemporaryWindows(); // Handles temporary windows for debugging 151 | 152 | // Rendering 153 | ImGui::Render(); 154 | int display_w, display_h; 155 | glfwGetFramebufferSize(window, &display_w, &display_h); 156 | glViewport(0, 0, display_w, display_h); 157 | glClearColor(0.45f, 0.55f, 0.60f, 1.00f); 158 | glClear(GL_COLOR_BUFFER_BIT); 159 | ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData()); 160 | 161 | glfwSwapBuffers(window); 162 | } 163 | 164 | // Cleanup 165 | // ... ImGui_ImplOpenGL3_Shutdown, ImGui_ImplGlfw_Shutdown, ImGui::DestroyContext ... 166 | glfwDestroyWindow(window); 167 | glfwTerminate(); 168 | return 0; 169 | } 170 | 171 | // --- Example of using the Builder Pattern (if NOT using visual editor output) --- 172 | void SetupMyProgrammaticUI() { 173 | // Get the layer you want to add to (assuming "Main" window and layer 0 exist) 174 | if (!DesignManager::g_windowsMap["Main"].layers.empty()) { 175 | DesignManager::Layer& targetLayer = DesignManager::g_windowsMap["Main"].layers[0]; 176 | 177 | auto coolButton = DesignManager::ShapeBuilder() 178 | .setName("ProgrammaticButton") 179 | .setOwnerWindow("Main") // Associate with the correct ImGui window 180 | .setBasePosition({ 50, 50 }) 181 | .setBaseSize({ 180, 40 }) 182 | .setFillColor({ 0.1f, 0.8f, 0.2f, 1.0f }) 183 | .setCornerRadius(8.0f) 184 | .setIsButton(true) 185 | .setHoverColor({ 0.2f, 0.9f, 0.3f, 1.0f }) 186 | .setClickedColor({ 0.05f, 0.7f, 0.1f, 1.0f }) 187 | .setHasText(true) 188 | .setText("I was made in code!") 189 | .setTextColor({ 1, 1, 1, 1 }) 190 | .setTextAlignment(1) // Center alignment 191 | .addEventHandler("onClick", "MyButtonClickHandler", [](DesignManager::ShapeItem& shape) { 192 | printf("Button '%s' (ID: %d) clicked!\n", shape.name.c_str(), shape.id); 193 | }) 194 | .build(); 195 | 196 | targetLayer.shapes.push_back(coolButton); 197 | } 198 | } 199 | ``` 200 | 201 | ## Core Concepts 202 | 203 | * **Shapes (`ShapeItem`):** The fundamental visual building blocks. Can be styled, positioned, animated, and turned into interactive elements. 204 | * **Layers:** Organize shapes within a window, controlling draw order and visibility. 205 | * **Windows (`g_windowsMap`):** Each key represents an ImGui window context containing its own layers and shapes. This allows designing UIs for different parts of your application. 206 | * **Visual Editor (`ShowUI`):** The primary interface for designing. Manipulate shapes, layers, properties, animations, and generate the corresponding C++ code. 207 | * **Builder Pattern (`ShapeBuilder`, etc.):** Provides a fluent API for creating and configuring shapes, animations, and shape keys programmatically. 208 | * **Code Generation:** The editor outputs C++ code using the builder pattern, typically into a function like `DesignManager::GeneratedCode()`, which you call at initialization. 209 | 210 | ## 🧪 Experimental: HTML/CSS/React to ImGui Parser 211 | 212 | This library includes a highly experimental feature aimed at bridging the gap between web design mockups and ImGui interfaces. 213 | 214 | * **Goal:** Parse simple HTML/CSS or potentially even React/TSX component structures and attempt to translate them into ImGui Visual Design Manager elements. 215 | * **Current State:** **Ultra Mega Super Alpha Beta Gamma Zeta** (as the original author put it!) - This is **highly experimental and incomplete**. 216 | * **Planned Features (Long Term):** 217 | * HTML parsing (using Gumbo or similar). 218 | * Basic CSS property mapping (layout, color, text). 219 | * Potential TypeScript/React code analysis for component structure. 220 | * Handling basic responsive concepts. 221 | * **Contributions Welcome:** This area needs significant development. If you have experience with parsing, compilers, or web technologies, your help would be invaluable! 222 | 223 | ## Contributing 224 | 225 | Contributions are highly welcome! Whether it's bug fixes, feature enhancements, documentation improvements, or tackling the experimental parser, please feel free to: 226 | 227 | 1. **Open an Issue:** Discuss bugs, suggest features, or ask questions. 228 | 2. **Submit a Pull Request:** 229 | * Fork the repository. 230 | * Create a new branch for your feature or fix. 231 | * Make your changes. 232 | * Ensure your code compiles and adheres to the project's style. 233 | * Write a clear description of your changes in the pull request. 234 | 235 | **Areas needing help:** 236 | 237 | * Improving the experimental HTML/CSS parser. 238 | * Adding more shape types and styling options. 239 | * Optimizing rendering performance. 240 | * Writing more examples and documentation. 241 | * Testing across different platforms and backends. 242 | 243 | ## License 244 | 245 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 246 | -------------------------------------------------------------------------------- /Screenshot's Generated code.txt: -------------------------------------------------------------------------------- 1 | // Generated code for window: Main 2 | 3 | // Layer: Background Layer 4 | DesignManager::Layer BackgroundLayer("Background Layer"); 5 | BackgroundLayer.zOrder = -2; 6 | 7 | // Single Shape: First Background Left 8 | auto FirstBackgroundLeft = ShapeBuilder() 9 | .setId(48) 10 | .setName("First Background Left") 11 | .setOwnerWindow("Main") 12 | .setBasePosition(ImVec2(6.000000f, 259.000000f)) 13 | .setBaseSize(ImVec2(1115.000000f, 143.000000f)) 14 | .setBaseRotation(0.000000f) 15 | .setCornerRadius(44.000000f) 16 | .setBorderThickness(2.000000f) 17 | .setFillColor(ImVec4(0.933333f, 0.933333f, 0.933333f, 0.000000f)) 18 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 19 | .setShadowColor(ImVec4(0.301961f, 0.000000f, 1.000000f, 0.050980f)) 20 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 21 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 22 | .setShadowUseCornerRadius(true) 23 | .setVisible(true) 24 | .setLocked(false) 25 | .setColorRamp({ 26 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 27 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 28 | }) 29 | .setZOrder(-5) 30 | .setOpenWindow(true) 31 | .setIsChildWindow(true) 32 | .setChildWindowSync(false) 33 | .setToggleChildWindow(false) 34 | .setChildWindowGroupId(-1) 35 | .setAllowItemOverlap(false) 36 | .setBlockUnderlying(true) 37 | .build(); 38 | BackgroundLayer.shapes.push_back(FirstBackgroundLeft); 39 | 40 | // Single Shape: Second Background Right 41 | auto SecondBackgroundRight = ShapeBuilder() 42 | .setId(46) 43 | .setName("Second Background Right") 44 | .setOwnerWindow("Main") 45 | .setBasePosition(ImVec2(1352.000000f, 206.000000f)) 46 | .setBaseSize(ImVec2(435.000000f, 252.000000f)) 47 | .setBaseRotation(0.000000f) 48 | .setCornerRadius(63.000000f) 49 | .setBorderThickness(2.000000f) 50 | .setFillColor(ImVec4(0.933333f, 0.933333f, 0.933333f, 0.000000f)) 51 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 52 | .setShadowColor(ImVec4(0.301961f, 0.000000f, 1.000000f, 0.050980f)) 53 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 54 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 55 | .setShadowUseCornerRadius(true) 56 | .setVisible(true) 57 | .setLocked(false) 58 | .setColorRamp({ 59 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 60 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 61 | }) 62 | .setOpenWindow(true) 63 | .setIsChildWindow(true) 64 | .setChildWindowSync(false) 65 | .setToggleChildWindow(false) 66 | .setChildWindowGroupId(-1) 67 | .setAllowItemOverlap(false) 68 | .setBlockUnderlying(true) 69 | .build(); 70 | BackgroundLayer.shapes.push_back(SecondBackgroundRight); 71 | 72 | // Single Shape: Thirth Background 73 | auto ThirthBackground = ShapeBuilder() 74 | .setId(50) 75 | .setName("Thirth Background") 76 | .setOwnerWindow("Main") 77 | .setBasePosition(ImVec2(15.000000f, 493.000000f)) 78 | .setBaseSize(ImVec2(1858.000000f, 411.000000f)) 79 | .setBaseRotation(0.000000f) 80 | .setCornerRadius(63.000000f) 81 | .setBorderThickness(2.000000f) 82 | .setFillColor(ImVec4(0.933333f, 0.933333f, 0.933333f, 0.000000f)) 83 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 84 | .setShadowColor(ImVec4(0.301961f, 0.000000f, 1.000000f, 0.043137f)) 85 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 86 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 87 | .setShadowUseCornerRadius(true) 88 | .setVisible(true) 89 | .setLocked(false) 90 | .setColorRamp({ 91 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 92 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 93 | }) 94 | .setOpenWindow(true) 95 | .setIsChildWindow(true) 96 | .setChildWindowSync(false) 97 | .setToggleChildWindow(false) 98 | .setChildWindowGroupId(-1) 99 | .setAllowItemOverlap(false) 100 | .setBlockUnderlying(true) 101 | .build(); 102 | BackgroundLayer.shapes.push_back(ThirthBackground); 103 | 104 | g_windowsMap["Main"].layers.push_back(BackgroundLayer); 105 | 106 | // Layer: Layer 0 107 | DesignManager::Layer Layer0("Layer 0"); 108 | Layer0.zOrder = 3; 109 | 110 | // Single Shape: Shape 0 111 | auto Shape0 = ShapeBuilder() 112 | .setId(17) 113 | .setName("Shape 0") 114 | .setOwnerWindow("Main") 115 | .setBasePosition(ImVec2(12.000000f, 14.000000f)) 116 | .setBaseSize(ImVec2(1884.000000f, 92.000000f)) 117 | .setBaseRotation(0.000000f) 118 | .setCornerRadius(22.000000f) 119 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 120 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 121 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 122 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 123 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 124 | .setShadowUseCornerRadius(true) 125 | .setVisible(true) 126 | .setLocked(false) 127 | .setColorRamp({ 128 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 129 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 130 | }) 131 | .setHasText(true) 132 | .setText("Design Manager") 133 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 134 | .setTextSize(32.700001f) 135 | .setTextFont(4) 136 | .setTextPosition(ImVec2(0.000000f, 17.000000f)) 137 | .setTextRotation(0.000000f) 138 | .setTextAlignment(1) 139 | .setOpenWindow(true) 140 | .setIsChildWindow(true) 141 | .setChildWindowSync(false) 142 | .setToggleChildWindow(false) 143 | .setChildWindowGroupId(-1) 144 | .setAllowItemOverlap(false) 145 | .setBlockUnderlying(true) 146 | .setDynamicTextSize(true) 147 | .build(); 148 | Layer0.shapes.push_back(Shape0); 149 | 150 | // Single Shape: Created In Design Manager 151 | auto CreatedInDesignManager = ShapeBuilder() 152 | .setId(18) 153 | .setName("Created In Design Manager") 154 | .setOwnerWindow("Main") 155 | .setBasePosition(ImVec2(1454.000000f, 915.000000f)) 156 | .setBaseSize(ImVec2(433.000000f, 79.000000f)) 157 | .setBaseRotation(0.000000f) 158 | .setFillColor(ImVec4(1.000000f, 0.969231f, 0.600000f, 1.000000f)) 159 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 160 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 161 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 162 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 163 | .setShadowUseCornerRadius(true) 164 | .setVisible(true) 165 | .setLocked(false) 166 | .setColorRamp({ 167 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 168 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 169 | }) 170 | .setHasText(true) 171 | .setText("Created ALL in Design Manager\n The mouse cursor too :D") 172 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 173 | .setTextSize(32.700001f) 174 | .setTextFont(4) 175 | .setTextPosition(ImVec2(0.000000f, 8.000000f)) 176 | .setTextRotation(0.000000f) 177 | .setTextAlignment(1) 178 | .setOpenWindow(false) 179 | .setIsChildWindow(false) 180 | .setAllowItemOverlap(false) 181 | .setBlockUnderlying(true) 182 | .setDynamicTextSize(true) 183 | .build(); 184 | Layer0.shapes.push_back(CreatedInDesignManager); 185 | 186 | // Single Shape: Create shapes and click Is Button 187 | auto CreateshapesandclickIsButton = ShapeBuilder() 188 | .setId(19) 189 | .setName("Create shapes and click Is Button") 190 | .setOwnerWindow("Main") 191 | .setBasePosition(ImVec2(12.000000f, 283.000000f)) 192 | .setBaseSize(ImVec2(409.000000f, 89.000000f)) 193 | .setBaseRotation(0.000000f) 194 | .setCornerRadius(22.000000f) 195 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 196 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 197 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 198 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 199 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 200 | .setShadowUseCornerRadius(true) 201 | .setVisible(true) 202 | .setLocked(false) 203 | .setColorRamp({ 204 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 205 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 206 | }) 207 | .setHasText(true) 208 | .setText("Create shapes and click Is Button") 209 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 210 | .setTextSize(32.700001f) 211 | .setTextFont(4) 212 | .setTextPosition(ImVec2(0.000000f, 22.000000f)) 213 | .setTextRotation(0.000000f) 214 | .setTextAlignment(1) 215 | .setOpenWindow(false) 216 | .setIsChildWindow(false) 217 | .setAllowItemOverlap(false) 218 | .setBlockUnderlying(true) 219 | .setDynamicTextSize(true) 220 | .build(); 221 | Layer0.shapes.push_back(CreateshapesandclickIsButton); 222 | 223 | // Single Shape: arrow1 224 | auto arrow1 = ShapeBuilder() 225 | .setId(20) 226 | .setName("arrow1") 227 | .setOwnerWindow("Main") 228 | .setBasePosition(ImVec2(429.000000f, 320.000000f)) 229 | .setBaseSize(ImVec2(253.000000f, 5.000000f)) 230 | .setBaseRotation(0.000000f) 231 | .setCornerRadius(22.000000f) 232 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 233 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 234 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 235 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 236 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 237 | .setShadowUseCornerRadius(true) 238 | .setVisible(true) 239 | .setLocked(false) 240 | .setColorRamp({ 241 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 242 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 243 | }) 244 | .setOpenWindow(false) 245 | .setIsChildWindow(false) 246 | .setAllowItemOverlap(false) 247 | .setBlockUnderlying(true) 248 | .setDynamicTextSize(true) 249 | .build(); 250 | Layer0.shapes.push_back(arrow1); 251 | 252 | // Single Shape: arrow2 253 | auto arrow2 = ShapeBuilder() 254 | .setId(21) 255 | .setName("arrow2") 256 | .setOwnerWindow("Main") 257 | .setBasePosition(ImVec2(578.000000f, 332.000000f)) 258 | .setBaseSize(ImVec2(43.000000f, 6.000000f)) 259 | .setBaseRotation(0.000000f) 260 | .setCornerRadius(22.000000f) 261 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 262 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 263 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 264 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 265 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 266 | .setShadowUseCornerRadius(true) 267 | .setVisible(true) 268 | .setLocked(false) 269 | .setColorRamp({ 270 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 271 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 272 | }) 273 | .setOpenWindow(false) 274 | .setIsChildWindow(false) 275 | .setAllowItemOverlap(false) 276 | .setBlockUnderlying(true) 277 | .setDynamicTextSize(true) 278 | .build(); 279 | Layer0.shapes.push_back(arrow2); 280 | 281 | // Single Shape: arrow3 282 | auto arrow3 = ShapeBuilder() 283 | .setId(22) 284 | .setName("arrow3") 285 | .setOwnerWindow("Main") 286 | .setBasePosition(ImVec2(633.000000f, 308.000000f)) 287 | .setBaseSize(ImVec2(43.000000f, 6.000000f)) 288 | .setBaseRotation(0.000000f) 289 | .setCornerRadius(22.000000f) 290 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 291 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 292 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 293 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 294 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 295 | .setShadowUseCornerRadius(true) 296 | .setVisible(true) 297 | .setLocked(false) 298 | .setColorRamp({ 299 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 300 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 301 | }) 302 | .setOpenWindow(false) 303 | .setIsChildWindow(false) 304 | .setAllowItemOverlap(false) 305 | .setBlockUnderlying(true) 306 | .setDynamicTextSize(true) 307 | .build(); 308 | Layer0.shapes.push_back(arrow3); 309 | 310 | // Single Shape: button 311 | auto button = ShapeBuilder() 312 | .setId(23) 313 | .setName("button") 314 | .setOwnerWindow("Main") 315 | .setBasePosition(ImVec2(698.000000f, 283.000000f)) 316 | .setBaseSize(ImVec2(409.000000f, 84.000000f)) 317 | .setBaseRotation(0.000000f) 318 | .setCornerRadius(14.000000f) 319 | .setBorderThickness(0.500000f) 320 | .setFillColor(ImVec4(0.412308f, 1.000000f, 0.625685f, 1.000000f)) 321 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 322 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.290196f)) 323 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 324 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 325 | .setShadowUseCornerRadius(true) 326 | .setVisible(true) 327 | .setLocked(false) 328 | .setColorRamp({ 329 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 330 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 331 | }) 332 | .setIsButton(true) 333 | .setButtonBehavior(DesignManager::ShapeItem::ButtonBehavior::SingleClick) 334 | .setUseOnClick(false) 335 | .setHoverColor(ImVec4(0.996923f, 0.699380f, 0.699380f, 1.000000f)) 336 | .setClickedColor(ImVec4(0.525046f, 0.570635f, 0.720000f, 1.000000f)) 337 | .setHasText(true) 338 | .setText("BUTTON") 339 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 340 | .setTextSize(32.700001f) 341 | .setTextFont(4) 342 | .setTextPosition(ImVec2(0.000000f, 17.000000f)) 343 | .setTextRotation(0.000000f) 344 | .setTextAlignment(1) 345 | .setOpenWindow(false) 346 | .setIsChildWindow(false) 347 | .setAllowItemOverlap(false) 348 | .setBlockUnderlying(true) 349 | .setDynamicTextSize(true) 350 | .build(); 351 | Layer0.shapes.push_back(button); 352 | 353 | // Single Shape: Shape 0 Copy Copy Copy Copy Copy 354 | auto Shape0CopyCopyCopyCopyCopy = ShapeBuilder() 355 | .setId(24) 356 | .setName("Shape 0 Copy Copy Copy Copy Copy") 357 | .setOwnerWindow("Main") 358 | .setBasePosition(ImVec2(1125.000000f, 309.000000f)) 359 | .setBaseSize(ImVec2(155.000000f, 12.000000f)) 360 | .setBaseRotation(0.523599f) 361 | .setCornerRadius(22.000000f) 362 | .setFillColor(ImVec4(0.000000f, 0.953846f, 1.000000f, 1.000000f)) 363 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 364 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 365 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 366 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 367 | .setShadowUseCornerRadius(true) 368 | .setRotation(0.523599f) 369 | .setVisible(true) 370 | .setLocked(false) 371 | .setColorRamp({ 372 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 373 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 374 | }) 375 | .setOpenWindow(false) 376 | .setIsChildWindow(false) 377 | .setAllowItemOverlap(false) 378 | .setBlockUnderlying(true) 379 | .setDynamicTextSize(true) 380 | .build(); 381 | Layer0.shapes.push_back(Shape0CopyCopyCopyCopyCopy); 382 | 383 | // Single Shape: Shape 0 Copy Copy Copy Copy Copy Copy 384 | auto Shape0CopyCopyCopyCopyCopyCopy = ShapeBuilder() 385 | .setId(25) 386 | .setName("Shape 0 Copy Copy Copy Copy Copy Copy") 387 | .setOwnerWindow("Main") 388 | .setBasePosition(ImVec2(1125.000000f, 338.000000f)) 389 | .setBaseSize(ImVec2(155.000000f, 12.000000f)) 390 | .setBaseRotation(0.523599f) 391 | .setCornerRadius(22.000000f) 392 | .setFillColor(ImVec4(0.600000f, 0.900308f, 1.000000f, 1.000000f)) 393 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 394 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 395 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 396 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 397 | .setShadowUseCornerRadius(true) 398 | .setRotation(0.523599f) 399 | .setVisible(true) 400 | .setLocked(false) 401 | .setColorRamp({ 402 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 403 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 404 | }) 405 | .setOpenWindow(false) 406 | .setIsChildWindow(false) 407 | .setAllowItemOverlap(false) 408 | .setBlockUnderlying(true) 409 | .setDynamicTextSize(true) 410 | .build(); 411 | Layer0.shapes.push_back(Shape0CopyCopyCopyCopyCopyCopy); 412 | 413 | // Single Shape: Change every Aspect in Ui in realtime 414 | auto ChangeeveryAspectinUiinrealtime = ShapeBuilder() 415 | .setId(26) 416 | .setName("Change every Aspect in Ui in realtime") 417 | .setOwnerWindow("Main") 418 | .setBasePosition(ImVec2(284.000000f, 223.000000f)) 419 | .setBaseSize(ImVec2(507.000000f, 27.000000f)) 420 | .setBaseRotation(0.000000f) 421 | .setCornerRadius(22.000000f) 422 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 423 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 424 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 425 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 426 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 427 | .setShadowUseCornerRadius(true) 428 | .setVisible(true) 429 | .setLocked(false) 430 | .setColorRamp({ 431 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 432 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 433 | }) 434 | .setHasText(true) 435 | .setText("Change every Aspect in Ui in realtime") 436 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 437 | .setTextSize(25.000000f) 438 | .setTextFont(4) 439 | .setTextPosition(ImVec2(0.000000f, -1.000000f)) 440 | .setTextRotation(0.000000f) 441 | .setTextAlignment(1) 442 | .setOpenWindow(false) 443 | .setIsChildWindow(false) 444 | .setAllowItemOverlap(false) 445 | .setBlockUnderlying(true) 446 | .setDynamicTextSize(true) 447 | .build(); 448 | Layer0.shapes.push_back(ChangeeveryAspectinUiinrealtime); 449 | 450 | // Single Shape: Change even "hover" and "click" statement colors. 451 | auto Changeevenhoverandclickstatementcolors = ShapeBuilder() 452 | .setId(27) 453 | .setName("Change even "hover" and "click" statement colors.") 454 | .setOwnerWindow("Main") 455 | .setBasePosition(ImVec2(828.000000f, 416.000000f)) 456 | .setBaseSize(ImVec2(507.000000f, 27.000000f)) 457 | .setBaseRotation(0.000000f) 458 | .setCornerRadius(22.000000f) 459 | .setFillColor(ImVec4(1.000000f, 0.865846f, 0.600000f, 1.000000f)) 460 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 461 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 462 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 463 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 464 | .setShadowUseCornerRadius(true) 465 | .setVisible(true) 466 | .setLocked(false) 467 | .setColorRamp({ 468 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 469 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 470 | }) 471 | .setHasText(true) 472 | .setText("Change even "hover" and "click" statement colors.") 473 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 474 | .setTextSize(25.000000f) 475 | .setTextFont(4) 476 | .setTextPosition(ImVec2(0.000000f, -1.000000f)) 477 | .setTextRotation(0.000000f) 478 | .setTextAlignment(1) 479 | .setOpenWindow(false) 480 | .setIsChildWindow(false) 481 | .setAllowItemOverlap(false) 482 | .setBlockUnderlying(true) 483 | .setDynamicTextSize(true) 484 | .build(); 485 | Layer0.shapes.push_back(Changeevenhoverandclickstatementcolors); 486 | 487 | // Single Shape: button Copy 488 | auto buttonCopy = ShapeBuilder() 489 | .setId(28) 490 | .setName("button Copy") 491 | .setOwnerWindow("Main") 492 | .setBasePosition(ImVec2(1364.000000f, 242.000000f)) 493 | .setBaseSize(ImVec2(409.000000f, 84.000000f)) 494 | .setBaseRotation(0.000000f) 495 | .setCornerRadius(14.000000f) 496 | .setBorderThickness(0.500000f) 497 | .setFillColor(ImVec4(0.996078f, 0.698039f, 0.698039f, 1.000000f)) 498 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 499 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.290196f)) 500 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 501 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 502 | .setShadowUseCornerRadius(true) 503 | .setVisible(true) 504 | .setLocked(false) 505 | .setColorRamp({ 506 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 507 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 508 | }) 509 | .setIsButton(true) 510 | .setButtonBehavior(DesignManager::ShapeItem::ButtonBehavior::SingleClick) 511 | .setUseOnClick(false) 512 | .setHoverColor(ImVec4(0.996923f, 0.699380f, 0.699380f, 1.000000f)) 513 | .setClickedColor(ImVec4(0.525046f, 0.570635f, 0.720000f, 1.000000f)) 514 | .setHasText(true) 515 | .setText("HoveredButtonColor") 516 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 517 | .setTextSize(32.700001f) 518 | .setTextFont(4) 519 | .setTextPosition(ImVec2(0.000000f, 17.000000f)) 520 | .setTextRotation(0.000000f) 521 | .setTextAlignment(1) 522 | .setOpenWindow(false) 523 | .setIsChildWindow(false) 524 | .setAllowItemOverlap(false) 525 | .setBlockUnderlying(true) 526 | .setDynamicTextSize(true) 527 | .build(); 528 | Layer0.shapes.push_back(buttonCopy); 529 | 530 | // Single Shape: button Copy Copy 531 | auto buttonCopyCopy = ShapeBuilder() 532 | .setId(29) 533 | .setName("button Copy Copy") 534 | .setOwnerWindow("Main") 535 | .setBasePosition(ImVec2(1364.000000f, 335.000000f)) 536 | .setBaseSize(ImVec2(409.000000f, 84.000000f)) 537 | .setBaseRotation(0.000000f) 538 | .setCornerRadius(14.000000f) 539 | .setBorderThickness(0.500000f) 540 | .setFillColor(ImVec4(0.525490f, 0.572549f, 0.721569f, 1.000000f)) 541 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 542 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.290196f)) 543 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 544 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 545 | .setShadowUseCornerRadius(true) 546 | .setVisible(true) 547 | .setLocked(false) 548 | .setColorRamp({ 549 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 550 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 551 | }) 552 | .setIsButton(true) 553 | .setButtonBehavior(DesignManager::ShapeItem::ButtonBehavior::SingleClick) 554 | .setUseOnClick(false) 555 | .setHoverColor(ImVec4(0.996923f, 0.699380f, 0.699380f, 1.000000f)) 556 | .setClickedColor(ImVec4(0.525046f, 0.570635f, 0.720000f, 1.000000f)) 557 | .setHasText(true) 558 | .setText("ClickedButtonColor") 559 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 560 | .setTextSize(32.700001f) 561 | .setTextFont(4) 562 | .setTextPosition(ImVec2(0.000000f, 17.000000f)) 563 | .setTextRotation(0.000000f) 564 | .setTextAlignment(1) 565 | .setOpenWindow(false) 566 | .setIsChildWindow(false) 567 | .setAllowItemOverlap(false) 568 | .setBlockUnderlying(true) 569 | .setDynamicTextSize(true) 570 | .build(); 571 | Layer0.shapes.push_back(buttonCopyCopy); 572 | 573 | // Single Shape: All in Realtime Uilike right settings panel 574 | auto AllinRealtimeUilikerightsettingspanel = ShapeBuilder() 575 | .setId(47) 576 | .setName(" All in Realtime Uilike right settings panel") 577 | .setOwnerWindow("Main") 578 | .setBasePosition(ImVec2(1632.000000f, 111.000000f)) 579 | .setBaseSize(ImVec2(269.000000f, 76.000000f)) 580 | .setBaseRotation(0.000000f) 581 | .setFillColor(ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)) 582 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 583 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.423529f)) 584 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 585 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 586 | .setShadowUseCornerRadius(true) 587 | .setVisible(true) 588 | .setLocked(false) 589 | .setColorRamp({ 590 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 591 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 592 | }) 593 | .setHasText(true) 594 | .setText(" All in Realtime Ui\nlike right settings panel") 595 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 596 | .setTextSize(19.200001f) 597 | .setTextFont(6) 598 | .setTextPosition(ImVec2(0.000000f, 11.000000f)) 599 | .setTextRotation(0.000000f) 600 | .setTextAlignment(1) 601 | .setOpenWindow(true) 602 | .setIsChildWindow(true) 603 | .setChildWindowSync(false) 604 | .setToggleChildWindow(false) 605 | .setChildWindowGroupId(-1) 606 | .setAllowItemOverlap(false) 607 | .setBlockUnderlying(true) 608 | .setDynamicTextSize(true) 609 | .build(); 610 | Layer0.shapes.push_back(AllinRealtimeUilikerightsettingspanel); 611 | 612 | // Single Shape: Create shapes and click Is Button Copy 613 | auto CreateshapesandclickIsButtonCopy = ShapeBuilder() 614 | .setId(51) 615 | .setName("Create shapes and click Is Button Copy") 616 | .setOwnerWindow("Main") 617 | .setBasePosition(ImVec2(17.000000f, 644.000000f)) 618 | .setBaseSize(ImVec2(493.000000f, 90.000000f)) 619 | .setBaseRotation(0.000000f) 620 | .setCornerRadius(22.000000f) 621 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 622 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 623 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 624 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 625 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 626 | .setShadowUseCornerRadius(true) 627 | .setVisible(true) 628 | .setLocked(false) 629 | .setColorRamp({ 630 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 631 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 632 | }) 633 | .setHasText(true) 634 | .setText("Create shapes and click Has Embedded Image") 635 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 636 | .setTextSize(32.700001f) 637 | .setTextFont(4) 638 | .setTextPosition(ImVec2(0.000000f, 22.000000f)) 639 | .setTextRotation(0.000000f) 640 | .setTextAlignment(1) 641 | .setOpenWindow(false) 642 | .setIsChildWindow(false) 643 | .setAllowItemOverlap(false) 644 | .setBlockUnderlying(true) 645 | .setDynamicTextSize(true) 646 | .build(); 647 | Layer0.shapes.push_back(CreateshapesandclickIsButtonCopy); 648 | 649 | // Single Shape: arrow1 Copy 650 | auto arrow1Copy = ShapeBuilder() 651 | .setId(52) 652 | .setName("arrow1 Copy") 653 | .setOwnerWindow("Main") 654 | .setBasePosition(ImVec2(518.000000f, 688.000000f)) 655 | .setBaseSize(ImVec2(253.000000f, 5.000000f)) 656 | .setBaseRotation(0.000000f) 657 | .setCornerRadius(22.000000f) 658 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 659 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 660 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 661 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 662 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 663 | .setShadowUseCornerRadius(true) 664 | .setVisible(true) 665 | .setLocked(false) 666 | .setColorRamp({ 667 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 668 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 669 | }) 670 | .setOpenWindow(false) 671 | .setIsChildWindow(false) 672 | .setAllowItemOverlap(false) 673 | .setBlockUnderlying(true) 674 | .setDynamicTextSize(true) 675 | .build(); 676 | Layer0.shapes.push_back(arrow1Copy); 677 | 678 | // Single Shape: arrow2 Copy 679 | auto arrow2Copy = ShapeBuilder() 680 | .setId(53) 681 | .setName("arrow2 Copy") 682 | .setOwnerWindow("Main") 683 | .setBasePosition(ImVec2(667.000000f, 700.000000f)) 684 | .setBaseSize(ImVec2(43.000000f, 6.000000f)) 685 | .setBaseRotation(0.000000f) 686 | .setCornerRadius(22.000000f) 687 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 688 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 689 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 690 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 691 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 692 | .setShadowUseCornerRadius(true) 693 | .setVisible(true) 694 | .setLocked(false) 695 | .setColorRamp({ 696 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 697 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 698 | }) 699 | .setOpenWindow(false) 700 | .setIsChildWindow(false) 701 | .setAllowItemOverlap(false) 702 | .setBlockUnderlying(true) 703 | .setDynamicTextSize(true) 704 | .build(); 705 | Layer0.shapes.push_back(arrow2Copy); 706 | 707 | // Single Shape: arrow3 Copy 708 | auto arrow3Copy = ShapeBuilder() 709 | .setId(54) 710 | .setName("arrow3 Copy") 711 | .setOwnerWindow("Main") 712 | .setBasePosition(ImVec2(722.000000f, 676.000000f)) 713 | .setBaseSize(ImVec2(43.000000f, 6.000000f)) 714 | .setBaseRotation(0.000000f) 715 | .setCornerRadius(22.000000f) 716 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 717 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 718 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 719 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 720 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 721 | .setShadowUseCornerRadius(true) 722 | .setVisible(true) 723 | .setLocked(false) 724 | .setColorRamp({ 725 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 726 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 727 | }) 728 | .setOpenWindow(false) 729 | .setIsChildWindow(false) 730 | .setAllowItemOverlap(false) 731 | .setBlockUnderlying(true) 732 | .setDynamicTextSize(true) 733 | .build(); 734 | Layer0.shapes.push_back(arrow3Copy); 735 | 736 | // Single Shape: Shape 5 737 | auto Shape5 = ShapeBuilder() 738 | .setId(56) 739 | .setName("Shape 5") 740 | .setOwnerWindow("Main") 741 | .setBasePosition(ImVec2(802.000000f, 528.000000f)) 742 | .setBaseSize(ImVec2(365.000000f, 340.000000f)) 743 | .setBaseRotation(0.000000f) 744 | .setCornerRadius(80.000000f) 745 | .setBorderThickness(7.400000f) 746 | .setFillColor(ImVec4(0.933333f, 0.933333f, 0.933333f, 0.000000f)) 747 | .setBorderColor(ImVec4(0.489231f, 0.976426f, 1.000000f, 0.800000f)) 748 | .setShadowColor(ImVec4(0.717647f, 0.705882f, 1.000000f, 0.564706f)) 749 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 750 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 751 | .setShadowUseCornerRadius(true) 752 | .setVisible(true) 753 | .setLocked(false) 754 | .setColorRamp({ 755 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 756 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 757 | }) 758 | .setOpenWindow(false) 759 | .setIsChildWindow(false) 760 | .setHasEmbeddedImage(true) 761 | .setEmbeddedImageIndex(0) 762 | .setAllowItemOverlap(false) 763 | .setBlockUnderlying(true) 764 | .build(); 765 | Layer0.shapes.push_back(Shape5); 766 | 767 | // Single Shape: Create shapes and click Is Button Copy Copy 768 | auto CreateshapesandclickIsButtonCopyCopy = ShapeBuilder() 769 | .setId(57) 770 | .setName("Create shapes and click Is Button Copy Copy") 771 | .setOwnerWindow("Main") 772 | .setBasePosition(ImVec2(1308.000000f, 507.000000f)) 773 | .setBaseSize(ImVec2(452.000000f, 124.000000f)) 774 | .setBaseRotation(0.000000f) 775 | .setCornerRadius(22.000000f) 776 | .setFillColor(ImVec4(0.600000f, 0.974154f, 1.000000f, 1.000000f)) 777 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 778 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.474510f)) 779 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 780 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 781 | .setShadowUseCornerRadius(true) 782 | .setVisible(true) 783 | .setLocked(false) 784 | .setColorRamp({ 785 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 786 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 787 | }) 788 | .setHasText(true) 789 | .setText("Alternatively, add a child window for \ndrawing shapes, adding ImGui elements, \nor simply maintaining different designs.") 790 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 791 | .setTextSize(32.700001f) 792 | .setTextFont(4) 793 | .setTextPosition(ImVec2(0.000000f, 11.000000f)) 794 | .setTextRotation(0.000000f) 795 | .setTextAlignment(1) 796 | .setOpenWindow(false) 797 | .setIsChildWindow(false) 798 | .setAllowItemOverlap(false) 799 | .setBlockUnderlying(true) 800 | .setDynamicTextSize(true) 801 | .build(); 802 | Layer0.shapes.push_back(CreateshapesandclickIsButtonCopyCopy); 803 | 804 | // Single Shape: Shape 6 805 | auto Shape6 = ShapeBuilder() 806 | .setId(59) 807 | .setName("Shape 6") 808 | .setOwnerWindow("Main") 809 | .setBasePosition(ImVec2(1314.000000f, 656.000000f)) 810 | .setBaseSize(ImVec2(430.000000f, 223.000000f)) 811 | .setBaseRotation(0.000000f) 812 | .setCornerRadius(10.000000f) 813 | .setBorderThickness(8.400000f) 814 | .setFillColor(ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)) 815 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 816 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 817 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 818 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 819 | .setShadowUseCornerRadius(true) 820 | .setVisible(true) 821 | .setLocked(false) 822 | .setColorRamp({ 823 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 824 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 825 | }) 826 | .setHasText(true) 827 | .setText("A") 828 | .setTextColor(ImVec4(0.486154f, 0.000000f, 1.000000f, 1.000000f)) 829 | .setTextSize(30.000000f) 830 | .setTextFont(1) 831 | .setTextPosition(ImVec2(4.000000f, -3.000000f)) 832 | .setTextRotation(0.000000f) 833 | .setTextAlignment(0) 834 | .setOpenWindow(false) 835 | .setIsChildWindow(false) 836 | .setAllowItemOverlap(false) 837 | .setBlockUnderlying(true) 838 | .build(); 839 | Layer0.shapes.push_back(Shape6); 840 | 841 | // Single Shape: Shape 6 Copy 842 | auto Shape6Copy = ShapeBuilder() 843 | .setId(60) 844 | .setName("Shape 6 Copy") 845 | .setOwnerWindow("Main") 846 | .setBasePosition(ImVec2(1335.000000f, 680.000000f)) 847 | .setBaseSize(ImVec2(430.000000f, 223.000000f)) 848 | .setBaseRotation(0.000000f) 849 | .setCornerRadius(10.000000f) 850 | .setBorderThickness(8.400000f) 851 | .setFillColor(ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)) 852 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 853 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 854 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 855 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 856 | .setShadowUseCornerRadius(true) 857 | .setVisible(true) 858 | .setLocked(false) 859 | .setColorRamp({ 860 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 861 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 862 | }) 863 | .setHasText(true) 864 | .setText("D") 865 | .setTextColor(ImVec4(0.486275f, 0.000000f, 1.000000f, 1.000000f)) 866 | .setTextSize(23.200001f) 867 | .setTextFont(1) 868 | .setTextPosition(ImVec2(5.000000f, 0.000000f)) 869 | .setTextRotation(0.000000f) 870 | .setTextAlignment(0) 871 | .setOpenWindow(false) 872 | .setIsChildWindow(false) 873 | .setAllowItemOverlap(false) 874 | .setBlockUnderlying(true) 875 | .build(); 876 | Layer0.shapes.push_back(Shape6Copy); 877 | 878 | // Single Shape: Shape 6 Copy Copy 879 | auto Shape6CopyCopy = ShapeBuilder() 880 | .setId(61) 881 | .setName("Shape 6 Copy Copy") 882 | .setOwnerWindow("Main") 883 | .setBasePosition(ImVec2(1353.000000f, 699.000000f)) 884 | .setBaseSize(ImVec2(397.000000f, 56.000000f)) 885 | .setBaseRotation(0.000000f) 886 | .setCornerRadius(10.000000f) 887 | .setBorderThickness(8.400000f) 888 | .setFillColor(ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)) 889 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 890 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 891 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 892 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 893 | .setShadowUseCornerRadius(true) 894 | .setVisible(true) 895 | .setLocked(false) 896 | .setColorRamp({ 897 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 898 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 899 | }) 900 | .setHasText(true) 901 | .setText("D") 902 | .setTextColor(ImVec4(0.486275f, 0.000000f, 1.000000f, 1.000000f)) 903 | .setTextSize(35.299999f) 904 | .setTextFont(1) 905 | .setTextPosition(ImVec2(4.000000f, -4.000000f)) 906 | .setTextRotation(0.000000f) 907 | .setTextAlignment(0) 908 | .setOpenWindow(false) 909 | .setIsChildWindow(false) 910 | .setAllowItemOverlap(false) 911 | .setBlockUnderlying(true) 912 | .build(); 913 | Layer0.shapes.push_back(Shape6CopyCopy); 914 | 915 | // Single Shape: Shape 6 Copy Copy Copy 916 | auto Shape6CopyCopyCopy = ShapeBuilder() 917 | .setId(62) 918 | .setName("Shape 6 Copy Copy Copy") 919 | .setOwnerWindow("Main") 920 | .setBasePosition(ImVec2(1353.000000f, 773.000000f)) 921 | .setBaseSize(ImVec2(395.000000f, 30.000000f)) 922 | .setBaseRotation(0.000000f) 923 | .setCornerRadius(10.000000f) 924 | .setBorderThickness(8.400000f) 925 | .setFillColor(ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)) 926 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 927 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 928 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 929 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 930 | .setShadowUseCornerRadius(true) 931 | .setVisible(true) 932 | .setLocked(false) 933 | .setColorRamp({ 934 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 935 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 936 | }) 937 | .setHasText(true) 938 | .setText("Anything accordingly with Layer Feature") 939 | .setTextColor(ImVec4(0.486275f, 0.000000f, 1.000000f, 1.000000f)) 940 | .setTextSize(29.400000f) 941 | .setTextFont(1) 942 | .setTextPosition(ImVec2(21.000000f, -1.000000f)) 943 | .setTextRotation(0.000000f) 944 | .setTextAlignment(0) 945 | .setOpenWindow(false) 946 | .setIsChildWindow(false) 947 | .setAllowItemOverlap(false) 948 | .setBlockUnderlying(true) 949 | .build(); 950 | Layer0.shapes.push_back(Shape6CopyCopyCopy); 951 | 952 | // Single Shape: Shape 6 Copy Copy Copy Copy 953 | auto Shape6CopyCopyCopyCopy = ShapeBuilder() 954 | .setId(63) 955 | .setName("Shape 6 Copy Copy Copy Copy") 956 | .setOwnerWindow("Main") 957 | .setBasePosition(ImVec2(1353.000000f, 819.000000f)) 958 | .setBaseSize(ImVec2(191.000000f, 72.000000f)) 959 | .setBaseRotation(0.000000f) 960 | .setCornerRadius(10.000000f) 961 | .setBorderThickness(8.400000f) 962 | .setFillColor(ImVec4(1.000000f, 0.000000f, 0.000000f, 1.000000f)) 963 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 964 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 965 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 966 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 967 | .setShadowUseCornerRadius(true) 968 | .setVisible(true) 969 | .setLocked(false) 970 | .setColorRamp({ 971 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 972 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 973 | }) 974 | .setOpenWindow(false) 975 | .setIsChildWindow(false) 976 | .setAllowItemOverlap(false) 977 | .setBlockUnderlying(true) 978 | .build(); 979 | Layer0.shapes.push_back(Shape6CopyCopyCopyCopy); 980 | 981 | // Single Shape: Shape 6 Copy Copy Copy Copy Copy 982 | auto Shape6CopyCopyCopyCopyCopy = ShapeBuilder() 983 | .setId(64) 984 | .setName("Shape 6 Copy Copy Copy Copy Copy") 985 | .setOwnerWindow("Main") 986 | .setBasePosition(ImVec2(1555.000000f, 819.000000f)) 987 | .setBaseSize(ImVec2(191.000000f, 72.000000f)) 988 | .setBaseRotation(0.000000f) 989 | .setCornerRadius(10.000000f) 990 | .setBorderThickness(8.400000f) 991 | .setFillColor(ImVec4(0.000000f, 1.000000f, 0.233846f, 1.000000f)) 992 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 993 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.329412f)) 994 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 995 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 996 | .setShadowUseCornerRadius(true) 997 | .setVisible(true) 998 | .setLocked(false) 999 | .setColorRamp({ 1000 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1001 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1002 | }) 1003 | .setOpenWindow(false) 1004 | .setIsChildWindow(false) 1005 | .setAllowItemOverlap(false) 1006 | .setBlockUnderlying(true) 1007 | .build(); 1008 | Layer0.shapes.push_back(Shape6CopyCopyCopyCopyCopy); 1009 | 1010 | g_windowsMap["Main"].layers.push_back(Layer0); 1011 | 1012 | // Layer: Layer 2 1013 | DesignManager::Layer Layer2("Layer 2"); 1014 | Layer2.zOrder = 3; 1015 | 1016 | // Single Shape: Shape 2 1017 | auto Shape2 = ShapeBuilder() 1018 | .setId(40) 1019 | .setName("Shape 2") 1020 | .setOwnerWindow("Main") 1021 | .setBasePosition(ImVec2(1688.000000f, 352.000000f)) 1022 | .setBaseSize(ImVec2(21.000000f, 5.000000f)) 1023 | .setBaseRotation(0.383972f) 1024 | .setCornerRadius(10.000000f) 1025 | .setBorderThickness(1.900000f) 1026 | .setFillColor(ImVec4(1.000000f, 0.196923f, 0.196923f, 1.000000f)) 1027 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.200000f)) 1028 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1029 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1030 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1031 | .setShadowUseCornerRadius(true) 1032 | .setRotation(0.383972f) 1033 | .setVisible(true) 1034 | .setLocked(false) 1035 | .setColorRamp({ 1036 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1037 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1038 | }) 1039 | .setOpenWindow(false) 1040 | .setIsChildWindow(false) 1041 | .setAllowItemOverlap(false) 1042 | .setBlockUnderlying(true) 1043 | .build(); 1044 | Layer2.shapes.push_back(Shape2); 1045 | 1046 | // Single Shape: Shape 2 Copy 1047 | auto Shape2Copy = ShapeBuilder() 1048 | .setId(41) 1049 | .setName("Shape 2 Copy") 1050 | .setOwnerWindow("Main") 1051 | .setBasePosition(ImVec2(1701.000000f, 344.000000f)) 1052 | .setBaseSize(ImVec2(21.000000f, 5.000000f)) 1053 | .setBaseRotation(1.151917f) 1054 | .setCornerRadius(10.000000f) 1055 | .setBorderThickness(1.900000f) 1056 | .setFillColor(ImVec4(1.000000f, 0.196923f, 0.196923f, 1.000000f)) 1057 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.200000f)) 1058 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1059 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1060 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1061 | .setShadowUseCornerRadius(true) 1062 | .setRotation(1.151917f) 1063 | .setVisible(true) 1064 | .setLocked(false) 1065 | .setColorRamp({ 1066 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1067 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1068 | }) 1069 | .setOpenWindow(false) 1070 | .setIsChildWindow(false) 1071 | .setAllowItemOverlap(false) 1072 | .setBlockUnderlying(true) 1073 | .build(); 1074 | Layer2.shapes.push_back(Shape2Copy); 1075 | 1076 | // Single Shape: Shape 2 Copy Copy 1077 | auto Shape2CopyCopy = ShapeBuilder() 1078 | .setId(42) 1079 | .setName("Shape 2 Copy Copy") 1080 | .setOwnerWindow("Main") 1081 | .setBasePosition(ImVec2(1715.000000f, 346.000000f)) 1082 | .setBaseSize(ImVec2(21.000000f, 5.000000f)) 1083 | .setBaseRotation(2.007129f) 1084 | .setCornerRadius(10.000000f) 1085 | .setBorderThickness(1.900000f) 1086 | .setFillColor(ImVec4(1.000000f, 0.196923f, 0.196923f, 1.000000f)) 1087 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.200000f)) 1088 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1089 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1090 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1091 | .setShadowUseCornerRadius(true) 1092 | .setRotation(2.007129f) 1093 | .setVisible(true) 1094 | .setLocked(false) 1095 | .setColorRamp({ 1096 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1097 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1098 | }) 1099 | .setOpenWindow(false) 1100 | .setIsChildWindow(false) 1101 | .setAllowItemOverlap(false) 1102 | .setBlockUnderlying(true) 1103 | .build(); 1104 | Layer2.shapes.push_back(Shape2CopyCopy); 1105 | 1106 | g_windowsMap["Main"].layers.push_back(Layer2); 1107 | 1108 | // Layer: Layer 1 1109 | DesignManager::Layer Layer1("Layer 1"); 1110 | Layer1.zOrder = 4; 1111 | 1112 | // Single Shape: 1 1113 | auto _1 = ShapeBuilder() 1114 | .setId(31) 1115 | .setName("1") 1116 | .setOwnerWindow("Main") 1117 | .setBasePosition(ImVec2(1695.000000f, 296.000000f)) 1118 | .setBaseSize(ImVec2(54.000000f, 3.000000f)) 1119 | .setBaseRotation(1.082104f) 1120 | .setCornerRadius(10.000000f) 1121 | .setBorderThickness(2.000000f) 1122 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1123 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1124 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1125 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1126 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1127 | .setShadowUseCornerRadius(true) 1128 | .setRotation(1.082104f) 1129 | .setVisible(true) 1130 | .setLocked(false) 1131 | .setColorRamp({ 1132 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1133 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1134 | }) 1135 | .setOpenWindow(false) 1136 | .setIsChildWindow(false) 1137 | .setAllowItemOverlap(false) 1138 | .setBlockUnderlying(true) 1139 | .build(); 1140 | Layer1.shapes.push_back(_1); 1141 | 1142 | // Single Shape: 2 1143 | auto _2 = ShapeBuilder() 1144 | .setId(32) 1145 | .setName("2") 1146 | .setOwnerWindow("Main") 1147 | .setBasePosition(ImVec2(1705.000000f, 285.000000f)) 1148 | .setBaseSize(ImVec2(54.000000f, 3.000000f)) 1149 | .setBaseRotation(0.506145f) 1150 | .setCornerRadius(190.000000f) 1151 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1152 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1153 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1154 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1155 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1156 | .setShadowUseCornerRadius(true) 1157 | .setRotation(0.506145f) 1158 | .setVisible(true) 1159 | .setLocked(false) 1160 | .setColorRamp({ 1161 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1162 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1163 | }) 1164 | .setOpenWindow(false) 1165 | .setIsChildWindow(false) 1166 | .setAllowItemOverlap(false) 1167 | .setBlockUnderlying(true) 1168 | .build(); 1169 | Layer1.shapes.push_back(_2); 1170 | 1171 | // Single Shape: 3 1172 | auto _3 = ShapeBuilder() 1173 | .setId(33) 1174 | .setName("3") 1175 | .setOwnerWindow("Main") 1176 | .setBasePosition(ImVec2(1743.000000f, 299.000000f)) 1177 | .setBaseSize(ImVec2(11.000000f, 3.000000f)) 1178 | .setBaseRotation(2.792527f) 1179 | .setCornerRadius(190.000000f) 1180 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1181 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1182 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1183 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1184 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1185 | .setShadowUseCornerRadius(true) 1186 | .setRotation(2.792527f) 1187 | .setVisible(true) 1188 | .setLocked(false) 1189 | .setColorRamp({ 1190 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1191 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1192 | }) 1193 | .setOpenWindow(false) 1194 | .setIsChildWindow(false) 1195 | .setAllowItemOverlap(false) 1196 | .setBlockUnderlying(true) 1197 | .build(); 1198 | Layer1.shapes.push_back(_3); 1199 | 1200 | // Single Shape: 4 1201 | auto _4 = ShapeBuilder() 1202 | .setId(34) 1203 | .setName("4") 1204 | .setOwnerWindow("Main") 1205 | .setBasePosition(ImVec2(1728.000000f, 310.000000f)) 1206 | .setBaseSize(ImVec2(22.000000f, 3.000000f)) 1207 | .setBaseRotation(2.007129f) 1208 | .setCornerRadius(190.000000f) 1209 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1210 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1211 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1212 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1213 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1214 | .setShadowUseCornerRadius(true) 1215 | .setRotation(2.007129f) 1216 | .setVisible(true) 1217 | .setLocked(false) 1218 | .setColorRamp({ 1219 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1220 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1221 | }) 1222 | .setOpenWindow(false) 1223 | .setIsChildWindow(false) 1224 | .setAllowItemOverlap(false) 1225 | .setBlockUnderlying(true) 1226 | .build(); 1227 | Layer1.shapes.push_back(_4); 1228 | 1229 | // Single Shape: 1 Copy 1230 | auto _1Copy = ShapeBuilder() 1231 | .setId(35) 1232 | .setName("1 Copy") 1233 | .setOwnerWindow("Main") 1234 | .setBasePosition(ImVec2(1698.000000f, 384.000000f)) 1235 | .setBaseSize(ImVec2(54.000000f, 3.000000f)) 1236 | .setBaseRotation(1.082104f) 1237 | .setCornerRadius(10.000000f) 1238 | .setBorderThickness(2.000000f) 1239 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1240 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1241 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1242 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1243 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1244 | .setShadowUseCornerRadius(true) 1245 | .setRotation(1.082104f) 1246 | .setVisible(true) 1247 | .setLocked(false) 1248 | .setColorRamp({ 1249 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1250 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1251 | }) 1252 | .setOpenWindow(false) 1253 | .setIsChildWindow(false) 1254 | .setAllowItemOverlap(false) 1255 | .setBlockUnderlying(true) 1256 | .build(); 1257 | Layer1.shapes.push_back(_1Copy); 1258 | 1259 | // Single Shape: 2 Copy 1260 | auto _2Copy = ShapeBuilder() 1261 | .setId(36) 1262 | .setName("2 Copy") 1263 | .setOwnerWindow("Main") 1264 | .setBasePosition(ImVec2(1708.000000f, 373.000000f)) 1265 | .setBaseSize(ImVec2(54.000000f, 3.000000f)) 1266 | .setBaseRotation(0.506145f) 1267 | .setCornerRadius(190.000000f) 1268 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1269 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1270 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1271 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1272 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1273 | .setShadowUseCornerRadius(true) 1274 | .setRotation(0.506145f) 1275 | .setVisible(true) 1276 | .setLocked(false) 1277 | .setColorRamp({ 1278 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1279 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1280 | }) 1281 | .setOpenWindow(false) 1282 | .setIsChildWindow(false) 1283 | .setAllowItemOverlap(false) 1284 | .setBlockUnderlying(true) 1285 | .build(); 1286 | Layer1.shapes.push_back(_2Copy); 1287 | 1288 | // Single Shape: 3 Copy 1289 | auto _3Copy = ShapeBuilder() 1290 | .setId(37) 1291 | .setName("3 Copy") 1292 | .setOwnerWindow("Main") 1293 | .setBasePosition(ImVec2(1746.000000f, 387.000000f)) 1294 | .setBaseSize(ImVec2(11.000000f, 3.000000f)) 1295 | .setBaseRotation(2.792527f) 1296 | .setCornerRadius(190.000000f) 1297 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1298 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1299 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1300 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1301 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1302 | .setShadowUseCornerRadius(true) 1303 | .setRotation(2.792527f) 1304 | .setVisible(true) 1305 | .setLocked(false) 1306 | .setColorRamp({ 1307 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1308 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1309 | }) 1310 | .setOpenWindow(false) 1311 | .setIsChildWindow(false) 1312 | .setAllowItemOverlap(false) 1313 | .setBlockUnderlying(true) 1314 | .build(); 1315 | Layer1.shapes.push_back(_3Copy); 1316 | 1317 | // Single Shape: 4 Copy 1318 | auto _4Copy = ShapeBuilder() 1319 | .setId(38) 1320 | .setName("4 Copy") 1321 | .setOwnerWindow("Main") 1322 | .setBasePosition(ImVec2(1731.000000f, 398.000000f)) 1323 | .setBaseSize(ImVec2(22.000000f, 3.000000f)) 1324 | .setBaseRotation(2.007129f) 1325 | .setCornerRadius(190.000000f) 1326 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1327 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1328 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1329 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1330 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1331 | .setShadowUseCornerRadius(true) 1332 | .setRotation(2.007129f) 1333 | .setVisible(true) 1334 | .setLocked(false) 1335 | .setColorRamp({ 1336 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1337 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1338 | }) 1339 | .setOpenWindow(false) 1340 | .setIsChildWindow(false) 1341 | .setAllowItemOverlap(false) 1342 | .setBlockUnderlying(true) 1343 | .build(); 1344 | Layer1.shapes.push_back(_4Copy); 1345 | 1346 | g_windowsMap["Main"].layers.push_back(Layer1); 1347 | 1348 | // Layer: Layer 4 1349 | DesignManager::Layer Layer4("Layer 4"); 1350 | Layer4.zOrder = 4; 1351 | 1352 | // Single Shape: Shape 7 1353 | auto Shape7 = ShapeBuilder() 1354 | .setId(66) 1355 | .setName("Shape 7") 1356 | .setOwnerWindow("Main") 1357 | .setBasePosition(ImVec2(727.000000f, 914.000000f)) 1358 | .setBaseSize(ImVec2(528.000000f, 53.000000f)) 1359 | .setBaseRotation(0.000000f) 1360 | .setBorderThickness(2.000000f) 1361 | .setFillColor(ImVec4(0.932000f, 0.932000f, 0.932000f, 1.000000f)) 1362 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.800000f)) 1363 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.200000f)) 1364 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1365 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1366 | .setShadowUseCornerRadius(true) 1367 | .setVisible(true) 1368 | .setLocked(false) 1369 | .setColorRamp({ 1370 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1371 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1372 | }) 1373 | .setHasText(true) 1374 | .setText("External images should be imported before compilation. ") 1375 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1376 | .setTextSize(29.100000f) 1377 | .setTextFont(1) 1378 | .setTextPosition(ImVec2(0.000000f, 14.000000f)) 1379 | .setTextRotation(0.000000f) 1380 | .setTextAlignment(1) 1381 | .setOpenWindow(false) 1382 | .setIsChildWindow(false) 1383 | .setAllowItemOverlap(false) 1384 | .setBlockUnderlying(true) 1385 | .build(); 1386 | Layer4.shapes.push_back(Shape7); 1387 | 1388 | // Single Shape: Shape 7 Copy 1389 | auto Shape7Copy = ShapeBuilder() 1390 | .setId(67) 1391 | .setName("Shape 7 Copy") 1392 | .setOwnerWindow("Main") 1393 | .setBasePosition(ImVec2(1220.000000f, 918.000000f)) 1394 | .setBaseSize(ImVec2(14.000000f, 32.000000f)) 1395 | .setBaseRotation(0.000000f) 1396 | .setCornerRadius(6.500000f) 1397 | .setFillColor(ImVec4(1.000000f, 0.000000f, 0.000000f, 1.000000f)) 1398 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1399 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1400 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1401 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1402 | .setShadowUseCornerRadius(true) 1403 | .setVisible(true) 1404 | .setLocked(false) 1405 | .setColorRamp({ 1406 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1407 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1408 | }) 1409 | .setOpenWindow(false) 1410 | .setIsChildWindow(false) 1411 | .setAllowItemOverlap(false) 1412 | .setBlockUnderlying(true) 1413 | .build(); 1414 | Layer4.shapes.push_back(Shape7Copy); 1415 | 1416 | // Single Shape: Shape 7 Copy Copy 1417 | auto Shape7CopyCopy = ShapeBuilder() 1418 | .setId(68) 1419 | .setName("Shape 7 Copy Copy") 1420 | .setOwnerWindow("Main") 1421 | .setBasePosition(ImVec2(1221.000000f, 952.000000f)) 1422 | .setBaseSize(ImVec2(12.000000f, 12.000000f)) 1423 | .setBaseRotation(0.000000f) 1424 | .setCornerRadius(6.500000f) 1425 | .setFillColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1426 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1427 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.000000f)) 1428 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1429 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1430 | .setShadowUseCornerRadius(true) 1431 | .setVisible(true) 1432 | .setLocked(false) 1433 | .setColorRamp({ 1434 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1435 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1436 | }) 1437 | .setOpenWindow(false) 1438 | .setIsChildWindow(false) 1439 | .setAllowItemOverlap(false) 1440 | .setBlockUnderlying(true) 1441 | .build(); 1442 | Layer4.shapes.push_back(Shape7CopyCopy); 1443 | 1444 | // Single Shape: Shape 7 Copy 1445 | auto Shape7Copy = ShapeBuilder() 1446 | .setId(69) 1447 | .setName("Shape 7 Copy") 1448 | .setOwnerWindow("Main") 1449 | .setBasePosition(ImVec2(674.000000f, 972.000000f)) 1450 | .setBaseSize(ImVec2(632.000000f, 34.000000f)) 1451 | .setBaseRotation(0.000000f) 1452 | .setBorderThickness(2.000000f) 1453 | .setFillColor(ImVec4(0.984615f, 0.736189f, 0.869193f, 1.000000f)) 1454 | .setBorderColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.800000f)) 1455 | .setShadowColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 0.200000f)) 1456 | .setShadowSpread(ImVec4(2.000000f, 2.000000f, 2.000000f, 2.000000f)) 1457 | .setShadowOffset(ImVec2(2.000000f, 2.000000f)) 1458 | .setShadowUseCornerRadius(true) 1459 | .setVisible(true) 1460 | .setLocked(false) 1461 | .setColorRamp({ 1462 | {0.000000f, ImVec4(1.000000f, 1.000000f, 1.000000f, 1.000000f)}, 1463 | {1.000000f, ImVec4(0.500000f, 0.500000f, 0.500000f, 1.000000f)}, 1464 | }) 1465 | .setHasText(true) 1466 | .setText("There is animation capabilities too but all this features just Experimental.") 1467 | .setTextColor(ImVec4(0.000000f, 0.000000f, 0.000000f, 1.000000f)) 1468 | .setTextSize(29.100000f) 1469 | .setTextFont(1) 1470 | .setTextPosition(ImVec2(0.000000f, 3.000000f)) 1471 | .setTextRotation(0.000000f) 1472 | .setTextAlignment(1) 1473 | .setOpenWindow(false) 1474 | .setIsChildWindow(false) 1475 | .setAllowItemOverlap(false) 1476 | .setBlockUnderlying(true) 1477 | .build(); 1478 | Layer4.shapes.push_back(Shape7Copy); 1479 | 1480 | g_windowsMap["Main"].layers.push_back(Layer4); 1481 | 1482 | // Global Child Window Mappings 1483 | g_combinedChildWindowMappings.clear(); 1484 | -------------------------------------------------------------------------------- /design_manager.h: -------------------------------------------------------------------------------- 1 | // design_manager.h 2 | #pragma once 3 | 4 | #define IDI_APP_ICON 2 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #ifndef IMGUI_IMPL_OPENGL_ES2 11 | #endif 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | #include "Images_BINARY.h" 33 | #include "GeneratedButtons.h" 34 | 35 | using EmbeddedDataFunc = const std::vector& (*)(); 36 | 37 | inline const std::vector& GetShape0_embeddedData() { 38 | static std::vector data(Shape0_embeddedData, 39 | Shape0_embeddedData + sizeof(Shape0_embeddedData)); 40 | return data; 41 | } 42 | inline const std::vector& GetShape1_embeddedData() { 43 | static std::vector data(Shape1_embeddedData, 44 | Shape1_embeddedData + sizeof(Shape1_embeddedData)); 45 | return data; 46 | } 47 | 48 | namespace DesignManager { 49 | extern const char* g_embeddedImageFunctions[]; 50 | extern const EmbeddedDataFunc g_embeddedImageFuncs[]; 51 | extern const int g_embeddedImageFunctionsCount; 52 | extern const int g_embeddedImageFuncsCount; 53 | 54 | extern int oldWindowWidth; 55 | extern int oldWindowHeight; 56 | extern bool shouldCaptureScene; 57 | extern int newLayerCount; 58 | } 59 | 60 | 61 | inline bool operator==(const ImVec2& lhs, const ImVec2& rhs) 62 | { 63 | return (lhs.x == rhs.x) && (lhs.y == rhs.y); 64 | } 65 | inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs) 66 | { 67 | return !(lhs == rhs); 68 | } 69 | inline bool operator==(const ImVec4& lhs, const ImVec4& rhs) 70 | { 71 | return (lhs.x == rhs.x) && (lhs.y == rhs.y) && 72 | (lhs.z == rhs.z) && (lhs.w == rhs.w); 73 | } 74 | inline bool operator!=(const ImVec4& lhs, const ImVec4& rhs) 75 | { 76 | return !(lhs == rhs); 77 | } 78 | inline ImVec2& operator+=(ImVec2& a, const ImVec2& b) 79 | { 80 | a.x += b.x; 81 | a.y += b.y; 82 | return a; 83 | } 84 | inline ImVec2 operator+(const ImVec2& a, const ImVec2& b) { return ImVec2(a.x + b.x, a.y + b.y); } 85 | inline ImVec2 operator-(const ImVec2& a, const ImVec2& b) { return ImVec2(a.x - b.x, a.y - b.y); } 86 | inline ImVec2 operator*(const ImVec2& v, float f) 87 | { 88 | return ImVec2(v.x * f, v.y * f); 89 | } 90 | inline ImVec2 operator*(float f, const ImVec2& v) 91 | { 92 | return ImVec2(v.x * f, v.y * f); 93 | } 94 | inline ImVec2 AddV(const ImVec2& a, const ImVec2& b) { return ImVec2(a.x + b.x, a.y + b.y); } 95 | inline ImVec2 SubV(const ImVec2& a, const ImVec2& b) { return ImVec2(a.x - b.x, a.y - b.y); } 96 | inline ImVec2 MulF(const ImVec2& a, float f) { return ImVec2(a.x * f, a.y * f); } 97 | inline float LengthV(const ImVec2& a) { return sqrtf(a.x * a.x + a.y * a.y); } 98 | inline ImVec2 NormV(const ImVec2& a) { float l = LengthV(a); return (l > 0.000001f) ? ImVec2(a.x / l, a.y / l) : ImVec2(0, 0); } 99 | 100 | inline ImVec2 RotateP(const ImVec2& p, const ImVec2& c, float a) 101 | { 102 | float s = sinf(a), co = cosf(a); 103 | ImVec2 pt = SubV(p, c); 104 | float x = pt.x * co - pt.y * s; 105 | float y = pt.x * s + pt.y * co; 106 | return ImVec2(c.x + x, c.y + y); 107 | } 108 | inline float DegToRad(float d) { return d * IM_PI / 180.0f; } 109 | 110 | inline float Lerp(float a, float b, float t) 111 | { 112 | return a + t * (b - a); 113 | } 114 | inline ImVec2 Lerp(const ImVec2& a, const ImVec2& b, float t) 115 | { 116 | return ImVec2( 117 | Lerp(a.x, b.x, t), 118 | Lerp(a.y, b.y, t) 119 | ); 120 | } 121 | inline ImVec4 LerpC(const ImVec4& A, const ImVec4& B, float t) 122 | { 123 | return ImVec4(Lerp(A.x, B.x, t), 124 | Lerp(A.y, B.y, t), 125 | Lerp(A.z, B.z, t), 126 | Lerp(A.w, B.w, t)); 127 | } 128 | 129 | inline ImU32 ColU32(const ImVec4& c) 130 | { 131 | return IM_COL32((int)(c.x * 255), (int)(c.y * 255), 132 | (int)(c.z * 255), (int)(c.w * 255)); 133 | } 134 | inline ImVec2 UV(const ImVec2& p, const ImVec2& s, const ImVec2& c, const ImVec2& pos, float rot) 135 | { 136 | ImVec2 rot_p = RotateP(p, c, -rot); 137 | float u = (rot_p.x - pos.x) / s.x; 138 | float v = (rot_p.y - pos.y) / s.y; 139 | return ImVec2(u, v); 140 | } 141 | 142 | inline ImVec4 CardinalSpline(const ImVec4& p0, const ImVec4& p1, 143 | const ImVec4& p2, const ImVec4& p3, float t, float tension = 0.5f) 144 | { 145 | float t2 = t * t, t3 = t * t2; 146 | float h1 = -tension * t + 2 * tension * t2 - tension * t3; 147 | float h2 = 1 + (tension - 3 * tension) * t2 + (2 * tension - tension) * t3; 148 | float h3 = tension * t - tension * t2; 149 | float h4 = -tension * t2 + tension * t3; 150 | return ImVec4(h1 * p0.x + h2 * p1.x + h3 * p2.x + h4 * p3.x, 151 | h1 * p0.y + h2 * p1.y + h3 * p2.y + h4 * p3.y, 152 | h1 * p0.z + h2 * p1.z + h3 * p2.z + h4 * p3.z, 153 | h1 * p0.w + h2 * p1.w + h3 * p2.w + h4 * p3.w); 154 | } 155 | inline ImVec4 BSpline(const ImVec4& p0, const ImVec4& p1, 156 | const ImVec4& p2, const ImVec4& p3, float t) 157 | { 158 | float t2 = t * t, t3 = t * t2; 159 | float h1 = (-t3 + 3 * t2 - 3 * t + 1) / 6.0f; 160 | float h2 = (3 * t3 - 6 * t2 + 4) / 6.0f; 161 | float h3 = (-3 * t3 + 3 * t2 + 3 * t + 1) / 6.0f; 162 | float h4 = t3 / 6.0f; 163 | return ImVec4(h1 * p0.x + h2 * p1.x + h3 * p2.x + h4 * p3.x, 164 | h1 * p0.y + h2 * p1.y + h3 * p2.y + h4 * p3.y, 165 | h1 * p0.z + h2 * p1.z + h3 * p2.z + h4 * p3.z, 166 | h1 * p0.w + h2 * p1.w + h3 * p2.w + h4 * p3.w); 167 | } 168 | 169 | inline float SmoothStep(float t) 170 | { 171 | return t * t * (3.0f - 2.0f * t); 172 | } 173 | 174 | struct ShapeKeyAnimation 175 | { 176 | std::string name = "New Animation"; 177 | float duration = 1.0f; 178 | ImVec2 startValue = ImVec2(0, 0); 179 | ImVec2 endValue = ImVec2(0, 0); 180 | }; 181 | 182 | 183 | namespace DesignManager 184 | { 185 | 186 | 187 | 188 | enum class ShapeKeyType 189 | { 190 | SizeX, 191 | SizeY, 192 | PositionX, 193 | PositionY, 194 | Rotation 195 | }; 196 | 197 | inline std::map> windowDesigns; 198 | inline std::vector> windowRenderFunctions; 199 | inline void RegisterWindowRenderFunction(const std::function& func) { windowRenderFunctions.emplace_back(func); } 200 | 201 | extern bool sceneUpdated; 202 | extern int nextLayerID, nextShapeID; 203 | extern int selectedLayerID, selectedShapeID; 204 | extern bool snapEnabled; 205 | extern float snapGridSize; 206 | extern int layerCount; 207 | 208 | extern ImTextureID black_texture_id; 209 | extern std::map gradientTextureCache; 210 | void ClearGradientTextureCache(); 211 | 212 | extern std::string generatedCodeForSingleShape; 213 | extern std::string generatedCodeForWindow; 214 | extern std::string generatedCodeForButton; 215 | 216 | struct ShapeKey 217 | { 218 | std::string name = "New Shape Key"; 219 | ShapeKeyType type = ShapeKeyType::SizeX; 220 | ImVec2 startWindowSize = ImVec2(800.0f, 600.0f); 221 | ImVec2 endWindowSize = ImVec2(1200.0f, 900.0f); 222 | ImVec2 targetValue = ImVec2(100.0f, 100.0f); 223 | float targetRotation = 0.0f; 224 | float value = 0.0f; 225 | ImVec2 offset = ImVec2(0.0f, 0.0f); 226 | float rotationOffset = 0.0f; 227 | }; 228 | 229 | enum class PlaybackOrder 230 | { 231 | Sirali = 0, 232 | HemenArkasina = 1 233 | }; 234 | 235 | struct ButtonAnimation 236 | { 237 | std::string name = "New Animation"; 238 | float duration = 0.5f; 239 | float progress = 0.0f; 240 | bool isPlaying = false; 241 | float startTime = 0.0f; 242 | float speed = 1.0f; 243 | bool toggleState = false; 244 | ImVec2 animationTargetPosition; 245 | ImVec2 animationTargetSize; 246 | float transformRotation; 247 | ImVec2 persistentPositionOffset; 248 | ImVec2 persistentSizeOffset; 249 | float persistentRotationOffset; 250 | float playbackDirection = 1.0f; 251 | int repeatCount = 1; 252 | bool hasStartedRepeatCount = false; 253 | int remainingRepeats = 0; 254 | PlaybackOrder playbackOrder = PlaybackOrder::Sirali; 255 | 256 | enum class TriggerMode 257 | { 258 | OnClick = 0, 259 | OnHover = 1 260 | }; 261 | TriggerMode triggerMode = TriggerMode::OnClick; 262 | 263 | enum class InterpolationMethod 264 | { 265 | Linear, 266 | EaseInOut 267 | }; 268 | InterpolationMethod interpolationMethod = InterpolationMethod::Linear; 269 | 270 | enum class AnimationBehavior 271 | { 272 | PlayOnceAndStay, 273 | PlayOnceAndReverse, 274 | Toggle, 275 | PlayWhileHoldingAndReverseOnRelease, 276 | PlayWhileHoldingAndStay 277 | }; 278 | AnimationBehavior behavior = AnimationBehavior::PlayOnceAndStay; 279 | }; 280 | struct ChainAnimationStep { 281 | ButtonAnimation animation; 282 | std::function onStepComplete; 283 | }; 284 | 285 | struct ChainAnimation { 286 | std::vector steps; 287 | int currentStep = 0; 288 | bool isPlaying = false; 289 | bool reverseMode = false; 290 | bool toggled = false; 291 | }; 292 | inline ImVec2 GetWindowSize(GLFWwindow* window) 293 | { 294 | int width, height; 295 | glfwGetWindowSize(window, &width, &height); 296 | return ImVec2(static_cast(width), static_cast(height)); 297 | } 298 | 299 | enum class ShapeType { Rectangle, Circle }; 300 | enum class ChildWindowToggleBehavior { 301 | WindowOnly, 302 | ShapeAndWindow 303 | }; 304 | 305 | struct ShapeItem; 306 | struct Layer; 307 | struct WindowData; 308 | class LayoutManager; 309 | 310 | enum class HAlignment { Fill, Left, Center, Right }; 311 | enum class VAlignment { Fill, Top, Center, Bottom }; 312 | 313 | class LayoutManager { 314 | public: 315 | float spacing = 5.0f; 316 | virtual ~LayoutManager() = default; 317 | virtual void doLayout(ShapeItem& container, const ImVec2& availableSize) = 0; 318 | virtual const char* getTypeName() const = 0; 319 | virtual std::unique_ptr Clone() const = 0; 320 | }; 321 | 322 | class VerticalLayout : public LayoutManager { 323 | public: 324 | virtual ~VerticalLayout() override = default; 325 | virtual void doLayout(ShapeItem& container, const ImVec2& availableSize) override; 326 | virtual const char* getTypeName() const override; 327 | virtual std::unique_ptr Clone() const override; 328 | }; 329 | 330 | class HorizontalLayout : public LayoutManager { 331 | public: 332 | virtual ~HorizontalLayout() override = default; 333 | virtual void doLayout(ShapeItem& container, const ImVec2& availableSize) override; 334 | virtual const char* getTypeName() const override; 335 | virtual std::unique_ptr Clone() const override; 336 | }; 337 | 338 | enum class PositioningMode { Relative, Absolute }; 339 | 340 | enum class FlexDirection { Row, RowReverse, Column, ColumnReverse }; 341 | enum class FlexWrap { NoWrap, Wrap, WrapReverse }; 342 | enum class JustifyContent { FlexStart, FlexEnd, Center, SpaceBetween, SpaceAround, SpaceEvenly }; 343 | enum class AlignItems { Stretch, FlexStart, FlexEnd, Center, Baseline }; 344 | enum class AlignContent { Stretch, FlexStart, FlexEnd, Center, SpaceBetween, SpaceAround, SpaceEvenly }; 345 | enum class AlignSelf { Auto, Stretch, FlexStart, FlexEnd, Center, Baseline }; 346 | 347 | enum class GridAutoFlow { Row, Column, RowDense, ColumnDense }; 348 | enum class GridAxisAlignment { Start, End, Center, Stretch }; 349 | 350 | struct LengthUnit { 351 | enum class Unit { Px, Percent }; 352 | float value = 0.0f; 353 | Unit unit = Unit::Px; 354 | 355 | float getPixels(float baseSize) const { 356 | if (unit == Unit::Percent) { 357 | return baseSize * (value / 100.0f); 358 | } 359 | return value; 360 | } 361 | }; 362 | 363 | struct GridTrackSize { 364 | struct TrackSizeValue { 365 | enum class Unit { Auto, Px, Percent, Fr }; 366 | Unit unit = Unit::Auto; 367 | float value = 0.0f; 368 | 369 | float getPixels(float baseSize, float autoValue = 0.0f) const { 370 | switch (unit) { 371 | case Unit::Px: return std::max(0.0f, value); 372 | case Unit::Percent: return std::max(0.0f, baseSize * (value / 100.0f)); 373 | case Unit::Auto: return std::max(0.0f, autoValue); 374 | case Unit::Fr: return 0.0f; 375 | default: return 0.0f; 376 | } 377 | } 378 | bool isFr() const { return unit == Unit::Fr; } 379 | bool isAuto() const { return unit == Unit::Auto; } 380 | }; 381 | 382 | enum class Mode { Auto, Fixed, Fraction, Percentage, MinMax }; 383 | Mode mode = Mode::Auto; 384 | float value = 0.0f; 385 | TrackSizeValue minVal; 386 | TrackSizeValue maxVal; 387 | 388 | GridTrackSize() { 389 | mode = Mode::Auto; 390 | value = 0.0f; 391 | minVal = { TrackSizeValue::Unit::Auto, 0.0f }; 392 | maxVal = { TrackSizeValue::Unit::Auto, 0.0f }; 393 | } 394 | }; 395 | 396 | enum class ConstraintType { 397 | LeftDistance, RightDistance, TopDistance, BottomDistance, 398 | CenterXAlignment, CenterYAlignment, 399 | WidthFixed, HeightFixed, 400 | WidthPercentage, HeightPercentage, 401 | AspectRatio 402 | }; 403 | 404 | struct Constraint { 405 | ConstraintType type; 406 | float value = 0.0f; 407 | }; 408 | 409 | class FlexLayout : public LayoutManager { 410 | public: 411 | FlexDirection direction = FlexDirection::Row; 412 | FlexWrap wrap = FlexWrap::NoWrap; 413 | JustifyContent justifyContent = JustifyContent::FlexStart; 414 | AlignItems alignItems = AlignItems::Stretch; 415 | AlignContent alignContent = AlignContent::Stretch; 416 | float gap = 0.0f; 417 | virtual ~FlexLayout() override = default; 418 | virtual void doLayout(ShapeItem& container, const ImVec2& availableSize) override; 419 | virtual const char* getTypeName() const override { return "FlexLayout"; } 420 | virtual std::unique_ptr Clone() const override; 421 | }; 422 | 423 | class GridLayout : public LayoutManager { 424 | public: 425 | std::vector templateColumns; 426 | std::vector templateRows; 427 | LengthUnit rowGap; 428 | LengthUnit columnGap; 429 | GridAutoFlow autoFlow = GridAutoFlow::Row; 430 | GridAxisAlignment defaultCellContentJustify = GridAxisAlignment::Stretch; 431 | GridAxisAlignment defaultCellContentAlign = GridAxisAlignment::Stretch; 432 | LengthUnit implicitTrackRowSize = { 50.0f, LengthUnit::Unit::Px }; 433 | LengthUnit implicitTrackColSize = { 50.0f, LengthUnit::Unit::Px }; 434 | JustifyContent justifyContent = JustifyContent::FlexStart; 435 | AlignContent alignContent = AlignContent::FlexStart; 436 | 437 | virtual ~GridLayout() override = default; 438 | virtual void doLayout(ShapeItem& container, const ImVec2& availableSize) override; 439 | virtual const char* getTypeName() const override { return "GridLayout"; } 440 | virtual std::unique_ptr Clone() const override; 441 | GridLayout(); 442 | }; 443 | 444 | struct ShapeItem 445 | { 446 | int id; 447 | ShapeType type; 448 | bool isPolygon = false; 449 | std::vector polygonVertices; 450 | std::string name; 451 | ImVec2 position, size; 452 | ImVec2 basePosition = position; 453 | ImVec2 baseSize = size; 454 | float rotation, baseRotation = 0.0f; 455 | ImVec2 minSize = ImVec2(0, 0); 456 | ImVec2 maxSize = ImVec2(99999, 99999); 457 | bool isChildWindow = false; 458 | bool childWindowSync = false; 459 | bool toggleChildWindow = false; 460 | ChildWindowToggleBehavior toggleBehavior = ChildWindowToggleBehavior::WindowOnly; 461 | int childWindowGroupId = -1; 462 | int targetShapeID = 0; 463 | int triggerGroupID = 0; 464 | bool isImGuiContainer = false; 465 | std::function renderImGuiContent = nullptr; 466 | bool allowItemOverlap = false; 467 | bool forceOverlap = false; 468 | bool blockUnderlying = true; 469 | bool hasText = false; 470 | std::string text = ""; 471 | ImVec4 textColor = ImVec4(0, 0, 0, 1); 472 | float textSize = 16.0f; 473 | int textFont = 0; 474 | ImVec2 textPosition; 475 | float textRotation = 0.0f; 476 | int textAlignment; 477 | bool dynamicTextSize; 478 | float baseTextSize = 0.0f; 479 | float minTextSize = 8.0f; 480 | float maxTextSize = 72.0f; 481 | std::vector shapeKeys; 482 | std::vector shapeKeyAnimations; 483 | float shapeKeyValue = 0.0f; 484 | std::vector onClickAnimations; 485 | ChainAnimation chainAnimation; 486 | bool isPressed = false; 487 | int groupId = 0; 488 | ButtonAnimation* currentAnimation = nullptr; 489 | bool updateAnimBaseOnResize = false; 490 | bool isHeld = false; 491 | bool isAnimating = false; 492 | float animationProgress = 0.0f; 493 | ImVec2 baseKeyOffset = ImVec2(0, 0); 494 | ImVec2 baseKeySizeOffset = ImVec2(0, 0); 495 | float baseKeyRotationOffset = 0.0f; 496 | float cornerRadius, borderThickness; 497 | bool usePerSideBorderThicknesses = false; 498 | float borderSideThicknesses[4]; 499 | 500 | ImVec4 fillColor, borderColor, shadowColor, shadowSpread; 501 | 502 | bool usePerSideBorderColors = false; 503 | ImVec4 borderSideColors[4]; 504 | 505 | ImVec2 shadowOffset; 506 | bool shadowUseCornerRadius; 507 | bool shadowInset = false; 508 | float blurAmount; 509 | bool visible, locked, useGradient; 510 | float gradientRotation; 511 | enum class GradientInterpolation { Linear, Ease, Constant, Cardinal, BSpline }; 512 | GradientInterpolation gradientInterpolation; 513 | std::vector> colorRamp; 514 | float shadowRotation; 515 | bool useGlass; 516 | float glassBlur, glassAlpha; 517 | ImVec4 glassColor; 518 | GLuint glassBlurFBO[2], glassBlurTex[2]; 519 | int zOrder; 520 | bool isButton = false; 521 | std::vector assignedChildWindows; 522 | int selectedChildWindowIndex = 0; 523 | std::string logicExpression; 524 | std::string logicAction; 525 | int clickCounter = 0; 526 | enum ButtonBehavior { SingleClick, Toggle, Hold } buttonBehavior = SingleClick; 527 | bool triggerEvent = false; 528 | bool buttonState = false, shouldCallOnClick = false; 529 | bool isClicked = false; 530 | ImVec4 hoverColor = ImVec4(0.8f, 0.8f, 0.8f, 1.0f); 531 | ImVec4 clickedColor = ImVec4(0.6f, 0.6f, 0.6f, 1.0f); 532 | bool useOnClick = false; 533 | std::function onClick; 534 | std::function storedOnClick; 535 | ShapeItem* parent = nullptr; 536 | std::vector children; 537 | ImVec2 originalPosition; 538 | float originalRotation; 539 | ImVec2 originalSize; 540 | std::string ownerWindow; 541 | struct Transformation 542 | { 543 | ImVec2 animationTargetPosition; 544 | ImVec2 animationTargetSize; 545 | float transformRotation; 546 | float animationDuration; 547 | }; 548 | ImVec2 toggledStatePositionOffset = ImVec2(0, 0); 549 | ImVec2 toggledStateSizeOffset = ImVec2(0, 0); 550 | float toggledStateRotationOffset = 0.0f; 551 | std::vector> sizeThresholds; 552 | bool hasEmbeddedImage = false; 553 | std::vector embeddedImageData; 554 | int embeddedImageWidth = 0; 555 | int embeddedImageHeight = 0; 556 | int embeddedImageChannels = 0; 557 | int embeddedImageIndex = -1; 558 | ImTextureID embeddedImageTexture = 0; 559 | bool imageDirty = false; 560 | struct EventHandler { 561 | std::string eventType; 562 | std::string name; 563 | std::function handler; 564 | }; 565 | std::vector eventHandlers; 566 | 567 | enum class AnchorMode { 568 | None, 569 | TopLeft, Top, TopRight, 570 | Left, Center, Right, 571 | BottomLeft, Bottom, BottomRight 572 | }; 573 | AnchorMode anchorMode = AnchorMode::None; 574 | ImVec2 anchorMargin = ImVec2(0, 0); 575 | bool usePercentagePos = false; 576 | ImVec2 percentagePos = ImVec2(0, 0); 577 | bool usePercentageSize = false; 578 | ImVec2 percentageSize = ImVec2(10, 10); 579 | bool isLayoutContainer = false; 580 | std::unique_ptr layoutManager; 581 | float stretchFactor = 0.0f; 582 | HAlignment horizontalAlignment = HAlignment::Fill; 583 | VAlignment verticalAlignment = VAlignment::Fill; 584 | PositioningMode positioningMode = PositioningMode::Relative; 585 | std::vector constraints; 586 | float flexGrow = 0.0f; 587 | float flexShrink = 1.0f; 588 | enum class FlexBasisMode { Auto = -1, Pixels = 0, Content = -2, Percentage = -3 }; 589 | FlexBasisMode flexBasisMode = FlexBasisMode::Auto; 590 | float flexBasisPixels = 0.0f; 591 | AlignSelf alignSelf = AlignSelf::Auto; 592 | int order = 0; 593 | int gridColumnStart = -1; 594 | int gridColumnEnd = -1; 595 | int gridRowStart = -1; 596 | int gridRowEnd = -1; 597 | GridAxisAlignment justifySelf = GridAxisAlignment::Stretch; 598 | GridAxisAlignment alignSelfGrid = GridAxisAlignment::Stretch; 599 | ImVec4 padding = ImVec4(0, 0, 0, 0); 600 | ImVec4 margin = ImVec4(0, 0, 0, 0); 601 | 602 | enum class BoxSizing { 603 | BorderBox, 604 | ContentBox, 605 | StrokeBox 606 | }; 607 | BoxSizing boxSizing = BoxSizing::StrokeBox; 608 | 609 | ShapeItem(); 610 | ShapeItem(const ShapeItem& other); 611 | ShapeItem& operator=(const ShapeItem& other); 612 | ShapeItem(ShapeItem&& other) noexcept; 613 | ShapeItem& operator=(ShapeItem&& other) noexcept; 614 | 615 | private: 616 | void swap(ShapeItem& other) noexcept; 617 | void copy_from(const ShapeItem& other); 618 | }; 619 | 620 | inline bool g_IsInEditMode = false; 621 | 622 | enum class InteractionType { 623 | None, 624 | Selecting, 625 | Dragging, 626 | Resizing, 627 | Rotating 628 | }; 629 | 630 | enum class InteractionHandle { 631 | None, Body, 632 | TopLeft, Top, TopRight, 633 | Left, Right, 634 | BottomLeft, Bottom, BottomRight, 635 | Rotate 636 | }; 637 | 638 | struct InteractionState { 639 | InteractionType type = InteractionType::None; 640 | InteractionHandle activeHandle = InteractionHandle::None; 641 | ImVec2 dragStartMousePos = ImVec2(0, 0); 642 | std::vector> dragStartShapePositions; 643 | std::vector> dragStartShapeSizes; 644 | std::vector> dragStartShapeRotations; 645 | ImVec2 interactionStartShapeCenter = ImVec2(0, 0); 646 | bool undoStateRecorded = false; 647 | }; 648 | 649 | inline InteractionState g_InteractionState; 650 | inline bool g_ShowLayoutDebugLines = false; 651 | 652 | void DrawGridLayoutDebug(ShapeItem& container, ImDrawList* dl); 653 | void DrawFlexLayoutDebug(ShapeItem& container, ImDrawList* dl); 654 | void DrawLayoutItemBoundsDebug(ShapeItem& container, ImDrawList* dl); 655 | 656 | inline std::vector selectedShapes; 657 | std::string GenerateSingleShapeCode(const ShapeItem& shape); 658 | std::string GenerateCodeForSingleButton(const ShapeItem& buttonShape); 659 | inline std::map temporaryWindowsOpen; 660 | inline bool exclusiveChildWindowMode = true; 661 | 662 | struct Layer 663 | { 664 | int id; 665 | std::string name; 666 | std::vector> shapes; 667 | bool visible, locked; 668 | int zOrder; 669 | 670 | Layer(const std::string& n); 671 | 672 | Layer(const Layer& other); 673 | Layer& operator=(const Layer& other); 674 | Layer(Layer&& other) noexcept; 675 | Layer& operator=(Layer&& other) noexcept; 676 | }; 677 | struct ChildToChildMapping { 678 | int buttonId; 679 | std::string childWindowKey; 680 | }; 681 | struct ShapeChildMapping { 682 | int shapeId; 683 | std::string childWindowKey; 684 | int triggerButtonId; 685 | }; 686 | inline std::vector, std::string, std::vector>> g_logicMappings; 687 | inline std::vector, std::vector>> g_childWindowMappings; 688 | 689 | inline std::unordered_map g_childToChildButtonMapping; 690 | inline std::unordered_map g_globalButtonChildWindowMapping; 691 | struct CombinedMapping { 692 | int shapeId; 693 | std::string logicOp; 694 | std::vector buttonIds; 695 | std::vector childWindowKeys; 696 | }; 697 | inline std::vector g_combinedChildWindowMappings; 698 | inline std::vector g_childToChildMappings; 699 | 700 | inline ImVec2 triggerWindowSize = ImVec2(0, 0); 701 | inline ImVec2 initialWindowSize = ImVec2(0, 0); 702 | inline float transitionProgress = 0.0f; 703 | inline float transitionDuration = 0.5f; 704 | inline float transitionTimer = 0.0f; 705 | 706 | inline ImVec2 minWindowSize = ImVec2(800, 600); 707 | inline ImVec2 maxWindowSize = ImVec2(3840, 2160); 708 | 709 | bool CompareShapesByZOrder(const ShapeItem& a, const ShapeItem& b); 710 | bool CompareLayersByZOrder(const Layer& a, const Layer& b); 711 | 712 | struct ComponentShapeTemplate { 713 | ShapeItem item; 714 | int originalId = -1; 715 | int originalParentId = -1; 716 | }; 717 | 718 | struct ComponentDefinition { 719 | std::string name; 720 | std::vector shapeTemplates; 721 | }; 722 | 723 | inline std::map g_componentDefinitions; 724 | 725 | struct WindowData 726 | { 727 | bool isOpen = false; 728 | bool isChildWindow = false; 729 | std::function renderFunc; 730 | std::vector layers; 731 | int associatedShapeId = -1; 732 | int groupId = -1; 733 | }; 734 | 735 | inline std::map g_windowsMap; 736 | 737 | 738 | 739 | 740 | 741 | struct ButtonState { 742 | float lastMoveTime = 0.0f; 743 | int targetPositionIndex = 0; 744 | std::vector waypoints; 745 | ImVec2 currentAnimatedPos; 746 | float moveProgress = 1.0f; 747 | int moveCycleCount = 0; 748 | bool layerChanged = false; 749 | bool layoutChanged = false; 750 | float lastRelativeMoveTime = 0.0f; 751 | bool nextIsPercentageMove = false; 752 | }; 753 | 754 | struct PanelState { 755 | float lastTextChangeTime = 0.0f; 756 | int textVariant = 0; 757 | float lastBorderAnimTime = 0.0f; 758 | int animationCompletionCount = 0; 759 | bool isFadingOut = false; 760 | float fadeProgress = 0.0f; 761 | }; 762 | 763 | 764 | extern std::map g_buttonStates; 765 | extern std::map g_panelStates; 766 | 767 | 768 | template 769 | inline T& GetOrCreatePerItemState(int shapeId) { 770 | if constexpr (std::is_same_v) { 771 | auto it = g_buttonStates.find(shapeId); 772 | if (it == g_buttonStates.end()) { 773 | it = g_buttonStates.emplace(shapeId, ButtonState{}).first; 774 | } 775 | return it->second; 776 | } 777 | else if constexpr (std::is_same_v) { 778 | auto it = g_panelStates.find(shapeId); 779 | if (it == g_panelStates.end()) { 780 | it = g_panelStates.emplace(shapeId, PanelState{}).first; 781 | } 782 | return it->second; 783 | } 784 | static_assert(std::is_same_v || std::is_same_v, "GetOrCreatePerItemState called with an unsupported type."); 785 | 786 | 787 | 788 | 789 | 790 | 791 | 792 | static T dummy{}; 793 | return dummy; 794 | } 795 | 796 | 797 | WindowData& GetOrCreateWindow(const std::string& name, bool isOpen = true); 798 | Layer* GetOrCreateLayer(WindowData& window, const std::string& layerName, int zOrder); 799 | ShapeItem* GetOrCreateShapeInLayer(Layer& layer, const ShapeItem& templateShape); 800 | std::unique_ptr RemoveShapeFromLayer(Layer& layer, int shapeId); 801 | ShapeItem* AddShapeToLayer(Layer& layer, std::unique_ptr shape_uptr); 802 | 803 | 804 | bool IsItemClicked(int shapeId, float deltaTime); 805 | namespace Scheduler { 806 | void ProcessTasks(float totalTime); 807 | } 808 | 809 | 810 | void SetupProgrammaticUI_UltimateFreedom(float deltaTime, float totalTime); 811 | 812 | 813 | 814 | 815 | 816 | 817 | std::vector GetAllShapes(); 818 | std::vector GetAllButtonShapes(); 819 | 820 | void RegisterWindow(std::string name, std::function renderFunc); 821 | void SetWindowOpen(const std::string& name, bool open); 822 | bool IsWindowOpen(const std::string& name); 823 | 824 | inline float globalScaleFactor = 1.0f; 825 | 826 | ShapeItem* FindShapeByID(int shapeID); 827 | void UpdateGlobalScaleFactor(int currentW, int currentH); 828 | void RemoveParent(ShapeItem* child); 829 | inline bool IsAncestor(const ShapeItem* potentialAncestor, const ShapeItem* shape) { 830 | if (!potentialAncestor || !shape || !shape->parent) { 831 | return false; 832 | } 833 | const ShapeItem* current = shape->parent; 834 | while (current != nullptr) { 835 | if (current == potentialAncestor) { 836 | return true; 837 | } 838 | current = current->parent; 839 | } 840 | return false; 841 | } 842 | void SetParent(ShapeItem* child, ShapeItem* parent); 843 | void RemoveParentKeepTransform(ShapeItem* child); 844 | 845 | inline std::string selectedGuiWindow = "Main"; 846 | 847 | void DrawShape_RenderImGuiContent(ImDrawList* dl, ShapeItem& s, ImVec2 actualPos_World, ImVec2 actualSizePx, float scaleFactor); 848 | void BuildRectPoly(std::vector& poly, ImVec2 pos, ImVec2 size, float r, ImVec2 c, float rot); 849 | void BuildCirclePoly(std::vector& poly, ImVec2 c, float rx, float ry, float rot); 850 | ImTextureID CreateWhiteMaskTexture(int width, int height); 851 | ImTextureID CreateGradientTexture(const ImVec2& size, float gradRotation, const std::vector>& colorRamp, DesignManager::ShapeItem::GradientInterpolation interpolationType); 852 | void DrawGradient(ImDrawList* dl, const std::vector& poly, float gradRotation, const std::vector>& colorRamp, const ShapeItem& s); 853 | 854 | extern std::vector layers; 855 | 856 | void RenderTemporaryWindows(); 857 | void DrawShapeTreeNode(ShapeItem* shape, Layer& layer, int layerIndex, int shapeIndexInLayer, int& selectedLayerIndex, std::vector& selectedShapes, ShapeItem*& lastClickedShape, int& lastClickedLayerIndex, int& layerToSort, bool& needsLayerSort); 858 | void AddTextRotated(ImDrawList* draw_list, ImFont* font, float font_size, const ImVec2& pos, ImU32 col, const char* text, float angle_radians, const ImVec2& pivot_norm); 859 | void DrawShape(ImDrawList* dl, ShapeItem& s, ImVec2 wp); 860 | void DrawShape_RenderChildWindow(ShapeItem& s, ImVec2 contentActualPos_World, ImVec2 contentActualSizePx); 861 | void DrawShape_Shadow(ImDrawList* dlEffective, ShapeItem& s, ImVec2 wp, float scaleFactor, ImVec2 c, float totalrot); 862 | void DrawShape_Blur(ImDrawList* dlEffective, ShapeItem& s, ImVec2 wp, float scaleFactor, ImVec2 c); 863 | void BuildMainShapePoly(ShapeItem& s, ImVec2 wp, float scaleFactor, ImVec2 c, std::vector& poly); 864 | void DrawShape_LoadEmbeddedImageIfNeeded(ShapeItem& item); 865 | void DrawShape_DrawEmbeddedImageIfAny(ImDrawList* dlEffective, ShapeItem& s, float scaleFactor, ImVec2 cImage, std::vector& poly); 866 | void DispatchEvent(ShapeItem& shape, const std::string& eventType); 867 | void DrawShape_ProcessButtonLogic(ImDrawList* dlEffective, ShapeItem& s, float scaleFactor, ImVec2 wp, ImVec4& drawColor); 868 | void DrawShape_FillWithGradient(ImDrawList* dlEffective, const std::vector& poly, 869 | const ShapeItem& shape, 870 | const ImVec2& fillActualPosPx_World, 871 | const ImVec2& fillActualSizePx, 872 | const ImVec2& fillActualCenterPx_World 873 | ); 874 | void DrawShape_Fill(ImDrawList* dlEffective, ShapeItem& s, const std::vector& poly, 875 | const ImVec2& fillActualPosPx_World, const ImVec2& fillActualSizePx, 876 | const ImVec2& fillActualCenterPx_World, 877 | ImVec4 drawColor); 878 | void DrawShape_DrawBorder(ImDrawList* dlEffective, ShapeItem& s, float scaleFactor, ImVec2 c, ImVec2 wp); 879 | void DrawShape_DrawText(ImDrawList* dlEffective, ShapeItem& s, ImVec2 contentActualPos_World, ImVec2 contentActualSizePx, float scaleFactor); 880 | void DrawShape_FinalOnClick(ShapeItem& s); 881 | 882 | extern int lastSelectedLayerIndex; 883 | extern int lastSelectedShapeIndex; 884 | extern int selectedLayerIndex, selectedShapeIndex; 885 | 886 | void RenderAllRegisteredWindows(); 887 | 888 | inline void MarkSceneUpdated() { 889 | DesignManager::sceneUpdated = false; 890 | DesignManager::shouldCaptureScene = true; 891 | glFinish(); 892 | } 893 | 894 | inline float NormalizeProgress(float progress) { 895 | return progress / 100.0f; 896 | } 897 | 898 | ImVec2 CalculateIntrinsicSize(const ShapeItem& item); 899 | float GetBaselineOffset(const ShapeItem& item, const ImVec2& calculatedSize); 900 | int FindShapeLayerIndex(int shapeId); 901 | 902 | GridTrackSize::TrackSizeValue ParseTrackSizeValueString(const std::string& segment); 903 | std::vector ParseGridTemplate(const std::string& templateString); 904 | 905 | inline AlignSelf ResolveAlignSelf(AlignSelf itemAlignSelfValue, AlignItems containerAlignItemsValue) { 906 | if (itemAlignSelfValue != AlignSelf::Auto) { 907 | return itemAlignSelfValue; 908 | } 909 | switch (containerAlignItemsValue) { 910 | case AlignItems::FlexStart: return AlignSelf::FlexStart; 911 | case AlignItems::FlexEnd: return AlignSelf::FlexEnd; 912 | case AlignItems::Center: return AlignSelf::Center; 913 | case AlignItems::Stretch: return AlignSelf::Stretch; 914 | case AlignItems::Baseline: return AlignSelf::Baseline; 915 | default: return AlignSelf::Stretch; 916 | } 917 | } 918 | void ApplyConstraints(ShapeItem* shape, const ImVec2& parentFinalSize, ImVec2* outPosition, ImVec2* outSize); 919 | void UpdateShapeTransforms_Unified(GLFWwindow* window, float deltaTime); 920 | ImVec2 ComputeChainOffset(const ShapeItem& shape); 921 | void UpdateChainAnimations(float deltaTime); 922 | int GetUniqueShapeID(); 923 | void ShowChainAnimationGUI(); 924 | void DrawAll(ImDrawList* dl); 925 | std::string SanitizeVariableName(const std::string& name); 926 | std::string escapeNewlines(const std::string& input); 927 | void CopyToClipboard(const std::string& text); 928 | std::string GenerateButtonAnimationCode(const ButtonAnimation& anim); 929 | std::string GenerateShapeKeyCode(const ShapeKey& key); 930 | std::string GenerateChildWindowMappingsCode(); 931 | std::set GetAllShapeIDs(); 932 | ShapeItem* FindShapeByID_Internal(int id); 933 | std::string GenerateComponentDefinitionCode(const std::string& componentName, const ComponentDefinition& compDef); 934 | std::string GenerateAllComponentDefinitionsCode(); 935 | std::string GenerateLengthUnitCode(const LengthUnit& unit); 936 | std::string GenerateGridTrackSizeCode(const GridTrackSize& track); 937 | std::string GenerateCodeForWindow(const std::string& windowName); 938 | 939 | void RefreshLayerIDs(); 940 | void EnsureMainWindowExists(); 941 | int GetUniqueLayerID(); 942 | 943 | extern ShapeItem* lastClickedShape; 944 | extern int lastClickedLayerIndex; 945 | 946 | ShapeItem* FindShapeByIdRecursiveHelper(int shapeId, ShapeItem* currentShape); 947 | ShapeItem* FindShapeByIdRecursive(int shapeId); 948 | ImRect GetShapeBoundingBox(const ShapeItem& s); 949 | bool IsMouseOverShape(const ImVec2& mouseCanvasPos, const ShapeItem& s); 950 | void ProcessCanvasInteractions(); 951 | void DrawInteractionGizmos(ImDrawList* fgDrawList); 952 | void ShowUI_HierarchyPanel(WindowData& windowData, int& selectedLayerIndex, std::vector& selectedShapes); 953 | void ShowUI_PropertiesPanel(WindowData& windowData, int& selectedLayerIndex, std::vector& selectedShapes); 954 | void ShowUI_CodeGenerationPanel(); 955 | void ShowUI_ComponentPanel(); 956 | void ShowUI_LayerShapeManager_ChildWindowMappings(); 957 | bool VerticalSplitter(const char* str_id, float thickness, float height, float* size_left, float* size_right, float min_left, float min_right); 958 | void ShowUI(GLFWwindow* window); 959 | std::string SaveConfiguration(); 960 | void DrawAllForWindow(const std::string& windowName, const Layer& layer); 961 | 962 | 963 | void RenderChildWindowForShape1(); 964 | 965 | 966 | 967 | 968 | void Init(int width, int height, GLFWwindow* window); 969 | 970 | #define DEFINE_ANIM_SETTER(METHOD, MEMBER) \ 971 | AnimationBuilder& set##METHOD(const decltype(anim.MEMBER)& value) { \ 972 | anim.MEMBER = value; \ 973 | return *this; \ 974 | } 975 | 976 | #define DEFINE_SHAPEKEY_SETTER(METHOD, MEMBER) \ 977 | ShapeKeyBuilder& set##METHOD(const decltype(key.MEMBER)& value) { \ 978 | key.MEMBER = value; \ 979 | return *this; \ 980 | } 981 | 982 | #define DEFINE_SETTER(METHOD, MEMBER) \ 983 | ShapeBuilder& set##METHOD(const decltype(shape.MEMBER)& value) { \ 984 | shape.MEMBER = value; \ 985 | return *this; \ 986 | } 987 | 988 | class AnimationBuilder { 989 | public: 990 | ButtonAnimation anim; 991 | 992 | DEFINE_ANIM_SETTER(Name, name) 993 | DEFINE_ANIM_SETTER(Duration, duration) 994 | DEFINE_ANIM_SETTER(Speed, speed) 995 | DEFINE_ANIM_SETTER(AnimationTargetPosition, animationTargetPosition) 996 | DEFINE_ANIM_SETTER(AnimationTargetSize, animationTargetSize) 997 | DEFINE_ANIM_SETTER(TransformRotation, transformRotation) 998 | DEFINE_ANIM_SETTER(RepeatCount, repeatCount) 999 | DEFINE_ANIM_SETTER(PlaybackOrder, playbackOrder) 1000 | DEFINE_ANIM_SETTER(InterpolationMethod, interpolationMethod) 1001 | DEFINE_ANIM_SETTER(TriggerMode, triggerMode) 1002 | DEFINE_ANIM_SETTER(Behavior, behavior) 1003 | 1004 | ButtonAnimation build() { 1005 | return anim; 1006 | } 1007 | }; 1008 | 1009 | class ShapeKeyBuilder { 1010 | public: 1011 | ShapeKey key; 1012 | 1013 | DEFINE_SHAPEKEY_SETTER(Name, name) 1014 | DEFINE_SHAPEKEY_SETTER(Type, type) 1015 | DEFINE_SHAPEKEY_SETTER(StartWindowSize, startWindowSize) 1016 | DEFINE_SHAPEKEY_SETTER(EndWindowSize, endWindowSize) 1017 | DEFINE_SHAPEKEY_SETTER(TargetRotation, targetRotation) 1018 | DEFINE_SHAPEKEY_SETTER(RotationOffset, rotationOffset) 1019 | DEFINE_SHAPEKEY_SETTER(TargetValue, targetValue) 1020 | DEFINE_SHAPEKEY_SETTER(Offset, offset) 1021 | DEFINE_SHAPEKEY_SETTER(Value, value) 1022 | 1023 | ShapeKey build() { 1024 | return key; 1025 | } 1026 | }; 1027 | 1028 | class ShapeBuilder { 1029 | public: 1030 | ShapeItem shape; 1031 | 1032 | DEFINE_SETTER(Id, id) 1033 | DEFINE_SETTER(Name, name) 1034 | DEFINE_SETTER(OwnerWindow, ownerWindow) 1035 | DEFINE_SETTER(GroupId, groupId) 1036 | DEFINE_SETTER(Position, position) 1037 | DEFINE_SETTER(Size, size) 1038 | DEFINE_SETTER(Rotation, rotation) 1039 | DEFINE_SETTER(BasePosition, basePosition) 1040 | DEFINE_SETTER(BaseSize, baseSize) 1041 | DEFINE_SETTER(BaseRotation, baseRotation) 1042 | DEFINE_SETTER(CornerRadius, cornerRadius) 1043 | DEFINE_SETTER(BorderThickness, borderThickness) 1044 | 1045 | DEFINE_SETTER(UsePerSideBorderThicknesses, usePerSideBorderThicknesses) 1046 | 1047 | DEFINE_SETTER(FillColor, fillColor) 1048 | DEFINE_SETTER(BorderColor, borderColor) 1049 | DEFINE_SETTER(UsePerSideBorderColors, usePerSideBorderColors) 1050 | DEFINE_SETTER(Visible, visible) 1051 | DEFINE_SETTER(Locked, locked) 1052 | DEFINE_SETTER(ShadowColor, shadowColor) 1053 | DEFINE_SETTER(ShadowSpread, shadowSpread) 1054 | DEFINE_SETTER(ShadowOffset, shadowOffset) 1055 | DEFINE_SETTER(ShadowUseCornerRadius, shadowUseCornerRadius) 1056 | DEFINE_SETTER(ShadowRotation, shadowRotation) 1057 | DEFINE_SETTER(ShadowInset, shadowInset) 1058 | DEFINE_SETTER(BlurAmount, blurAmount) 1059 | DEFINE_SETTER(UseGradient, useGradient) 1060 | DEFINE_SETTER(GradientRotation, gradientRotation) 1061 | DEFINE_SETTER(GradientInterpolation, gradientInterpolation) 1062 | DEFINE_SETTER(ColorRamp, colorRamp) 1063 | DEFINE_SETTER(UseGlass, useGlass) 1064 | DEFINE_SETTER(GlassBlur, glassBlur) 1065 | DEFINE_SETTER(GlassAlpha, glassAlpha) 1066 | DEFINE_SETTER(GlassColor, glassColor) 1067 | DEFINE_SETTER(IsChildWindow, isChildWindow) 1068 | DEFINE_SETTER(ChildWindowSync, childWindowSync) 1069 | DEFINE_SETTER(ToggleChildWindow, toggleChildWindow) 1070 | DEFINE_SETTER(ToggleBehavior, toggleBehavior) 1071 | DEFINE_SETTER(ChildWindowGroupId, childWindowGroupId) 1072 | DEFINE_SETTER(TargetShapeID, targetShapeID) 1073 | DEFINE_SETTER(TriggerGroupID, triggerGroupID) 1074 | DEFINE_SETTER(IsImGuiContainer, isImGuiContainer) 1075 | DEFINE_SETTER(IsButton, isButton) 1076 | DEFINE_SETTER(ButtonBehavior, buttonBehavior) 1077 | DEFINE_SETTER(UseOnClick, useOnClick) 1078 | DEFINE_SETTER(HoverColor, hoverColor) 1079 | DEFINE_SETTER(ClickedColor, clickedColor) 1080 | DEFINE_SETTER(ToggledStatePositionOffset, toggledStatePositionOffset) 1081 | DEFINE_SETTER(ToggledStateSizeOffset, toggledStateSizeOffset) 1082 | DEFINE_SETTER(ToggledStateRotationOffset, toggledStateRotationOffset) 1083 | DEFINE_SETTER(HasText, hasText) 1084 | DEFINE_SETTER(Text, text) 1085 | DEFINE_SETTER(TextColor, textColor) 1086 | DEFINE_SETTER(TextSize, textSize) 1087 | DEFINE_SETTER(TextFont, textFont) 1088 | DEFINE_SETTER(TextPosition, textPosition) 1089 | DEFINE_SETTER(TextRotation, textRotation) 1090 | DEFINE_SETTER(TextAlignment, textAlignment) 1091 | DEFINE_SETTER(DynamicTextSize, dynamicTextSize) 1092 | DEFINE_SETTER(BaseTextSize, baseTextSize) 1093 | DEFINE_SETTER(MinTextSize, minTextSize) 1094 | DEFINE_SETTER(MaxTextSize, maxTextSize) 1095 | DEFINE_SETTER(AnchorMode, anchorMode) 1096 | DEFINE_SETTER(AnchorMargin, anchorMargin) 1097 | DEFINE_SETTER(UsePercentagePos, usePercentagePos) 1098 | DEFINE_SETTER(PercentagePos, percentagePos) 1099 | DEFINE_SETTER(UsePercentageSize, usePercentageSize) 1100 | DEFINE_SETTER(PercentageSize, percentageSize) 1101 | DEFINE_SETTER(MinSize, minSize) 1102 | DEFINE_SETTER(MaxSize, maxSize) 1103 | DEFINE_SETTER(HasEmbeddedImage, hasEmbeddedImage) 1104 | DEFINE_SETTER(EmbeddedImageIndex, embeddedImageIndex) 1105 | DEFINE_SETTER(ZOrder, zOrder) 1106 | DEFINE_SETTER(AllowItemOverlap, allowItemOverlap) 1107 | DEFINE_SETTER(ForceOverlap, forceOverlap) 1108 | DEFINE_SETTER(BlockUnderlying, blockUnderlying) 1109 | DEFINE_SETTER(Type, type) 1110 | DEFINE_SETTER(UpdateAnimBaseOnResize, updateAnimBaseOnResize) 1111 | DEFINE_SETTER(PositioningMode, positioningMode) 1112 | DEFINE_SETTER(FlexGrow, flexGrow) 1113 | DEFINE_SETTER(FlexShrink, flexShrink) 1114 | DEFINE_SETTER(FlexBasisMode, flexBasisMode) 1115 | DEFINE_SETTER(FlexBasisPixels, flexBasisPixels) 1116 | DEFINE_SETTER(AlignSelf, alignSelf) 1117 | DEFINE_SETTER(Order, order) 1118 | DEFINE_SETTER(GridColumnStart, gridColumnStart) 1119 | DEFINE_SETTER(GridColumnEnd, gridColumnEnd) 1120 | DEFINE_SETTER(GridRowStart, gridRowStart) 1121 | DEFINE_SETTER(GridRowEnd, gridRowEnd) 1122 | DEFINE_SETTER(JustifySelf, justifySelf) 1123 | DEFINE_SETTER(AlignSelfGrid, alignSelfGrid) 1124 | DEFINE_SETTER(IsLayoutContainer, isLayoutContainer) 1125 | DEFINE_SETTER(StretchFactor, stretchFactor) 1126 | DEFINE_SETTER(HorizontalAlignment, horizontalAlignment) 1127 | DEFINE_SETTER(VerticalAlignment, verticalAlignment) 1128 | DEFINE_SETTER(BoxSizing, boxSizing) 1129 | DEFINE_SETTER(IsPolygon, isPolygon) 1130 | DEFINE_SETTER(PolygonVertices, polygonVertices) 1131 | 1132 | ShapeBuilder& addColorRampEntry(float pos, const ImVec4& color) { 1133 | shape.colorRamp.emplace_back(pos, color); 1134 | return *this; 1135 | } 1136 | ShapeBuilder& addOnClickAnimation(const ButtonAnimation& anim) { 1137 | shape.onClickAnimations.push_back(anim); 1138 | return *this; 1139 | } 1140 | ShapeBuilder& addShapeKey(const ShapeKey& key) { 1141 | shape.shapeKeys.push_back(key); 1142 | return *this; 1143 | } 1144 | ShapeBuilder& setRenderImGuiContent(const std::function& func) { 1145 | shape.renderImGuiContent = func; 1146 | return *this; 1147 | } 1148 | ShapeBuilder& addEventHandler(const std::string& eventType, const std::string& name, const std::function& handler) { 1149 | shape.eventHandlers.push_back({ eventType, name, handler }); 1150 | return *this; 1151 | } 1152 | ShapeBuilder& addConstraint(const Constraint& constraint) { 1153 | shape.constraints.push_back(constraint); 1154 | return *this; 1155 | } 1156 | ShapeBuilder& setLayoutManager(std::unique_ptr manager) { 1157 | shape.layoutManager = std::move(manager); 1158 | return *this; 1159 | } 1160 | ShapeBuilder& setPadding(const ImVec4& value) { 1161 | shape.padding = value; 1162 | return *this; 1163 | } 1164 | ShapeBuilder& setMargin(const ImVec4& value) { 1165 | shape.margin = value; 1166 | return *this; 1167 | } 1168 | ShapeBuilder& setBorderSideColor(int side, const ImVec4& color) { 1169 | if (side >= 0 && side < 4) { 1170 | shape.borderSideColors[side] = color; 1171 | shape.usePerSideBorderColors = true; 1172 | } 1173 | return *this; 1174 | } 1175 | ShapeBuilder& setBorderSideThickness(int side, float thickness) { 1176 | if (side >= 0 && side < 4) { 1177 | shape.borderSideThicknesses[side] = std::max(0.0f, thickness); 1178 | shape.usePerSideBorderThicknesses = true; 1179 | } 1180 | return *this; 1181 | } 1182 | 1183 | ShapeBuilder& setBorderSidesThickness(float top, float right, float bottom, float left) { 1184 | shape.borderSideThicknesses[0] = std::max(0.0f, top); 1185 | shape.borderSideThicknesses[1] = std::max(0.0f, right); 1186 | shape.borderSideThicknesses[2] = std::max(0.0f, bottom); 1187 | shape.borderSideThicknesses[3] = std::max(0.0f, left); 1188 | shape.usePerSideBorderThicknesses = true; 1189 | return *this; 1190 | } 1191 | ShapeBuilder& setBorderSidesColor(const ImVec4& top, const ImVec4& right, const ImVec4& bottom, const ImVec4& left) { 1192 | shape.borderSideColors[0] = top; 1193 | shape.borderSideColors[1] = right; 1194 | shape.borderSideColors[2] = bottom; 1195 | shape.borderSideColors[3] = left; 1196 | shape.usePerSideBorderColors = true; 1197 | return *this; 1198 | } 1199 | static AnimationBuilder createAnimation() { 1200 | return AnimationBuilder(); 1201 | } 1202 | static ShapeKeyBuilder createShapeKey() { 1203 | return ShapeKeyBuilder(); 1204 | } 1205 | 1206 | ShapeItem build(); 1207 | }; 1208 | 1209 | #undef DEFINE_ANIM_SETTER 1210 | #undef DEFINE_SHAPEKEY_SETTER 1211 | #undef DEFINE_SETTER 1212 | 1213 | void GeneratedCode(); 1214 | 1215 | } 1216 | --------------------------------------------------------------------------------