Skip to content

Commit

Permalink
RichTextLabel fixes
Browse files Browse the repository at this point in the history
- Unexpose ItemType enum, since it is not used in public API.
- Fix documentation for meta tag, since it has no BBCode equivalent.
  • Loading branch information
RedMser committed Feb 14, 2023
1 parent 8c7b98d commit 22dd621
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 84 deletions.
56 changes: 1 addition & 55 deletions doc/classes/RichTextLabel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
<return type="void" />
<param index="0" name="data" type="Variant" />
<description>
Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
Adds a meta tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
</description>
</method>
<method name="push_mono">
Expand Down Expand Up @@ -625,60 +625,6 @@
<constant name="LIST_DOTS" value="3" enum="ListType">
Each list item has a filled circle marker.
</constant>
<constant name="ITEM_FRAME" value="0" enum="ItemType">
</constant>
<constant name="ITEM_TEXT" value="1" enum="ItemType">
</constant>
<constant name="ITEM_IMAGE" value="2" enum="ItemType">
</constant>
<constant name="ITEM_NEWLINE" value="3" enum="ItemType">
</constant>
<constant name="ITEM_FONT" value="4" enum="ItemType">
</constant>
<constant name="ITEM_FONT_SIZE" value="5" enum="ItemType">
</constant>
<constant name="ITEM_FONT_FEATURES" value="6" enum="ItemType">
</constant>
<constant name="ITEM_COLOR" value="7" enum="ItemType">
</constant>
<constant name="ITEM_OUTLINE_SIZE" value="8" enum="ItemType">
</constant>
<constant name="ITEM_OUTLINE_COLOR" value="9" enum="ItemType">
</constant>
<constant name="ITEM_UNDERLINE" value="10" enum="ItemType">
</constant>
<constant name="ITEM_STRIKETHROUGH" value="11" enum="ItemType">
</constant>
<constant name="ITEM_PARAGRAPH" value="12" enum="ItemType">
</constant>
<constant name="ITEM_INDENT" value="13" enum="ItemType">
</constant>
<constant name="ITEM_LIST" value="14" enum="ItemType">
</constant>
<constant name="ITEM_TABLE" value="15" enum="ItemType">
</constant>
<constant name="ITEM_FADE" value="16" enum="ItemType">
</constant>
<constant name="ITEM_SHAKE" value="17" enum="ItemType">
</constant>
<constant name="ITEM_WAVE" value="18" enum="ItemType">
</constant>
<constant name="ITEM_TORNADO" value="19" enum="ItemType">
</constant>
<constant name="ITEM_RAINBOW" value="20" enum="ItemType">
</constant>
<constant name="ITEM_BGCOLOR" value="21" enum="ItemType">
</constant>
<constant name="ITEM_FGCOLOR" value="22" enum="ItemType">
</constant>
<constant name="ITEM_META" value="23" enum="ItemType">
</constant>
<constant name="ITEM_HINT" value="24" enum="ItemType">
</constant>
<constant name="ITEM_DROPCAP" value="25" enum="ItemType">
</constant>
<constant name="ITEM_CUSTOMFX" value="26" enum="ItemType">
</constant>
<constant name="MENU_COPY" value="0" enum="MenuItems">
Copies the selected text.
</constant>
Expand Down
28 changes: 0 additions & 28 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5520,34 +5520,6 @@ void RichTextLabel::_bind_methods() {
BIND_ENUM_CONSTANT(LIST_ROMAN);
BIND_ENUM_CONSTANT(LIST_DOTS);

BIND_ENUM_CONSTANT(ITEM_FRAME);
BIND_ENUM_CONSTANT(ITEM_TEXT);
BIND_ENUM_CONSTANT(ITEM_IMAGE);
BIND_ENUM_CONSTANT(ITEM_NEWLINE);
BIND_ENUM_CONSTANT(ITEM_FONT);
BIND_ENUM_CONSTANT(ITEM_FONT_SIZE);
BIND_ENUM_CONSTANT(ITEM_FONT_FEATURES);
BIND_ENUM_CONSTANT(ITEM_COLOR);
BIND_ENUM_CONSTANT(ITEM_OUTLINE_SIZE);
BIND_ENUM_CONSTANT(ITEM_OUTLINE_COLOR);
BIND_ENUM_CONSTANT(ITEM_UNDERLINE);
BIND_ENUM_CONSTANT(ITEM_STRIKETHROUGH);
BIND_ENUM_CONSTANT(ITEM_PARAGRAPH);
BIND_ENUM_CONSTANT(ITEM_INDENT);
BIND_ENUM_CONSTANT(ITEM_LIST);
BIND_ENUM_CONSTANT(ITEM_TABLE);
BIND_ENUM_CONSTANT(ITEM_FADE);
BIND_ENUM_CONSTANT(ITEM_SHAKE);
BIND_ENUM_CONSTANT(ITEM_WAVE);
BIND_ENUM_CONSTANT(ITEM_TORNADO);
BIND_ENUM_CONSTANT(ITEM_RAINBOW);
BIND_ENUM_CONSTANT(ITEM_BGCOLOR);
BIND_ENUM_CONSTANT(ITEM_FGCOLOR);
BIND_ENUM_CONSTANT(ITEM_META);
BIND_ENUM_CONSTANT(ITEM_HINT);
BIND_ENUM_CONSTANT(ITEM_DROPCAP);
BIND_ENUM_CONSTANT(ITEM_CUSTOMFX);

BIND_ENUM_CONSTANT(MENU_COPY);
BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
BIND_ENUM_CONSTANT(MENU_MAX);
Expand Down
1 change: 0 additions & 1 deletion scene/gui/rich_text_label.h
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,6 @@ class RichTextLabel : public Control {
};

VARIANT_ENUM_CAST(RichTextLabel::ListType);
VARIANT_ENUM_CAST(RichTextLabel::ItemType);
VARIANT_ENUM_CAST(RichTextLabel::MenuItems);

#endif // RICH_TEXT_LABEL_H

0 comments on commit 22dd621

Please sign in to comment.