mirror of
https://github.com/sinbad/StevesUEHelpers.git
synced 2025-02-23 17:45:23 +00:00
Merge branch 'master' of github.com:sinbad/StevesUEHelpers
This commit is contained in:
commit
4515692e71
@ -16,7 +16,6 @@ void UOptionWidgetBase::NativeConstruct()
|
|||||||
{
|
{
|
||||||
GS->OnInputModeChanged.AddDynamic(this, &UOptionWidgetBase::InputModeChanged);
|
GS->OnInputModeChanged.AddDynamic(this, &UOptionWidgetBase::InputModeChanged);
|
||||||
UpdateFromInputMode(GS->GetLastInputModeUsed());
|
UpdateFromInputMode(GS->GetLastInputModeUsed());
|
||||||
ClearOptions();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
UE_LOG(LogStevesUI, Error, TEXT("StevesGameSubsystem is missing!"));
|
UE_LOG(LogStevesUI, Error, TEXT("StevesGameSubsystem is missing!"));
|
||||||
@ -43,7 +42,11 @@ void UOptionWidgetBase::NativeConstruct()
|
|||||||
if (!GamepadDownImage)
|
if (!GamepadDownImage)
|
||||||
UE_LOG(LogStevesUI, Error, TEXT("%s should have a GamepadDownImage instance."), *this->GetClass()->GetName());
|
UE_LOG(LogStevesUI, Error, TEXT("%s should have a GamepadDownImage instance."), *this->GetClass()->GetName());
|
||||||
|
|
||||||
|
|
||||||
|
SynchronizeProperties();
|
||||||
|
|
||||||
|
// To support option set up in designer
|
||||||
|
SetSelectedIndex(SelectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -166,6 +169,9 @@ void UOptionWidgetBase::SetMouseMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
MouseVersion->SetVisibility(ESlateVisibility::Visible);
|
MouseVersion->SetVisibility(ESlateVisibility::Visible);
|
||||||
|
|
||||||
|
SynchronizeProperties();
|
||||||
|
|
||||||
if (bHadFocus)
|
if (bHadFocus)
|
||||||
SetFocusProperly();
|
SetFocusProperly();
|
||||||
|
|
||||||
@ -181,6 +187,9 @@ void UOptionWidgetBase::SetButtonMode()
|
|||||||
MouseVersion->SetVisibility(ESlateVisibility::Hidden);
|
MouseVersion->SetVisibility(ESlateVisibility::Hidden);
|
||||||
|
|
||||||
GamepadVersion->SetVisibility(ESlateVisibility::Visible);
|
GamepadVersion->SetVisibility(ESlateVisibility::Visible);
|
||||||
|
|
||||||
|
SynchronizeProperties();
|
||||||
|
|
||||||
if (bHadFocus)
|
if (bHadFocus)
|
||||||
SetFocusProperly();
|
SetFocusProperly();
|
||||||
|
|
||||||
|
@ -118,7 +118,9 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Content)
|
||||||
TArray<FText> Options;
|
TArray<FText> Options;
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Content)
|
||||||
int SelectedIndex;
|
int SelectedIndex;
|
||||||
|
|
||||||
virtual void SyncButtonProperties(UButton* Button) const;
|
virtual void SyncButtonProperties(UButton* Button) const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user