- 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>
99 lines
3.1 KiB
C++
99 lines
3.1 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CommonUserWidget.h"
|
|
#include "UI/UIStyleTokens.h"
|
|
#include "UICheckBox_Base.generated.h"
|
|
|
|
class UCheckBox;
|
|
class UCommonTextBlock;
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FUICheckBoxStateChanged, bool, bIsChecked);
|
|
|
|
/**
|
|
* Checkbox compartilhado do ZMMO — mesmo padrão de UUISpinner_Base /
|
|
* UUIPanel_Base. Fundação CommonUI (UCommonUserWidget). Camada Abstract; o
|
|
* WBP concreto (UI_CheckBox_Master) herda DIRETO desta classe C++ (UMG não
|
|
* encadeia árvores — ARQUITETURA.md §3.3).
|
|
*
|
|
* Visual data-driven por FUIStyle.CheckBox (UZeusThemeSubsystem). C++ aplica
|
|
* o que dá no UCheckBox; cor/brush finos vão pelo hook BP_ApplyCheckBoxStyle
|
|
* (o WBP tinge os brushes do estilo do UCheckBox).
|
|
*/
|
|
UCLASS(Abstract, Blueprintable)
|
|
class ZMMO_API UUICheckBox_Base : public UCommonUserWidget
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
/** Re-resolve os tokens do tema ativo e reaplica. */
|
|
UFUNCTION(BlueprintCallable, Category = "UI Style")
|
|
void RefreshUIStyle();
|
|
|
|
UFUNCTION(BlueprintPure, Category = "CheckBox")
|
|
bool IsChecked() const;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "CheckBox")
|
|
void SetIsChecked(bool bInChecked);
|
|
|
|
/** Disparado quando o usuário (ou código) muda o estado da caixa. */
|
|
UPROPERTY(BlueprintAssignable, Category = "CheckBox")
|
|
FUICheckBoxStateChanged OnCheckStateChanged;
|
|
|
|
/** Rótulo ao lado da caixa. */
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CheckBox")
|
|
FText LabelText;
|
|
|
|
/**
|
|
* Categoria tipográfica do rótulo (dropdown vem do DT_UI_Styles).
|
|
* Exposto na raiz: dá pra trocar aqui sem selecionar o Label interno.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CheckBox",
|
|
meta = (GetOptions = "GetLabelTextRoleOptions"))
|
|
FName LabelTextRole = TEXT("Label");
|
|
|
|
/** Opções do dropdown de LabelTextRole (data-driven do DT_UI_Styles). */
|
|
UFUNCTION()
|
|
TArray<FString> GetLabelTextRoleOptions() const;
|
|
|
|
/**
|
|
* Variante visual do checkbox (dropdown vem de FUIStyle.CheckBox.Fills/
|
|
* Strokes/Layouts no DT_UI_Styles). Data-driven, sem enum fixo.
|
|
*/
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "CheckBox",
|
|
meta = (GetOptions = "GetVariantOptions"))
|
|
FName Variant = TEXT("Default");
|
|
|
|
UFUNCTION()
|
|
TArray<FString> GetVariantOptions() const;
|
|
|
|
protected:
|
|
virtual void NativePreConstruct() override;
|
|
virtual void SynchronizeProperties() override;
|
|
virtual void NativeConstruct() override;
|
|
virtual void NativeDestruct() override;
|
|
|
|
/** Hook opcional: o WBP aplica cor/brush no estilo do UCheckBox. */
|
|
UFUNCTION(BlueprintImplementableEvent, Category = "UI Style",
|
|
meta = (DisplayName = "Apply CheckBox Style"))
|
|
void BP_ApplyCheckBoxStyle(const FUIStyleCheckBoxVariant& VariantStyle);
|
|
|
|
/** Caixa de check (nome esperado no WBP: "CheckBox"). */
|
|
UPROPERTY(meta = (BindWidgetOptional))
|
|
TObjectPtr<UCheckBox> CheckBox;
|
|
|
|
/** Rótulo opcional ao lado (nome esperado no WBP: "Label"). */
|
|
UPROPERTY(meta = (BindWidgetOptional))
|
|
TObjectPtr<UCommonTextBlock> Label;
|
|
|
|
private:
|
|
UFUNCTION()
|
|
void HandleThemeChanged(FName NewThemeId);
|
|
|
|
UFUNCTION()
|
|
void HandleCheckStateChanged(bool bIsChecked);
|
|
|
|
bool bThemeBound = false;
|
|
bool bCheckBound = false;
|
|
};
|