Legacy GM difference between coordinates

does anybody know the difference between the draw gui event coordinates and the draw event coordinates?

is there a way to convert between them?
is there a way to make myself a statement that automatically converts between them depending on the view?
 

Jakylgamer

Member
think of the gui as a surface that is already following the view (not really following it but rather is the window itself), but there are ways to make the drawn buttons clickable if thats what youre wanting to do.
 
well I downloaded this
and I was trying to align and stretch it to the bottom of the view

I wanted to use maxwinapi2 but I guess it was outdated which is weird since I didn't have any import errors
 
Last edited:
P

Paolo Mazzon

Guest
Draw gui is directly to the screen (ie; the window, or monitor in fullscreen) while the draw event is drawing to the game world (And thus, fabricated by views/any scaling methods you have).

So the coordinates 32,32 in draw gui mean 32,32 on the game window, while 32,32 in the draw event mean 32,32 in the game world. How you convert between the two will be specialized to any scaling methods/views you have implemented.
 
well I've tried scaling it by subtracting it from various view functions
but it doesn't seem to work

hmm for some reason it seems to be drawing like in opposite coordinates
I am drawing it with the code

Code:
gui_draw(gui, view_wview-mouse_x, view_hview-mouse_y)
but when I move my mouse left it moves right
and when I move my mouse right it moves left
same with the vertical axis

I don't think its the extension
is it possible for the draw gui event to do this?
 
Last edited:

obscene

Member
Not reading about the entire issue here, but just on your last post about the reversal...

mouse_x-view_wview, mouse_y-view_hview
 
@obscene ok that fixed the reversal
however it seems my gui isn't drawing to the mouse position exactly
it seems to be desynced with my mouse aka moving slower then it

I think there is something still with the gui draw event and the actual position of the mouse
 
Top