summaryrefslogtreecommitdiff
path: root/scene/gui/texture_rect.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/texture_rect.h')
-rw-r--r--scene/gui/texture_rect.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/scene/gui/texture_rect.h b/scene/gui/texture_rect.h
index efd3f0698a..7d667b25a8 100644
--- a/scene/gui/texture_rect.h
+++ b/scene/gui/texture_rect.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-2022 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2022 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 */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TEXTURE_FRAME_H
-#define TEXTURE_FRAME_H
+#ifndef TEXTURE_RECT_H
+#define TEXTURE_RECT_H
#include "scene/gui/control.h"
@@ -38,7 +38,6 @@ class TextureRect : public Control {
public:
enum StretchMode {
- STRETCH_SCALE_ON_EXPAND, //default, for backwards compatibility
STRETCH_SCALE,
STRETCH_TILE,
STRETCH_KEEP,
@@ -49,11 +48,11 @@ public:
};
private:
- bool expand;
- bool hflip;
- bool vflip;
+ bool ignore_texture_size = false;
+ bool hflip = false;
+ bool vflip = false;
Ref<Texture2D> texture;
- StretchMode stretch_mode;
+ StretchMode stretch_mode = STRETCH_SCALE;
void _texture_changed();
@@ -66,8 +65,8 @@ public:
void set_texture(const Ref<Texture2D> &p_tex);
Ref<Texture2D> get_texture() const;
- void set_expand(bool p_expand);
- bool has_expand() const;
+ void set_ignore_texture_size(bool p_ignore);
+ bool get_ignore_texture_size() const;
void set_stretch_mode(StretchMode p_mode);
StretchMode get_stretch_mode() const;
@@ -83,4 +82,5 @@ public:
};
VARIANT_ENUM_CAST(TextureRect::StretchMode);
-#endif // TEXTURE_FRAME_H
+
+#endif // TEXTURE_RECT_H