- Mouse wheel

This commit is contained in:
2023-09-21 18:52:45 +02:00
parent d3b14662f4
commit 4b588368d8
3 changed files with 17 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ namespace input
static uint8_t keypressed = 0;
static uint8_t keydown = 0;
static uint8_t btnClicked = 0;
static uint8_t wheel = 0;
static int screen_zoom = 1;
void init(const int zoom)
@@ -55,6 +56,11 @@ namespace input
btnClicked = btn;
}
void updateWheel(uint8_t dy)
{
wheel = dy;
}
int mouseX()
{
int x;
@@ -79,4 +85,8 @@ namespace input
return btnClicked == btn;
}
int mouseWheel()
{
return wheel;
}
}