How to automaticly handle widgets in the viewport including cursor?

i did this for my project and some people might find this useful.

  1. Creating a widget reference. (Event begin play → Create myWidget → Set myWidget Variable)
  2. Your Key(escape for example) → ShowWidget( my function ) → attach the myWidget variable to the function
  3. Done

How it works ?
The “Widgets” array holds all widgets that need a “cursor”. Like Menus, Navigations etc.

After adding and removing a widget from the viewport, it checks if the array is empty.

If the array is empty = disable mouse cursor. If the array is NOT empty = show cursor.


If you want to focus your cursor (so you don’t need to click 2x on a button) you must create a focus.

I didn’t include this in the 1 screenshot because some people might have different uses for it :slight_smile:
But i got you mate :slight_smile: