diff options
Diffstat (limited to 'scene/gui/button.cpp')
-rw-r--r-- | scene/gui/button.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 9a0b3b3c89..1fa03f81f4 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -3,7 +3,7 @@ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ -/* http://www.godotengine.org */ +/* https://godotengine.org */ /*************************************************************************/ /* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ /* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ @@ -59,7 +59,7 @@ void Button::_notification(int p_what) { if (p_what == NOTIFICATION_TRANSLATION_CHANGED) { - xl_text = XL_MESSAGE(text); + xl_text = tr(text); minimum_size_changed(); update(); } @@ -172,7 +172,7 @@ void Button::set_text(const String &p_text) { if (text == p_text) return; text = p_text; - xl_text = XL_MESSAGE(p_text); + xl_text = tr(p_text); update(); _change_notify("text"); minimum_size_changed(); @@ -245,9 +245,9 @@ void Button::_bind_methods() { ClassDB::bind_method(D_METHOD("get_text_align"), &Button::get_text_align); ClassDB::bind_method(D_METHOD("is_flat"), &Button::is_flat); - BIND_CONSTANT(ALIGN_LEFT); - BIND_CONSTANT(ALIGN_CENTER); - BIND_CONSTANT(ALIGN_RIGHT); + BIND_ENUM_CONSTANT(ALIGN_LEFT); + BIND_ENUM_CONSTANT(ALIGN_CENTER); + BIND_ENUM_CONSTANT(ALIGN_RIGHT); ADD_PROPERTYNZ(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT_INTL), "set_text", "get_text"); ADD_PROPERTYNZ(PropertyInfo(Variant::OBJECT, "icon", PROPERTY_HINT_RESOURCE_TYPE, "Texture"), "set_button_icon", "get_button_icon"); |