LifePlay-Revival/Source/LifePlay/LPSettingsSubsystem.h
edujiro5972 e46d01d5d8 Réglages : LPSettingsSubsystem (onglets, bouton titre) et LPColorGradeSubsystem (réglages vidéo couleur)
Phase Réglages (CHG-158..163).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:49:11 +02:00

67 lines
1.7 KiB
C++

// Reglages par onglets, et entree Settings de l'ecran titre (entre Mod Manager et Donate).
//
// Les lignes existent deja dans MainMenu.SettingsScrollBox (cases et curseurs du Blueprint).
// Ce sous-systeme ne les recree pas : il les montre ou les cache selon l'onglet.
// General, Audio, Video, Keyboard (la liste des touches), Lewd, puis Misc.
// Aucun Blueprint n'est modifie.
#pragma once
#include "CoreMinimal.h"
#include "Containers/Ticker.h"
#include "Subsystems/GameInstanceSubsystem.h"
#include "LPSettingsSubsystem.generated.h"
class UButton;
class UCanvasPanel;
class UHorizontalBox;
class UNativeWidgetHost;
class UScrollBox;
class UTextBlock;
class UVerticalBox;
class UWidget;
UCLASS()
class LIFEPLAY_API ULPSettingsSubsystem : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
virtual void Deinitialize() override;
UFUNCTION()
void ShowAudio();
UFUNCTION()
void ShowVideo();
UFUNCTION()
void ShowLewd();
UFUNCTION()
void ShowGeneral();
UFUNCTION()
void ShowKeyboard();
UFUNCTION()
void ShowMisc();
UFUNCTION()
void OpenSettings();
private:
bool Tick(float DeltaTime);
void PlaceSettingsButton();
void EnsureTabs(UScrollBox* Scroll);
void SelectTab(int32 Index);
void ApplyRows();
FTSTicker::FDelegateHandle TickHandle;
int32 ActiveTab = 0;
int32 LastChildCount = -1;
bool bKeyboardPage = false;
TWeakObjectPtr<UButton> SourceSettings;
TWeakObjectPtr<UVerticalBox> OrderedMenu;
TWeakObjectPtr<UScrollBox> SettingsList;
TWeakObjectPtr<UHorizontalBox> TabBar;
TWeakObjectPtr<UNativeWidgetHost> KeyboardHost;
TArray<TWeakObjectPtr<UTextBlock>> TabLabels;
};