You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add a lifecycle method for manual theme item caching to Control
This commit is contained in:
@@ -36,9 +36,26 @@
|
||||
class CheckButton : public Button {
|
||||
GDCLASS(CheckButton, Button);
|
||||
|
||||
struct ThemeCache {
|
||||
int h_separation = 0;
|
||||
int check_v_adjust = 0;
|
||||
Ref<StyleBox> normal_style;
|
||||
|
||||
Ref<Texture2D> checked;
|
||||
Ref<Texture2D> unchecked;
|
||||
Ref<Texture2D> checked_disabled;
|
||||
Ref<Texture2D> unchecked_disabled;
|
||||
Ref<Texture2D> checked_mirrored;
|
||||
Ref<Texture2D> unchecked_mirrored;
|
||||
Ref<Texture2D> checked_disabled_mirrored;
|
||||
Ref<Texture2D> unchecked_disabled_mirrored;
|
||||
} theme_cache;
|
||||
|
||||
protected:
|
||||
Size2 get_icon_size() const;
|
||||
virtual Size2 get_minimum_size() const override;
|
||||
|
||||
virtual void _update_theme_item_cache() override;
|
||||
void _notification(int p_what);
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user