LemonUIbyLemon/LemonUI

Mouse Interactions Still Active When UseMouse = false

Opened this issue · 1 comments

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

  • Add a new property or method to completely disable mouse interactions, such as:
    • menu.IgnoreMouseInput = true
    • menu.DisableMouseControls()
  • Check and handle mouse input status internally when UseMouse is set to false to prevent any form of mouse interaction.

Environment

  • LemonUI Version: [SHVDN3.2.1.2]
  • Game Version: GTA V Steam
  • Platform: [ScriptHookVDotNet, etc.]

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:

  • None: No mouse usage (mouse input is completely ignored)
  • Click: Allows the clicking for navigation
  • Wheel: Current behavior, uses the mouse wheel for navigating, click for accept, right click for return