From 58a700e43e69ee025e046caa9677fdf755df17b8 Mon Sep 17 00:00:00 2001 From: geequlim Date: Sat, 4 Feb 2017 12:01:12 +0800 Subject: Make same resize behavior for TextureButton with TextureFrame. Remove property 'scale' of TextureButton which is not required any more. --- scene/gui/texture_button.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'scene/gui/texture_button.h') 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 disabled; Ref focused; Ref click_mask; - Size2 scale; Color modulate; - + bool expand; + TextureFrame::StretchMode stretch_mode; protected: @@ -68,12 +69,15 @@ public: Ref get_focused_texture() const; Ref 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(); }; -- cgit v1.2.3-70-g09d2