Calling SetIsEnabled on a UMG button in code will prevent any UMG input from being read (can't click other buttons/checkboxes, can't enter text into field, etc).
Regression:
No - code used does not compile in 4.14.3
#include "Runtime/UMG/Public/Components/Button.h"
public:
virtual void NativeConstruct();
UFUNCTION() void OnButtonClick();
UPROPERTY() UButton* Button;
void UMyUserWidget::NativeConstruct()
{
Super::NativeConstruct();
Button = Cast<UButton>(GetWidgetFromName(TEXT("BP_Button")));
Button->OnPressed.AddDynamic(this, &UMyUserWidget::OnButtonClick);
}
void UMyUserWidget::OnButtonClick()
{
Button->SetIsEnabled(false);
}
Result:
After clicking BP_Button, the other button does not react to being clicked
Expected:
BP_Button is disabled but other UMG elements are still active.
Head over to the existing Questions & Answers thread and let us know what's up.
| 1 |
| Component | UE - Editor - UI Systems |
|---|---|
| Affects Versions | 4.15 |
| Target Fix | 4.16 |
| Fix Commit | 3356028 |
|---|---|
| Main Commit | 3379345 |
| Created | Mar 10, 2017 |
|---|---|
| Resolved | Mar 21, 2017 |
| Updated | Apr 27, 2018 |