LemonUIbyLemon / LemonUI

LemonUI for .NET (FiveM, RageMP, RagePluginHook and ScriptHookVDotNet 3)
MIT License
182 stars 42 forks source link

Mouse Interactions Still Active When UseMouse = false #188

Open Fern-Aerell opened 1 month ago

Fern-Aerell commented 1 month ago

Description

When UseMouse is set to false on a menu, the mouse cursor is hidden, and camera movement is enabled again. However, the menu is still responding to mouse interactions like clicks or scrolls.

This causes unexpected behavior, as disabling UseMouse should entirely prevent any mouse interactions with the menu.

Steps to Reproduce

  1. Create a menu using LemonUI and set UseMouse to false.
  2. Make the menu visible.
  3. Try clicking or scrolling with the mouse on the menu area (even if the mouse cursor is hidden).
  4. Observe that the menu still responds to these mouse inputs (e.g., menu items get selected or activated).

Expected Behavior

When UseMouse = false, the menu should not respond to any mouse interactions, including clicks, scrolls, or hovering over menu items. Only keyboard or controller inputs should work.

Actual Behavior

The mouse is still capable of interacting with the menu, causing unintended menu selections or activations.

Possible Solutions

Environment

justalemon commented 4 days ago

I just had the time to check this.

My current plan is to deprecatate the UseMouse property and instead provide MouseBehavior, which set the behaviour for the mouse between 3 possible modes: