[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mouse.Button , ensure correct right button value


On Tue, 2 Apr 2024 at 12:49, BB <adamnt42@xxxxxxxxx> wrote:

>
> 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 = 3
> They 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 Easter
> BruceS
>
> Just be thankful that you don't have one of these new-fangled 6 button
> full sleeve mouses!
>
> 😁
>
> b
>
Hahaha :)
Is that mouse especially for a skiing game?   :D

PNG image


References:
Mouse.Button , ensure correct right button valueBruce Steers <bsteers4@xxxxxxxxx>
Re: Mouse.Button , ensure correct right button valueBB <adamnt42@xxxxxxxxx>