diff options
Diffstat (limited to 'scene/gui/texture_button.h')
-rw-r--r-- | scene/gui/texture_button.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/scene/gui/texture_button.h b/scene/gui/texture_button.h index 43b10a8e8b..8361f3c341 100644 --- a/scene/gui/texture_button.h +++ b/scene/gui/texture_button.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -34,7 +34,6 @@ #include "scene/gui/base_button.h" #include "scene/resources/bit_map.h" class TextureButton : public BaseButton { - GDCLASS(TextureButton, BaseButton); public: @@ -55,16 +54,19 @@ private: Ref<Texture2D> disabled; Ref<Texture2D> focused; Ref<BitMap> click_mask; - bool expand; - StretchMode stretch_mode; + bool expand = false; + StretchMode stretch_mode = STRETCH_SCALE; Rect2 _texture_region; Rect2 _position_rect; - bool _tile; + bool _tile = false; + + bool hflip = false; + bool vflip = false; protected: - virtual Size2 get_minimum_size() const; - virtual bool has_point(const Point2 &p_point) const; + virtual Size2 get_minimum_size() const override; + virtual bool has_point(const Point2 &p_point) const override; void _notification(int p_what); static void _bind_methods(); @@ -89,6 +91,12 @@ public: void set_stretch_mode(StretchMode p_stretch_mode); StretchMode get_stretch_mode() const; + void set_flip_h(bool p_flip); + bool is_flipped_h() const; + + void set_flip_v(bool p_flip); + bool is_flipped_v() const; + TextureButton(); }; |