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
Functions for using screen positions in GUI component gui.set_screen_pos() #5886
Labels
Projects
Comments
AGulev
added
feature request
A suggestion for a new feature
gui
Issues related to gui components
labels
Jun 20, 2021
Lines 4254 to 4312 in b240830
|
AGulev
changed the title
Function for using screen positions in GUI component gui.set_screen_pos()
Functions for using screen positions in GUI component gui.set_screen_pos()
Jun 22, 2021
Very useful feature. Sometime it is very frustrating when you need to synchronize positions of nodes in several GUIs. Aligning them according to screen coordinates is a key to this problem and gui.set_screen_pos() would be very helpful. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Is your feature request related to a problem? Please describe (REQUIRED):
For manipulations between game world and gui or between different gui components the engine should have API to convert cordinates using some universal cordinates system.
At the moment we use screen coordinates as such universal coordinates we may use for conversion.
Describe the solution you'd like (REQUIRED):
The engine has functions to get screen cordinates, but there are no functions in gui to use them.
I think the engine should have :
gui.set_screen_pos()
and
local pos = gui.convert_screen_pos_to_node_pos(node, screen_pos)
(it's hard to find clear and short name here, pls suggest your variants).Describe alternatives you've considered (REQUIRED):
I implemented these functions in the native extension, but I think it should be part of the gui.* API.
https://github.com/AGulev/set_screen_position
The text was updated successfully, but these errors were encountered: