Skip to content
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

Merged
merged 1 commit into from
Apr 12, 2022
Merged

Conversation

ConteZero
Copy link
Contributor

RichTextLabel has the option to enable text selection so it could be useful to have a context menu.

@ConteZero ConteZero requested review from a team as code owners April 12, 2022 09:21
@Chaosus Chaosus added this to the 4.0 milestone Apr 12, 2022
Copy link
Member

@bruvzg bruvzg left a 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.

doc/classes/RichTextLabel.xml Outdated Show resolved Hide resolved
@@ -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);
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Comment on lines 4713 to 4716

// Context Menu
BIND_ENUM_CONSTANT(MENU_COPY);
BIND_ENUM_CONSTANT(MENU_SELECT_ALL);
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -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">
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@akien-mga akien-mga merged commit d9cb39c into godotengine:master Apr 12, 2022
@akien-mga
Copy link
Member

Thanks!

@ConteZero ConteZero deleted the context_menu branch April 12, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants