summaryrefslogtreecommitdiff
path: root/editor/plugins/style_box_editor_plugin.h
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-05-23 23:17:12 +0200
committerreduz <reduzio@gmail.com>2022-05-26 11:57:56 +0200
commitb4c6900123eb890df0e4b7e208f9c67659e72927 (patch)
tree67687cc734ee3113b58cd6613234f6e4864c7b9c /editor/plugins/style_box_editor_plugin.h
parent3bee0689bc510cde5bb1f074c55141c99eaa6968 (diff)
Improve StyleBox preview
* Show checkerboard on background. * Add margins. * Show Ninepatch lines (toggleable). * Move the region to its own section so it does not pollute.
Diffstat (limited to 'editor/plugins/style_box_editor_plugin.h')
-rw-r--r--editor/plugins/style_box_editor_plugin.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index 663440ae31..a072745d8f 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -40,11 +40,16 @@
class StyleBoxPreview : public VBoxContainer {
GDCLASS(StyleBoxPreview, VBoxContainer);
+ TextureRect *checkerboard = nullptr;
+ TextureButton *grid_preview = nullptr;
Control *preview = nullptr;
Ref<StyleBox> stylebox;
void _sb_changed();
void _redraw();
+ void _notification(int p_what);
+ static bool grid_preview_enabled;
+ void _grid_preview_toggled(bool p_active);
protected:
static void _bind_methods();