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

RichTextLabel: Add ability to get col/row position at mouse or arbitrary point #1559

Open
me2beats opened this issue Sep 24, 2020 · 0 comments · May be fixed by godotengine/godot#84715
Open

Comments

@me2beats
Copy link

Describe the project you are working on:
gdscript plugins

Describe the problem or limitation you are having in your project:
In gdscript I can't find a way to get col/row position at mouse for RichTextLabel.
maybe it would also be useful to have this feature for a regular Label

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Adding appropriate api methods would solve the problem

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
get_position_at_mouse() returns the text column an row indices at mouse
or
get_position_at_point(point:Vector2) returns column an row indices at some point
Imo the second one is more flexible.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
no it can't, since there's no api for that (available in gdscript)

Is there a reason why this should be core and not an add-on in the asset library?:
not sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants