UIPanel_Base: substitui PanelType/Padding por bUseTheme + 3 chaves (Background/Outline/OutlineEffectKey) lidas de FUIStylePanel. Modo manual (bUseTheme=false) expoe 3 FSlateBrush diretos via FUIPanelBrushSet pra override por instancia. Adiciona BindWidgetOptional OutlineEffect (3o Border sobre Outline pra glow/embossing). Defaults NoDrawType (regra Hyper: brush vazio nao pinta branco). UIButton_Base: remove auto-config (Variants enum, Number/Icon/Size/ InputAction/Timer). Vira shell minimal com BindWidgetOptional + helpers GetActiveUIStyle/GetActiveButtonStyle pra leitura de DT_UI_Styles. UIStyleTokens: FUIStylePanel ganha PanelOutlineEffect map. FUIPanelBrushSet vira 3 FSlateBrush diretos. FUIStyleButton refatora pra 7 sub-maps por variante FName (ButtonStyle=FButtonStyle do Slate, ButtonStroke, ButtonFont, Text/Icon colors). Tudo com defaults NoDrawType. UIStyleTypes: adiciona enum EUIPanelTexture::Rectangle_Square_Gradient_01. Content: UI_Panel_Master e UI_Button_Master_New consomem a API nova; DT_UI_Styles atualizado com rows/keys novas. UIServerCard_Base ajustado pro consumer da API nova. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
57 lines
1.9 KiB
C++
57 lines
1.9 KiB
C++
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "CommonButtonBase.h"
|
|
#include "UIButton_Base.generated.h"
|
|
|
|
class USizeBox;
|
|
class UImage;
|
|
class UCanvasPanel;
|
|
class UCommonTextBlock;
|
|
class UTextBlock;
|
|
|
|
struct FUIStyle;
|
|
struct FUIStyleButton;
|
|
|
|
/**
|
|
* Botão base do ZMMO (CommonUI). Hoje expõe BindWidgetOptional dos widgets
|
|
* que o WBP UI_Button_Master_New consome, e helpers pra ler o estilo ativo
|
|
* de DT_UI_Styles. A aplicação visual (pintar brushes/cores/fonte) entra
|
|
* depois — esta camada só prepara o acesso.
|
|
*/
|
|
UCLASS(Abstract, Blueprintable)
|
|
class ZMMO_API UUIButton_Base : public UCommonButtonBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
protected:
|
|
// ---- Widgets BindWidgetOptional (espelham a árvore do UI_Button_Master_New) ----
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<USizeBox> SizeBox;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<UImage> ImgStoke;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<UCanvasPanel> CanvasPanel_Text;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<UCommonTextBlock> ButtonText;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<UTextBlock> Number_Text;
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "UI Button", meta = (BindWidgetOptional))
|
|
TObjectPtr<UImage> ImgIcon;
|
|
|
|
// ---- Acesso ao estilo ativo (DT_UI_Styles) — C++ only ----
|
|
|
|
/** Carrega DT_UI_Styles e devolve o FUIStyle da row pedida (default "Default").
|
|
* Retorna nullptr se a DT ou a row não existirem. Ponteiro válido enquanto
|
|
* a DT estiver carregada — uso típico é leitura imediata, sem armazenar. */
|
|
const FUIStyle* GetActiveUIStyle(FName ThemeId = TEXT("Default")) const;
|
|
|
|
/** Atalho: devolve só o bloco Button do FUIStyle ativo. */
|
|
const FUIStyleButton* GetActiveButtonStyle(FName ThemeId = TEXT("Default")) const;
|
|
};
|