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

Proposal defos.get_cursor_pos() #82

Closed
subsoap opened this issue Jul 3, 2018 · 3 comments
Closed

Proposal defos.get_cursor_pos() #82

subsoap opened this issue Jul 3, 2018 · 3 comments

Comments

@subsoap
Copy link
Owner

subsoap commented Jul 3, 2018

defos.get_cursor_pos() -- screen
defos.get_cursor_pos_view() -- view

Would return the cursor position x,y relative to the game's view. Then we can get/set cursor position between frames while calculating dx/dy ourselves.

@subsoap
Copy link
Owner Author

subsoap commented Jul 3, 2018

defos.set_cursor_pos(x, y) -- In screen coordinates
defos.move_cursor_to(x, y) -- In game view coordinates

The current set functions may need to be renamed for clarity. So we would need two get functions too one for absolute screen coords one for relative view coords.

@subsoap
Copy link
Owner Author

subsoap commented Jul 3, 2018

I will do for Windows in a few hours

@subsoap
Copy link
Owner Author

subsoap commented Jul 3, 2018

Should we have cursor get/sets which use the view positions and mimic action.screen_x action.screen_y like in picture related or let user handle that in their scripts?

defos.set_action_pos(x,y)
local action = {defos.get_action_pos()}

2018-07-03 15_31_47-

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

No branches or pull requests

2 participants