Add missing default value for RichTextLabel method
This commit is contained in:
parent
cdd2313ba2
commit
4029a05fae
2 changed files with 10 additions and 4 deletions
|
@ -329,9 +329,10 @@
|
|||
<method name="push_font">
|
||||
<return type="void" />
|
||||
<param index="0" name="font" type="Font" />
|
||||
<param index="1" name="font_size" type="int" />
|
||||
<param index="1" name="font_size" type="int" default="0" />
|
||||
<description>
|
||||
Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
|
||||
Passing [code]0[/code] to [param font_size] will use the existing default font size.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_font_size">
|
||||
|
@ -506,7 +507,7 @@
|
|||
<return type="void" />
|
||||
<param index="0" name="column" type="int" />
|
||||
<param index="1" name="expand" type="bool" />
|
||||
<param index="2" name="ratio" type="int" />
|
||||
<param index="2" name="ratio" type="int" default="1" />
|
||||
<description>
|
||||
Edits the selected column's expansion options. If [param expand] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios.
|
||||
For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively.
|
||||
|
|
|
@ -5480,7 +5480,7 @@ void RichTextLabel::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("add_image", "image", "width", "height", "color", "inline_align", "region"), &RichTextLabel::add_image, DEFVAL(0), DEFVAL(0), DEFVAL(Color(1.0, 1.0, 1.0)), DEFVAL(INLINE_ALIGNMENT_CENTER), DEFVAL(Rect2(0, 0, 0, 0)));
|
||||
ClassDB::bind_method(D_METHOD("newline"), &RichTextLabel::add_newline);
|
||||
ClassDB::bind_method(D_METHOD("remove_paragraph", "paragraph"), &RichTextLabel::remove_paragraph);
|
||||
ClassDB::bind_method(D_METHOD("push_font", "font", "font_size"), &RichTextLabel::push_font);
|
||||
ClassDB::bind_method(D_METHOD("push_font", "font", "font_size"), &RichTextLabel::push_font, DEFVAL(0));
|
||||
ClassDB::bind_method(D_METHOD("push_font_size", "font_size"), &RichTextLabel::push_font_size);
|
||||
ClassDB::bind_method(D_METHOD("push_normal"), &RichTextLabel::push_normal);
|
||||
ClassDB::bind_method(D_METHOD("push_bold"), &RichTextLabel::push_bold);
|
||||
|
@ -5499,7 +5499,7 @@ void RichTextLabel::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("push_strikethrough"), &RichTextLabel::push_strikethrough);
|
||||
ClassDB::bind_method(D_METHOD("push_table", "columns", "inline_align", "align_to_row"), &RichTextLabel::push_table, DEFVAL(INLINE_ALIGNMENT_TOP), DEFVAL(-1));
|
||||
ClassDB::bind_method(D_METHOD("push_dropcap", "string", "font", "size", "dropcap_margins", "color", "outline_size", "outline_color"), &RichTextLabel::push_dropcap, DEFVAL(Rect2()), DEFVAL(Color(1, 1, 1)), DEFVAL(0), DEFVAL(Color(0, 0, 0, 0)));
|
||||
ClassDB::bind_method(D_METHOD("set_table_column_expand", "column", "expand", "ratio"), &RichTextLabel::set_table_column_expand);
|
||||
ClassDB::bind_method(D_METHOD("set_table_column_expand", "column", "expand", "ratio"), &RichTextLabel::set_table_column_expand, DEFVAL(1));
|
||||
ClassDB::bind_method(D_METHOD("set_cell_row_background_color", "odd_row_bg", "even_row_bg"), &RichTextLabel::set_cell_row_background_color);
|
||||
ClassDB::bind_method(D_METHOD("set_cell_border_color", "color"), &RichTextLabel::set_cell_border_color);
|
||||
ClassDB::bind_method(D_METHOD("set_cell_size_override", "min_size", "max_size"), &RichTextLabel::set_cell_size_override);
|
||||
|
@ -5620,6 +5620,11 @@ void RichTextLabel::_bind_methods() {
|
|||
|
||||
ClassDB::bind_method(D_METHOD("_thread_end"), &RichTextLabel::_thread_end);
|
||||
|
||||
#ifndef DISABLE_DEPRECATED
|
||||
ClassDB::bind_compatibility_method(D_METHOD("push_font", "font", "font_size"), &RichTextLabel::push_font);
|
||||
ClassDB::bind_compatibility_method(D_METHOD("set_table_column_expand", "column", "expand", "ratio"), &RichTextLabel::set_table_column_expand);
|
||||
#endif // DISABLE_DEPRECATED
|
||||
|
||||
// Note: set "bbcode_enabled" first, to avoid unnecessary "text" resets.
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "bbcode_enabled"), "set_use_bbcode", "is_using_bbcode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "text", PROPERTY_HINT_MULTILINE_TEXT), "set_text", "get_text");
|
||||
|
|
Loading…
Reference in a new issue