- No se, molts canvis i coses
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "input.h"
|
||||
#include <SDL3/SDL.h>
|
||||
#include "draw.h"
|
||||
|
||||
namespace input
|
||||
{
|
||||
@@ -79,7 +78,7 @@ namespace input
|
||||
{
|
||||
float x;
|
||||
SDL_GetMouseState(&x, NULL);
|
||||
return (x-draw::getOffsetX())/draw::getScaleX();
|
||||
return x;
|
||||
}
|
||||
|
||||
// Torna la posició Y actual del ratolí
|
||||
@@ -87,7 +86,7 @@ namespace input
|
||||
{
|
||||
float y;
|
||||
SDL_GetMouseState(NULL, &y);
|
||||
return (y-draw::getOffsetY())/draw::getScaleY();
|
||||
return y;
|
||||
}
|
||||
|
||||
// Determina si el botó del ratolí especificat està sent polsada ara mateix
|
||||
@@ -103,6 +102,11 @@ namespace input
|
||||
return btnClicked == btn;
|
||||
}
|
||||
|
||||
void mouseDiscard()
|
||||
{
|
||||
btnClicked = 0;
|
||||
}
|
||||
|
||||
// Obté el valor actual de la rodeta del ratolí
|
||||
const int mouseWheel()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user