Added mouse scroll
This commit is contained in:
parent
18058c14f1
commit
de3b0246e9
|
@ -37,12 +37,12 @@ cc src/devices/datetime.c src/devices/system.c src/devices/file.c src/uxn.c -DND
|
|||
## Devices
|
||||
|
||||
- `00` system
|
||||
- `10` console(partial)
|
||||
- `10` console
|
||||
- `20` screen
|
||||
- `30` audio(missing)
|
||||
- `70` midi(missing)
|
||||
- `80` controller
|
||||
- `90` mouse(partial)
|
||||
- `90` mouse
|
||||
- `a0` file
|
||||
- `c0` datetime
|
||||
|
||||
|
|
2
build.sh
2
build.sh
|
@ -32,4 +32,4 @@ bin/uxncli etc/drifblim.rom etc/polycat.tal && mv etc/polycat.rom bin/
|
|||
echo "Running.."
|
||||
bin/uxn11 bin/polycat.rom
|
||||
|
||||
echo "Done."
|
||||
echo "Done."
|
||||
|
|
|
@ -148,7 +148,12 @@ processEvent(Uxn *u)
|
|||
} break;
|
||||
case ButtonPress: {
|
||||
XButtonPressedEvent *e = (XButtonPressedEvent *)&ev;
|
||||
mouse_down(u, &u->dev[0x90], 0x1 << (e->button - 1));
|
||||
if(e->button == 4)
|
||||
mouse_scroll(u, &u->dev[0x90], 0, 1);
|
||||
else if(e->button == 5)
|
||||
mouse_scroll(u, &u->dev[0x90], 0, -1);
|
||||
else
|
||||
mouse_down(u, &u->dev[0x90], 0x1 << (e->button - 1));
|
||||
} break;
|
||||
case ButtonRelease: {
|
||||
XButtonPressedEvent *e = (XButtonPressedEvent *)&ev;
|
||||
|
|
Loading…
Reference in New Issue