segross / UnrealImGui

Unreal plug-in that integrates Dear ImGui framework into Unreal Engine 4.
MIT License
666 stars 211 forks source link

Gamepad Input with CommonUI #67

Open arajar opened 2 years ago

arajar commented 2 years ago

It seems that CommonUI is using a fake analog cursor to handle the gamepad actions. In CommonUI, the Gamepad Facebutton down is treated as an EKeys::Virtual_Accept that later down the input system, is translated to a LeftMouse button action.

Everything seems to work fine except when you use the gamepad face button down to activate a button, in that case, the input seems to be lost and passes through the slate imgui widget to the viewport, losing focus on the Imgui window.

Do you know if support for this behavior can be added?

MattClarkeTTS commented 1 year ago

I have just bumped into this exact issue. Did you manage to find a solution?

arajar commented 1 year ago

Hey @MattClarkeTTS, I didn't find a good solution, in my case as I was in a rush to finish some stuff, I ended up switching ImGuiNavInput_Activate and ImGuiNavInput_Menu action buttons in the SetGamepadNavigationKey method inside ImGuiInteroperability.cpp

The solution is not ideal but I can live with that.