Hello,
In the callback on_mouse_click(MouseButton button)
I try to detect which button has been pressed:
Code: ags
The problem is when i press left button, it's not seen as a eMouseLeft code.
The enum is described like this in the documentation:
Code: ags
So eMouseLeft must be 0 or 1 i think (depending the start index).
When i press the buttons of my mouse, it triggers the default branch in my switch/case.
I get those values from my display box:
left : 5
right : 6
middle : 7
wheel up : 8
wheel down : 9 (note the value greater than the number of values in the enum)
Well... i don't understand what happens.
Thank you.
In the callback on_mouse_click(MouseButton button)
I try to detect which button has been pressed:
switch(button) {
case eMouseLeft:
Display("left button");
break;
default:
Display("unknown button: %d", button);
break;
The problem is when i press left button, it's not seen as a eMouseLeft code.
The enum is described like this in the documentation:
enum MouseButton {
eMouseLeft,
eMouseRight,
eMouseMiddle,
eMouseLeftInv,
eMouseMiddleInv,
eMouseRightInv,
eMouseWheelNorth,
eMouseWheelSouth
};
So eMouseLeft must be 0 or 1 i think (depending the start index).
When i press the buttons of my mouse, it triggers the default branch in my switch/case.
I get those values from my display box:
left : 5
right : 6
middle : 7
wheel up : 8
wheel down : 9 (note the value greater than the number of values in the enum)
Well... i don't understand what happens.
Thank you.