added main and pause menus
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
// © 2025 Naked People Team. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "CommonActivatableWidget.h"
|
||||
#include "SettingsScreenWidget.generated.h"
|
||||
|
||||
class UButton;
|
||||
class UWidgetSwitcher;
|
||||
class UGameplaySettingsTab;
|
||||
class UAudioSettingsTab;
|
||||
class UGraphicsSettingsTab;
|
||||
|
||||
// Settings screen with Gameplay / Audio / Graphics tabs. Pushed onto a menu's ModalStack
|
||||
// (assign as SettingsWidgetClass on the main / pause menus). Apply commits + persists;
|
||||
// closing the screen also persists pending changes.
|
||||
UCLASS(Abstract)
|
||||
class NAKEDDESIRE_API USettingsScreenWidget : public UCommonActivatableWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
virtual void NativeOnActivated() override;
|
||||
virtual void NativeOnDeactivated() override;
|
||||
|
||||
private:
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UWidgetSwitcher> TabSwitcher;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> GameplayTabButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> AudioTabButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> GraphicsTabButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> ApplyButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UButton> BackButton;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UGameplaySettingsTab> GameplayTab;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UAudioSettingsTab> AudioTab;
|
||||
|
||||
UPROPERTY(meta = (BindWidget))
|
||||
TObjectPtr<UGraphicsSettingsTab> GraphicsTab;
|
||||
|
||||
UFUNCTION()
|
||||
void ShowGameplayTab();
|
||||
|
||||
UFUNCTION()
|
||||
void ShowAudioTab();
|
||||
|
||||
UFUNCTION()
|
||||
void ShowGraphicsTab();
|
||||
|
||||
UFUNCTION()
|
||||
void OnApplyClicked();
|
||||
|
||||
UFUNCTION()
|
||||
void OnBackClicked();
|
||||
|
||||
void PersistSettings();
|
||||
};
|
||||
Reference in New Issue
Block a user