[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mouse.Button , ensure correct right button value
[Thread Prev] | [Thread Next]
- Subject: Re: Mouse.Button , ensure correct right button value
- From: BB <adamnt42@xxxxxxxxx>
- Date: Tue, 2 Apr 2024 22:19:25 +1030
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 2/4/24 8:44 pm, Bruce Steers wrote:
I have been helping someone dealing with a mouse event issue and pointed out a possible error in their code.
They were using "If Mouse.Button = 2" to detect a right mouse click.
I said that could be the problem as on my machine right click is Mouse.Button = 3They replied that no, right click is Mouse.Button = 2 on their machine.
Meaning my recent game that uses Mouse.Button to detect clicks is incorrectly coded as I am assuming right click is 3
So my question would be, is there a way to detect what Mouse.Button value a right click will be?
Mouse.Left and Mouse.Right were not good enough as the detection in the MouseDown needs to detect the click , and if you left click while holding right mouse down then the Mouse.Button will be 1 but Mouse.Left and Mouse.Right will both be true so Mouse.Button was a better option.But i did not realize the value of right button can change :-\
I'm now thinking of some workarounds but I'm wondering if there may be a simple way to obtain the valid Button values .
Respects.
Happy EasterBruceS
Just be thankful that you don't have one of these new-fangled 6
button full sleeve mouses!
😁
b
Re: Mouse.Button , ensure correct right button value | Bruce Steers <bsteers4@xxxxxxxxx> |
Mouse.Button , ensure correct right button value | Bruce Steers <bsteers4@xxxxxxxxx> |