Ok… hi there…
I update this Topic, since things changed alot…
So…
The following Situation is given:
For the Setup:
I have implemented CommonUI into my Project. Setup the Input DataTable, the CommonInputBaseControllerData and the CommonUIInputData. My XBox Controller is recognized and inputs are detected.
For the UI:
When i Push a CommonActivatableWidget to the CommonActivatableWidgetStack, sitting inside my CommonUserWidget, Sitting on Top of my UserWidget “Player_HUD”, this pushed Widget is shown - great. Inside this Widget… we now say… f.e. my Main Menu Widget, i have a verticalBox containing Buttons… Those Buttons are inheriting from child of CommonUIButtonBase, that i use as ground for all my Buttons. Since the Buttons the User sees in the Game, are not really buttons, but a Switcher with images and overlays and texts… that i populate, switch and set via a Widget Interface.
So… the CommonUIButtonBase-child class… is should take care of the functionality of a Button.
This is my current “CommonUI_ButtonBase” (the whole Graph):
This is the included DontFlush Function:
And these are all variables, and the Widget Interface Functions:
And now… finally… all the Class Defaults of the CommonButtonBase i made in this Widget:
Now… i my Main Menu… i have the EventOnActivated and a Refocus Event to manually recall that code…:
This ask, which Button was selected before entering a submenu and calls the Focusing Interface Function of that Widget (if it has an Event implemented). If no last Widget is known, it should set this variable to the first Button in my Box… which is the Singleplayer Button.
And these are the Problems and what’s working:
When starting my Game, the first Button is hovered and correctly highlighted. I have no Errors and no invalid bindings.
- When trying to move the Selection to another Button under it, the D-Pad down is recognized correctly (printed via a PreviewKeyDown, unhandled), but the Selection is doing nothing… I need to hover a Button with my mouse cursor first, to be able to switch selections with the Gamepad.
- Since i now can switch selection… After a Mouse hover… i try to enter a submenu… But, i can´t… Except for the submenu reachable by the Singleplayer Button…
Even when i selected (f.e.) Settings, and the corresponding Button is highlighted correctly… the OnClicked always fires on the first Button (Singleplayer)… just claiming, that it is not hovered… I tried to set ConsumePointerInput to false… but it changed nothing. - It seems like the SetTriggerInputAction is doing… nothing… I set the Input Action in my ButtonBase, inside the DontFlush for initialization… and in the OnAddedToFocusPath / OnRemovedFromFocusPath Events. The NullInputActionRow is pointing to an empty row of the DataTable (“DefaultNull”) and has no keys set. I do that method to make hovering/unhovering with keyboard keys possible. But… it seems like, no matter if the Button gets removed from focus path, the TriggerAction of the Widget stays at the Default one (per default “Confirm” of my DataTable"). To Check that thing… i added the DebugBinding Print… And this is the Result:
Normally, the RemoveFromFocus Part should have “Added: DefaultNull”…
Summarized:
1 - Gamepad or Cursor-Key Input is recognized, but not changing selection, until a focusable Widget got hovered by the mouse.
2 - Selection of Buttons change, but not the focus. So no other Button than the first focused can be triggered.
3 - The SetTriggerInputAction is doing nothing… and so my Inputs get messed up… which could lead into Problem 2…
I know… big text… but CommonUI is really bad documented and a hell of work to have things working correctly… so… perhaps someone can help me here… please
(Thanks in Advance )