-
-
Notifications
You must be signed in to change notification settings - Fork 20.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add context menu to RichTextLabel #60170
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else seems fine.
scene/gui/rich_text_label.h
Outdated
@@ -642,6 +667,7 @@ class RichTextLabel : public Control { | |||
VARIANT_ENUM_CAST(RichTextLabel::AutowrapMode); | |||
VARIANT_ENUM_CAST(RichTextLabel::ListType); | |||
VARIANT_ENUM_CAST(RichTextLabel::ItemType); | |||
VARIANT_ENUM_CAST(RichTextLabel::MenuItems); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This likely no longer needs to be exposed since _menu_option
isn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
scene/gui/rich_text_label.cpp
Outdated
|
||
// Context Menu | ||
BIND_ENUM_CONSTANT(MENU_COPY); | ||
BIND_ENUM_CONSTANT(MENU_SELECT_ALL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
doc/classes/RichTextLabel.xml
Outdated
@@ -607,6 +626,12 @@ | |||
<constant name="VC_GLYPHS_RTL" value="4" enum="VisibleCharactersBehavior"> | |||
Displays [member percent_visible] glyphs, starting from the right. | |||
</constant> | |||
<constant name="MENU_COPY" value="0" enum="MenuItems"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should also be removed since they were unexposed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Thanks! |
RichTextLabel has the option to enable text selection so it could be useful to have a context menu.