feat(ui): sistema de UI Style (tokens C++ por tema) + fontes Aurora Arcana
Camada de estilo data-driven do cliente ZMMO, portando o nucleo do projeto de referencia (Hyper) para C++ conforme ARQUITETURA.md (BP Struct proibido): - Source/ZMMO/Data/UI: UIStyleTypes.h (enums EUI*), UIStyleTokens.h (tokens primitive/semantic/component), UIStyleRow.h (FUIStyle + FUIStyleRow). - ZMMOThemeSubsystem: GetActiveUIStyle() resolve DT_UI_Styles por ThemeId com fallback Default. - Fontes: 8 UFontFace Inline (Cinzel/Rajdhani) em Content/ZMMO/UI/Fonts + DT_UI_Styles preenchido. - ARQUITETURA.md: prefixo de widget UI_, classes base UUI*_Base (UCLASS Abstract) sem prefixo ZMMO. - Config/DefaultGame.ini: UIStyleTable apontando DT_UI_Styles. - Scripts/import_fonts.py (importador idempotente). Inclui tambem o scaffolding do modulo ZMMO ainda nao versionado (Source/ZMMO/Data, Game/UI, Content/ZMMO, uproject, Build.cs). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
70
Source/ZMMO/Data/UI/UIStyleRow.h
Normal file
70
Source/ZMMO/Data/UI/UIStyleRow.h
Normal file
@@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Engine/DataTable.h"
|
||||
#include "UIStyleTypes.h"
|
||||
#include "UIStyleTokens.h"
|
||||
#include "UIStyleRow.generated.h"
|
||||
|
||||
/**
|
||||
* Struct raiz que agrega todos os tokens de estilo de um tema.
|
||||
*
|
||||
* Adicionar membros aqui (fase 2/3) é mudança aditiva e segura para a
|
||||
* DataTable existente — mas, ao alterar este struct em produção, fazer
|
||||
* backup de DT_UI_Styles (UHT invalida rows serializadas se a coluna não
|
||||
* preservar valores). Ver ARQUITETURA.md / docs Epic sobre DataTable.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct ZMMO_API FUIStyle
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStylePalette Palette;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleSemantic Semantic;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleText Text;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleButton Button;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStylePanel Panel;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleBorders Borders;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleProgressBar ProgressBar;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyleTooltip Tooltip;
|
||||
};
|
||||
|
||||
/**
|
||||
* Linha de DT_UI_Styles. O Row Name é o ThemeId (ex.: "Default", "RPG"),
|
||||
* espelhando DT_ThemeCalendar e ThemeRegistry — assim a camada de estilo
|
||||
* é consumidora do ThemeId já resolvido pelo UZMMOThemeSubsystem.
|
||||
*/
|
||||
USTRUCT(BlueprintType)
|
||||
struct ZMMO_API FUIStyleRow : public FTableRowBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FText DisplayName;
|
||||
|
||||
/** Validação tipada de design-time; runtime resolve por ThemeId/Row Name. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
EUITheme Theme = EUITheme::None;
|
||||
|
||||
/** Ponte para o ThemeId resolvido pelo UZMMOThemeSubsystem. */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FName ThemeId;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "UI Style")
|
||||
FUIStyle Style;
|
||||
};
|
||||
Reference in New Issue
Block a user