Ciberus
(Ciberus)
February 11, 2024, 3:47pm
12
I think its still relevant for many developers I found a solution and verified that it works in production. Hopes it will save a lot of time for somebody
Btw in case anyone wants to support mouse also, I found a solution and verified it works in production
Mostly when you click outside any widget, UI Viewport receives focus, to prevent such behavior.
Create button class inherited from UCommonButtonBase with NativeOnFocusChanging
// UBBaseCommonButton.cpp
class BOGATYR_API UBBaseCommonButton : public UCommonButtonBase, public IUserObjectListEntry
{
GENERATED_BODY()
public:
#if PLATFORM_DESKTOP || WITH_EDITOR
virtual void NativeOnFocusCh…