Azenris
Member
Having gui mouse position problems
Not sure what's wrong
Any help please
I attached 2 screenshots in this link
https://imgur.com/a/OFXwfVH
It basically just shows some variables
ignore display size its not used in any calcs ( unless it is behind my back )
display size is not the display size, it seems to be the display size of my other monitor
not sure how you get display size of the current monitor.
window size is sufficient at fullscreen anyway?
ANYWAY, basically my issue is with the GUI_MOUSE Y coord.
At the top of the screen, its 0, as expected.
At the bottom of the screen it reaches only 485. Despite the GUI SIZE shown to be 540.
my GUI_MOUSE positions are gained through
there is a gui resize where my game surface and gui are set the same. there calcs can be seen above
Any ideas whats causing this?
my only CRAYCRAY idea is that device_mouse_x_to_gui & device_mouse_y_to_gui do their conversions using the display size which is inaccurate and as far as I know read only.
Im hoping its just some small overlooked thing you can easyly help with me
Ask for more information if needed. Not really sure what to show
Not sure what's wrong
Any help please
I attached 2 screenshots in this link
https://imgur.com/a/OFXwfVH
It basically just shows some variables
Code:
window size = 1920, 1080
game/res size = 960, 540
gui size = 960, 540
view size = 960, 540
viewport = 0, 0, 1920, 1080
display size is not the display size, it seems to be the display size of my other monitor
not sure how you get display size of the current monitor.
window size is sufficient at fullscreen anyway?
ANYWAY, basically my issue is with the GUI_MOUSE Y coord.
At the top of the screen, its 0, as expected.
At the bottom of the screen it reaches only 485. Despite the GUI SIZE shown to be 540.
my GUI_MOUSE positions are gained through
Code:
device_mouse_x_to_gui( 0 )
device_mouse_y_to_gui( 0 )
Code:
surface_resize( application_surface, _res_w, _res_h );
display_set_gui_size( _res_w, _res_h );
my only CRAYCRAY idea is that device_mouse_x_to_gui & device_mouse_y_to_gui do their conversions using the display size which is inaccurate and as far as I know read only.
Im hoping its just some small overlooked thing you can easyly help with me
Ask for more information if needed. Not really sure what to show