yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
theme_properties.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_LAYOUT_DESIGNER_THEME_PROPERTIES_H_
2#define YAZE_APP_EDITOR_LAYOUT_DESIGNER_THEME_PROPERTIES_H_
3
4#include <string>
5#include "imgui/imgui.h"
6
7namespace yaze {
8namespace editor {
9namespace layout_designer {
10
19 // Padding
20 ImVec2 window_padding = ImVec2(10, 10);
21 ImVec2 frame_padding = ImVec2(10, 2);
22 ImVec2 cell_padding = ImVec2(4, 5);
23 ImVec2 item_spacing = ImVec2(10, 5);
24 ImVec2 item_inner_spacing = ImVec2(5, 5);
25
26 // Rounding
27 float window_rounding = 0.0f;
28 float child_rounding = 0.0f;
29 float frame_rounding = 5.0f;
30 float popup_rounding = 0.0f;
31 float scrollbar_rounding = 5.0f;
32 float grab_rounding = 0.0f;
33 float tab_rounding = 0.0f;
34
35 // Borders
36 float window_border_size = 0.0f;
37 float child_border_size = 1.0f;
38 float popup_border_size = 1.0f;
39 float frame_border_size = 0.0f;
40 float tab_border_size = 0.0f;
41
42 // Sizes
43 float indent_spacing = 20.0f;
44 float scrollbar_size = 14.0f;
45 float grab_min_size = 15.0f;
46
47 // Apply these properties to ImGui style
48 void Apply() const;
49
50 // Load from current ImGui style
51 void LoadFromCurrent();
52
53 // Reset to defaults
54 void Reset();
55
56 // Export as code
57 std::string GenerateStyleCode() const;
58};
59
65 public:
67
73 bool Draw(ThemeProperties& properties);
74
75 private:
76 void DrawPaddingSection(ThemeProperties& properties);
77 void DrawRoundingSection(ThemeProperties& properties);
78 void DrawBordersSection(ThemeProperties& properties);
79 void DrawSizesSection(ThemeProperties& properties);
80
81 bool show_padding_ = true;
82 bool show_rounding_ = true;
83 bool show_borders_ = true;
84 bool show_sizes_ = true;
85};
86
87} // namespace layout_designer
88} // namespace editor
89} // namespace yaze
90
91#endif // YAZE_APP_EDITOR_LAYOUT_DESIGNER_THEME_PROPERTIES_H_
92
UI panel for editing theme properties in the layout designer.
void DrawBordersSection(ThemeProperties &properties)
void DrawPaddingSection(ThemeProperties &properties)
bool Draw(ThemeProperties &properties)
Draw the theme properties editor.
void DrawRoundingSection(ThemeProperties &properties)
Encapsulates ImGui style properties for visual design.