diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-03-04 11:42:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-04 11:42:53 +0100 |
commit | 8845798b44883b9b2c5a552aaa85530298c8a71a (patch) | |
tree | 7f5f4797d241d6f3a619b668830137cdb7ed67de /scene/gui/link_button.cpp | |
parent | f94233ee539e4ddfd6497d0f37257c6dd59efcb7 (diff) | |
parent | a06f82ca4dbdff633424e59243dc411bb8070b99 (diff) |
Merge pull request #58739 from Calinou/control-add-constructors
Add optional constructor arguments to more Control nodes
Diffstat (limited to 'scene/gui/link_button.cpp')
-rw-r--r-- | scene/gui/link_button.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index 8f40f717c2..dc4f09d22d 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -317,8 +317,10 @@ void LinkButton::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "structured_text_bidi_override_options"), "set_structured_text_bidi_override_options", "get_structured_text_bidi_override_options"); } -LinkButton::LinkButton() { +LinkButton::LinkButton(const String &p_text) { text_buf.instantiate(); set_focus_mode(FOCUS_NONE); set_default_cursor_shape(CURSOR_POINTING_HAND); + + set_text(p_text); } |