mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Added mouse wheel handling for Unix platforms.
This commit is contained in:
parent
5c7415bc45
commit
10a3863f95
@ -58,8 +58,13 @@ namespace cursespp {
|
||||
bool MouseWheelUp() const { return MOUSE_WHEEL_UP; }
|
||||
bool MouseWheelDown() const { return MOUSE_WHEEL_DOWN; }
|
||||
#else
|
||||
bool MouseWheelUp() const { return false; }
|
||||
bool MouseWheelDown() const { return false; }
|
||||
#if NCURSES_MOUSE_VERSION > 1
|
||||
bool MouseWheelUp() const { return state & BUTTON4_PRESSED; }
|
||||
bool MouseWheelDown() const { return state & BUTTON5_PRESSED; }
|
||||
#else
|
||||
bool MouseWheelUp() const { return state & (BUTTON4_PRESSED | REPORT_MOUSE_POSITION); }
|
||||
bool MouseWheelDown() const { return state & (BUTTON2_PRESSED | REPORT_MOUSE_POSITION); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int x, y;
|
||||
|
Loading…
Reference in New Issue
Block a user