summaryrefslogtreecommitdiff
path: root/scene/gui/texture_progress.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/texture_progress.cpp')
-rw-r--r--scene/gui/texture_progress.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/scene/gui/texture_progress.cpp b/scene/gui/texture_progress.cpp
index 081c7ddb73..08025452d8 100644
--- a/scene/gui/texture_progress.cpp
+++ b/scene/gui/texture_progress.cpp
@@ -29,6 +29,8 @@
/*************************************************************************/
#include "texture_progress.h"
+#include "engine.h"
+
void TextureProgress::set_under_texture(const Ref<Texture> &p_texture) {
under = p_texture;
@@ -179,7 +181,7 @@ void TextureProgress::_notification(int p_what) {
}
draw_polygon(points, Vector<Color>(), uvs, progress);
}
- if (get_tree()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint()) {
Point2 p = progress->get_size();
p.x *= get_relative_center().x;
p.y *= get_relative_center().y;
@@ -273,12 +275,12 @@ void TextureProgress::_bind_methods() {
ADD_PROPERTYNZ(PropertyInfo(Variant::REAL, "radial_fill_degrees", PROPERTY_HINT_RANGE, "0.0,360.0,0.1,slider"), "set_fill_degrees", "get_fill_degrees");
ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "radial_center_offset"), "set_radial_center_offset", "get_radial_center_offset");
- BIND_CONSTANT(FILL_LEFT_TO_RIGHT);
- BIND_CONSTANT(FILL_RIGHT_TO_LEFT);
- BIND_CONSTANT(FILL_TOP_TO_BOTTOM);
- BIND_CONSTANT(FILL_BOTTOM_TO_TOP);
- BIND_CONSTANT(FILL_CLOCKWISE);
- BIND_CONSTANT(FILL_COUNTER_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_LEFT_TO_RIGHT);
+ BIND_ENUM_CONSTANT(FILL_RIGHT_TO_LEFT);
+ BIND_ENUM_CONSTANT(FILL_TOP_TO_BOTTOM);
+ BIND_ENUM_CONSTANT(FILL_BOTTOM_TO_TOP);
+ BIND_ENUM_CONSTANT(FILL_CLOCKWISE);
+ BIND_ENUM_CONSTANT(FILL_COUNTER_CLOCKWISE);
}
TextureProgress::TextureProgress() {