summaryrefslogtreecommitdiff
path: root/scene/gui/option_button.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-04 11:42:53 +0100
committerGitHub <noreply@github.com>2022-03-04 11:42:53 +0100
commit8845798b44883b9b2c5a552aaa85530298c8a71a (patch)
tree7f5f4797d241d6f3a619b668830137cdb7ed67de /scene/gui/option_button.cpp
parentf94233ee539e4ddfd6497d0f37257c6dd59efcb7 (diff)
parenta06f82ca4dbdff633424e59243dc411bb8070b99 (diff)
Merge pull request #58739 from Calinou/control-add-constructors
Add optional constructor arguments to more Control nodes
Diffstat (limited to 'scene/gui/option_button.cpp')
-rw-r--r--scene/gui/option_button.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index 698d74843c..b3804e73d9 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -412,7 +412,8 @@ void OptionButton::_bind_methods() {
ADD_SIGNAL(MethodInfo("item_focused", PropertyInfo(Variant::INT, "index")));
}
-OptionButton::OptionButton() {
+OptionButton::OptionButton(const String &p_text) :
+ Button(p_text) {
set_toggle_mode(true);
set_text_alignment(HORIZONTAL_ALIGNMENT_LEFT);
if (is_layout_rtl()) {