1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Add dumb and manual theme caching systems to Window

This commit is contained in:
Yuri Sizov
2022-09-01 13:38:08 +03:00
parent 0c221f0284
commit 15fd025f90
12 changed files with 368 additions and 185 deletions

View File

@@ -52,6 +52,12 @@ class AcceptDialog : public Window {
bool hide_on_ok = true;
bool close_on_escape = true;
struct ThemeCache {
Ref<StyleBox> panel_style;
int margin = 0;
int button_margin = 0;
} theme_cache;
void _custom_action(const String &p_action);
void _update_child_rects();
@@ -62,6 +68,7 @@ class AcceptDialog : public Window {
protected:
virtual Size2 _get_contents_minimum_size() const override;
virtual void _update_theme_item_cache() override;
void _notification(int p_what);
static void _bind_methods();