#include <ModalMenuSystemWidget.h>
|
| virtual bool | Initialize () override |
| |
| virtual void | NativePreConstruct () override |
| |
| virtual void | NativeConstruct () override |
| |
| void | OnButtonClicked (const int32 Index) |
| |
| void | LogDebugError (const FString &Message) const |
| |
| void | LogDebugError (const FString &Message, const int32 Value) const |
| |
| void | LogDebugError (const FString &Message, const float Value) const |
| |
| void | LogDebugWarning (const FString &Message) const |
| |
| void | LogDebugWarning (const FString &Message, const int32 Value) const |
| |
| void | LogDebugWarning (const FString &Message, const float Value) const |
| |
| void | LogDebugMessage (const FString &Message, const bool bWarning=false, const bool bError=false) const |
| |
| void | LogDebugMessage (const FString &Message, const int32 Value, const bool bWarning=false, const bool bError=false) const |
| |
| void | LogDebugMessage (const FString &Message, const float Value, const bool bWarning=false, const bool bError=false) const |
| |
| void | LogDebugMessage (const FString &Message, const bool bValue, const bool bWarning, const bool bError) const |
| |
| void | LogOnScreenMessage (const int32 Key, const FString &Message, FColor Color=FColor::Green) const |
| |
| void | SetCategoryName (const FLogCategoryBase &Category) |
| |
◆ UModalMenuSystemWidget()
| UModalMenuSystemWidget::UModalMenuSystemWidget |
( |
const FObjectInitializer & | ObjectInitializer | ) |
|
|
explicit |
17 : Super(ObjectInitializer)
18{
19 const ConstructorHelpers::FClassFinder<UUserWidget> SelectionButtonBP(TEXT("/MenuSystem/Widgets/CommonUI/WBP_SelectionButton"));
20 if (!ensure(SelectionButtonBP.Class != nullptr)) return;
22 bIsBackHandler = true;
23 bIsModal = true;
24}
◆ ApplySettings()
| void UModalMenuSystemWidget::ApplySettings |
( |
| ) |
|
|
private |
125{
127 {
128 default:
131 break;
134 break;
137 break;
140 break;
141
144 break;
145 }
147 {
148 default:
151 break;
154 break;
157 break;
160 break;
161 }
162
167
168 const FSlateColor CurrentColor(
ColorType);
171 {
174 }
176 {
179 }
180
182
183
185 {
187 }
188
190 {
192 }
194 {
196 }
198 {
200 if(GetOwningPlayer() != nullptr)
201 {
203 }
204 }
205 else
206 {
208 }
209}
EMenuSystemModalType Style
Definition MenuData.h:272
FString Description
Definition MenuData.h:276
EMenuSystemModalAlert Alert
Definition MenuData.h:270
FString MainButtonText
Definition MenuData.h:278
FString Title
Definition MenuData.h:274
FString CloseButtonText
Definition MenuData.h:280
◆ CloseWindow()
| void UModalMenuSystemWidget::CloseWindow |
( |
| ) |
|
270{
271 RemoveFromParent();
272}
◆ CreateExtraButtons()
| void UModalMenuSystemWidget::CreateExtraButtons |
( |
| ) |
|
|
private |
78{
81 {
84 {
86 if(SelectionButton != nullptr)
87 {
89 {
93 {
95 }
96 }
97 else
98 {
99
100 SelectionButton->SetVisibility(ESlateVisibility::Hidden);
101 }
104 USpacer* Spacer = WidgetTree->ConstructWidget<USpacer>(USpacer::StaticClass());
105 if(Spacer != nullptr)
106 {
109 }
110 }
111 }
112 }
113}
TArray< bool > DisabledExtraButtons
Definition MenuData.h:286
TArray< FString > ExtraButtons
Definition MenuData.h:283
◆ GetCloseButtonIndex()
| int32 UModalMenuSystemWidget::GetCloseButtonIndex |
( |
| ) |
const |
|
inline |
Set Styles for Modals 1 = Centered style
- Parameters
-
◆ GetMainButtonIndex()
| int32 UModalMenuSystemWidget::GetMainButtonIndex |
( |
| ) |
const |
|
inline |
◆ Initialize()
| bool UModalMenuSystemWidget::Initialize |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ NativeConstruct()
| void UModalMenuSystemWidget::NativeConstruct |
( |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from UMenuSystemWidget.
67{
68 Super::NativeConstruct();
71 {
73 return;
74 }
75}
◆ NativeGetDesiredFocusTarget()
| UWidget * UModalMenuSystemWidget::NativeGetDesiredFocusTarget |
( |
| ) |
const |
|
overridevirtual |
27{
29 {
30 return Super::NativeGetDesiredFocusTarget();
31 }
33}
◆ NativeOnHandleBackAction()
| bool UModalMenuSystemWidget::NativeOnHandleBackAction |
( |
| ) |
|
|
overridevirtual |
Reimplemented from UMenuSystemWidget.
36{
38 return Super::NativeOnHandleBackAction();
39}
◆ NativePreConstruct()
| void UModalMenuSystemWidget::NativePreConstruct |
( |
| ) |
|
|
overrideprotectedvirtual |
61{
62 Super::NativePreConstruct();
64}
◆ OnButtonClicked()
| void UModalMenuSystemWidget::OnButtonClicked |
( |
const int32 | Index | ) |
|
|
protected |
◆ PlayCloseAnimation()
| void UModalMenuSystemWidget::PlayCloseAnimation |
( |
| ) |
|
◆ PlayOpenAnimation()
| void UModalMenuSystemWidget::PlayOpenAnimation |
( |
| ) |
|
◆ PlaySound()
| void UModalMenuSystemWidget::PlaySound |
( |
USoundBase * | Sound | ) |
const |
|
private |
117{
118 if(GetOwningPlayer() != nullptr && Sound != nullptr)
119 {
120 UGameplayStatics::PlaySound2D(GetOwningPlayer(), Sound);
121 }
122}
◆ SetModal()
| void UModalMenuSystemWidget::SetModal |
( |
| ) |
|
|
private |
212{
217
219 {
221 ExtraButtons->SetVisibility(ESlateVisibility::Collapsed);
222 if(ButtonsBoxSlot != nullptr)
223 {
224 ButtonsBoxSlot->SetHorizontalAlignment(HAlign_Right);
225 }
226 if(DescriptionTextSlot != nullptr)
227 {
229 }
230 return;
231 }
232 if(DescriptionTextSlot != nullptr)
233 {
234 DescriptionTextSlot->SetPadding(FMargin(0.0f,
BorderPadding));
235 }
236 if(ButtonsBoxSlot != nullptr)
237 {
238 ButtonsBoxSlot->SetHorizontalAlignment(HAlign_Center);
239 }
241}
◆ SetValues() [1/2]
◆ SetValues() [2/2]
| void UModalMenuSystemWidget::SetValues |
( |
const FModalData & | Data | ) |
|
◆ BorderPadding
| float UModalMenuSystemWidget::BorderPadding = 32.0f |
|
protected |
◆ ButtonHorizontalBox
| class UHorizontalBox* UModalMenuSystemWidget::ButtonHorizontalBox = nullptr |
|
protected |
◆ CloseButton
◆ CloseButtonIndex
| int32 UModalMenuSystemWidget::CloseButtonIndex = 0 |
|
protected |
◆ ColorType
| FLinearColor UModalMenuSystemWidget::ColorType |
|
private |
◆ DefaultOpenSound
| class USoundBase* UModalMenuSystemWidget::DefaultOpenSound = nullptr |
|
protected |
◆ DescriptionTextBlock
| class UTextBlock* UModalMenuSystemWidget::DescriptionTextBlock = nullptr |
|
protected |
◆ ErrorColor
| FLinearColor UModalMenuSystemWidget::ErrorColor |
|
protected |
◆ ErrorSound
| class USoundBase* UModalMenuSystemWidget::ErrorSound = nullptr |
|
protected |
◆ ExtraButtons
| class UStackBox* UModalMenuSystemWidget::ExtraButtons = nullptr |
|
protected |
◆ GeneralColor
| FLinearColor UModalMenuSystemWidget::GeneralColor |
|
protected |
◆ HighlightColorBorder
| class UBorder* UModalMenuSystemWidget::HighlightColorBorder = nullptr |
|
protected |
◆ JustifyType
| ETextJustify::Type UModalMenuSystemWidget::JustifyType = ETextJustify::Left |
|
private |
◆ MainButton
◆ MainButtonContainer
| class UHorizontalBox* UModalMenuSystemWidget::MainButtonContainer = nullptr |
|
protected |
◆ MainButtonIndex
| int32 UModalMenuSystemWidget::MainButtonIndex = 1 |
|
protected |
◆ MainVerticalBox
| class UVerticalBox* UModalMenuSystemWidget::MainVerticalBox = nullptr |
|
protected |
◆ ModalBorder
| class UBorder* UModalMenuSystemWidget::ModalBorder = nullptr |
|
protected |
◆ ModalData
◆ NotificationLifetime
| float UModalMenuSystemWidget::NotificationLifetime = 3.0f |
|
protected |
◆ NotificationPadding
| float UModalMenuSystemWidget::NotificationPadding = 5.0f |
|
protected |
◆ NotificationSound
| class USoundBase* UModalMenuSystemWidget::NotificationSound = nullptr |
|
protected |
◆ NotificationTimerHandle
| FTimerHandle UModalMenuSystemWidget::NotificationTimerHandle |
|
private |
◆ OnCloseModal
| FOnCloseModal UModalMenuSystemWidget::OnCloseModal |
◆ OnModalButtonSelected
| FOnModalButtonSelected UModalMenuSystemWidget::OnModalButtonSelected |
◆ SelectionButtonClass
| TSubclassOf<class UUserWidget> UModalMenuSystemWidget::SelectionButtonClass |
|
private |
◆ SpacerSize
| float UModalMenuSystemWidget::SpacerSize = 17.0f |
|
protected |
◆ SystemColor
| FLinearColor UModalMenuSystemWidget::SystemColor |
|
protected |
◆ TitleTextBlock
| class UTextBlock* UModalMenuSystemWidget::TitleTextBlock = nullptr |
|
protected |
◆ WarningColor
| FLinearColor UModalMenuSystemWidget::WarningColor |
|
protected |
◆ WarningSound
| class USoundBase* UModalMenuSystemWidget::WarningSound = nullptr |
|
protected |
The documentation for this class was generated from the following files:
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Public/Widgets/ModalMenuSystemWidget.h
- T:/Unreal/Unreal Projects/SpaceAdventure52/SpaceAdventure/Plugins/MenuSystem/Source/MenuSystem/Private/Widgets/ModalMenuSystemWidget.cpp