- Renomeia ~50 classes UCLASS/USTRUCT/UENUM/UINTERFACE pra Zeus* (AZeusGameMode, AZeusCharacter, UZeusGameInstance, IZeusEntityInterface, UZeusWorldSubsystem, FZeusEntitySnapshot, etc.) - Encurta AZMMOPlayerCharacter -> AZeusCharacter - Renomeia módulos satélite ZMMOAttributes -> ZeusAttributes e ZMMOJobs -> ZeusJobs (pasta + .Build.cs + .uproject) - Mantém módulo principal ZMMO (renomeia depois quando jogo ganhar nome) - DefaultEngine.ini: ActiveClassRedirects ZMMOX -> ZeusX (preserva BPs/assets) - DefaultGame.ini: sections atualizadas pra ZeusThemeSubsystem/ZeusPlayerState - Category="ZMMO|..." -> "Zeus|..." em UPROPERTYs - Preserva LogZMMO, ZMMO_API, /Script/ZMMO., /Game/ZMMO/, classes Target Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/SaveGame.h"
|
|
#include "UIWindowSaveGame.generated.h"
|
|
|
|
/**
|
|
* Persistencia de prefs de UI por janela (posicao, e futuramente tamanho,
|
|
* estado expandido, etc). Usado por UUIDraggableWindow_Base — toda janela
|
|
* movel registra uma chave (FName WindowId) e grava aqui ao soltar o drag.
|
|
*
|
|
* Arquivo: [Project]/Saved/SaveGames/UIPrefs_0.sav (binary blob via
|
|
* UE serializer). Mesmo padrao do [[ZeusLoginSaveGame]].
|
|
*
|
|
* Helpers static abaixo encapsulam load-or-create do slot e Get/Set/Save
|
|
* pra que a Base nao precise repetir a cerimonia.
|
|
*/
|
|
UCLASS()
|
|
class ZMMO_API UZeusUISaveGame : public USaveGame
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
/** Posicao normalizada (translation absoluta em pixels da viewport) por janela. */
|
|
UPROPERTY()
|
|
TMap<FName, FVector2D> WindowPositions;
|
|
|
|
static const FString SlotName;
|
|
static constexpr int32 UserIndex = 0;
|
|
|
|
/**
|
|
* Carrega o save existente ou cria um novo (nao salva ainda).
|
|
* Sempre retorna instancia valida.
|
|
*/
|
|
static UZeusUISaveGame* LoadOrCreate();
|
|
|
|
/** Salva o slot atual (sincrono — chamado on-mouse-up, custo baixo). */
|
|
static void SaveNow(UZeusUISaveGame* Save);
|
|
|
|
/** Get com default — se WindowId nao foi gravado retorna FVector2D::ZeroVector. */
|
|
UFUNCTION(BlueprintCallable, Category = "UI|Prefs")
|
|
bool TryGetWindowPosition(FName WindowId, FVector2D& OutPos) const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "UI|Prefs")
|
|
void SetWindowPosition(FName WindowId, FVector2D Pos);
|
|
};
|