diff options
| author | geequlim | 2017-02-04 12:01:12 +0800 |
|---|---|---|
| committer | geequlim | 2017-02-04 14:56:26 +0800 |
| commit | 58a700e43e69ee025e046caa9677fdf755df17b8 (patch) | |
| tree | 9de50de5c982eebdfc7b254badc9877f711f0f3b /scene/gui/texture_button.h | |
| parent | 0c1c34ef22e50fd83747358de645ac021fba660d (diff) | |
| download | godot-58a700e43e69ee025e046caa9677fdf755df17b8.tar.gz godot-58a700e43e69ee025e046caa9677fdf755df17b8.tar.zst godot-58a700e43e69ee025e046caa9677fdf755df17b8.zip | |
Make same resize behavior for TextureButton with TextureFrame.
Remove property 'scale' of TextureButton which is not required any more.
Diffstat (limited to '')
| -rw-r--r-- | scene/gui/texture_button.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h index 047dbfadf..1f971ce84 100644 --- a/scene/gui/texture_button.h +++ b/scene/gui/texture_button.h @@ -31,6 +31,7 @@ #include "scene/gui/base_button.h" #include "scene/resources/bit_mask.h" +#include "scene/gui/texture_frame.h" class TextureButton : public BaseButton { OBJ_TYPE( TextureButton, BaseButton ); @@ -41,9 +42,9 @@ class TextureButton : public BaseButton { Ref<Texture> disabled; Ref<Texture> focused; Ref<BitMap> click_mask; - Size2 scale; Color modulate; - + bool expand; + TextureFrame::StretchMode stretch_mode; protected: @@ -68,12 +69,15 @@ public: Ref<Texture> get_focused_texture() const; Ref<BitMap> get_click_mask() const; - void set_texture_scale(Size2 p_scale); - Size2 get_texture_scale() const; - void set_modulate(const Color& p_modulate); Color get_modulate() const; + void set_expand(bool expand); + bool has_expand() const; + + void set_stretch_mode(TextureFrame::StretchMode stretch_mode); + TextureFrame::StretchMode get_stretch_mode() const; + TextureButton(); }; |
