You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add optional constructor arguments to more Control nodes
This can be used to make editor code more compact. However, as of writing, these constructor arguments cannot be used from the scripting API. This was already provided for Label and CheckBox, but it was missing for other Control nodes where it made sense to provide a default value.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user