第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "UI/Foundation/GUIS_ButtonBase.h"
#include "CommonActionWidget.h"
void UGUIS_ButtonBase::NativePreConstruct()
{
Super::NativePreConstruct();
OnUpdateButtonStyle();
RefreshButtonText();
}
void UGUIS_ButtonBase::UpdateInputActionWidget()
{
Super::UpdateInputActionWidget();
OnUpdateButtonStyle();
RefreshButtonText();
}
void UGUIS_ButtonBase::SetButtonText(const FText& InText)
{
bOverride_ButtonText = !InText.IsEmpty();
ButtonText = InText;
RefreshButtonText();
}
void UGUIS_ButtonBase::RefreshButtonText()
{
if (!bOverride_ButtonText || ButtonText.IsEmpty())
{
if (InputActionWidget)
{
const FText ActionDisplayText = InputActionWidget->GetDisplayText();
if (!ActionDisplayText.IsEmpty())
{
OnUpdateButtonText(ActionDisplayText);
return;
}
}
}
OnUpdateButtonText(ButtonText);
}
void UGUIS_ButtonBase::OnInputMethodChanged(ECommonInputType CurrentInputType)
{
Super::OnInputMethodChanged(CurrentInputType);
OnUpdateButtonStyle();
}
#if WITH_EDITOR
const FText UGUIS_ButtonBase::GetPaletteCategory()
{
return PaletteCategory;
}
#endif