- [FIX] mouse.pos() donava coordenades reals de finestra, en compte de tindre en compte el zoom.
This commit is contained in:
4
mini.cpp
4
mini.cpp
@@ -505,8 +505,8 @@ int main(int argc,char*argv[]){
|
||||
mouse_buttons = SDL_GetMouseState(&real_mouse_x, &real_mouse_y);
|
||||
float mx, my;
|
||||
SDL_RenderCoordinatesFromWindow(mini_ren, real_mouse_x, real_mouse_y, &mx, &my);
|
||||
mouse_x = int(mx);
|
||||
mouse_y = int(my);
|
||||
mouse_x = int(mx/screen_zoom);
|
||||
mouse_y = int(my/screen_zoom);
|
||||
//mouse_x /= screen_zoom; mouse_y /= screen_zoom;
|
||||
|
||||
if (SDL_GetTicks()-dt>13) {
|
||||
|
||||
Reference in New Issue
Block a user