InventoryGui icon indicating copy to clipboard operation
InventoryGui copied to clipboard

Double clicking registers 3 clicks instead of 2

Open LaserSlime opened this issue 4 years ago • 4 comments

If you double click a GuiElement and let's say print out a message each time it is clicked, you get 3 messages instead of only 2.

LaserSlime avatar Nov 27 '21 18:11 LaserSlime

Are they all of the same click type? Because I'm pretty sure double clicking is a different action from normal clicks in Vanilla inventories.

On Sat, 27 Nov 2021, 19:56 LaserSlime, @.***> wrote:

If you double click a GuiElement and let's say print out a message each time it is clicked, you get 3 messages instead of only 2.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Phoenix616/InventoryGui/issues/38, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABMAMTO5M6UYSLQNM5KYZ6TUOESW3ANCNFSM5I4PARIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Phoenix616 avatar Nov 27 '21 20:11 Phoenix616

What exactly do you mean by "click type"? It generally happens on all gui elements where you have a way to tell how often theyre clicked. (You can mostly hear the sound being played three times instead of two)

LaserSlime avatar Dec 02 '21 20:12 LaserSlime

The type that is part of the InventoryClickEvent which triggered the Click. It's provided in Click#getEvent.

Phoenix616 avatar Dec 03 '21 00:12 Phoenix616

Ok i found the issue. It registers both the 2 single left clicks and an additional double click. Which results in 3 total clicks. Workaround would be to ignore double clicks. But this should be handled by the plugin itself.

LaserSlime avatar Dec 04 '21 16:12 LaserSlime