修改卡牌记录

This commit is contained in:
Sch 2023-08-03 02:37:58 +08:00
parent 9c88109723
commit db31744317
15 changed files with 234 additions and 81 deletions

View File

@ -43,4 +43,5 @@ public:
virtual void OnSelectCard(const FGuid& SelectedCard) {};
virtual void OnRemoveCard(const FGuid& SelectedCard) {};
};

View File

@ -72,7 +72,7 @@ void FUtils::CreateDefaultTimelineSave(const FString& SavedPath, const FTimeline
{
TArray<uint8> SavedData;
FFileHelper::LoadFileToArray(SavedData, *FPaths::Combine(FPaths::ProjectSavedDir(), Type == FTimelineInfo::ETimelineType::Main ? TEXT("Default.sav") : TEXT("DefaultFX.sav")));
FFileHelper::SaveArrayToFile(SavedData, *FPaths::Combine(FPaths::ProjectSavedDir(), FGlobalData::CurrentProjectName, SavedPath));
FFileHelper::SaveArrayToFile(SavedData, *SavedPath);
}
FSaveModifier::FSaveModifier(const FString& FullSavedPath)
@ -80,6 +80,7 @@ FSaveModifier::FSaveModifier(const FString& FullSavedPath)
this->FullSavedPath = FullSavedPath;
TArray<uint8> LoadData;
FFileHelper::LoadFileToArray(LoadData, *FullSavedPath);
if (LoadData.Num() == 0)
{

View File

@ -20,7 +20,7 @@ DragDropOperator* DragDropOperator::GetDragDropOperator()
void DragDropOperator::OnDragOver(const FGeometry& MyGeometry, const FDragDropEvent& DragDropEvent)
{
const auto& DragDropOperation = static_cast<FClip2ClipDragDropOperation&>(DragDropEvent.GetOperation().ToSharedRef().Get());
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Green, FString::Printf(TEXT("%f"), DragDropEvent.GetScreenSpacePosition().X));
TSharedPtr<STrackBody> Body = StaticCastSharedPtr<STrackBody>(DragDropOperation.OverrideWidget);
if (DragDropOperation.DragDropType == FCutDragDropBase::EType::Clip2Clip)
{
@ -165,7 +165,7 @@ void DragDropOperator::OnDrop(const FGeometry& MyGeometry, const FDragDropEvent&
}
TrackHead->TrackData.ClipData.Add(NewClipData);
// GEngine->AddOnScreenDebugMessage(-1, 10.0, FColor::Green, FString::Printf(TEXT("Track %d"), TrackHead->TrackData.ClipData.Num()));
}
if (DragDropOperation.DragDropType == FCutDragDropBase::EType::Clip2Clip)
{

View File

@ -3,6 +3,7 @@
#include "SEffectCard.h"
#include "SEffectCardGroup.h"
#include "SlateOptMacros.h"
#include "Cut5/Utils/Utils.h"
@ -28,22 +29,29 @@ void SEffectCard::OnNameEdited(FString New, FString Old)
}
else
{
}
CardGroupPtr->CallRender();
}
void SEffectCard::Construct(const FArguments& InArgs)
{
CardProperty = InArgs._CardProperty;
CardGroupPtr = InArgs._CardGroupPtr;
GroupProperty = InArgs._GroupProperty;
GroupName = InArgs._GroupName;
MainInterface = InArgs._MainInterface;
ChildSlot
[
SNew(SBox)
.WidthOverride(125.0f)
.HeightOverride(125.0f)
.Padding(10.0f)
[
SNew(SOverlay)
SAssignNew(Overlay, SOverlay)
// + SOverlay::Slot()
// [
// SNew(SButton)
@ -52,51 +60,66 @@ void SEffectCard::Construct(const FArguments& InArgs)
.VAlign(VAlign_Fill)
.HAlign(HAlign_Fill)
[
SNew(SImage)
.Image(CardProperty->bIsActive ? FUtils::GetBrushFromImage(FUtils::GetResourcesPath("EffectCard.png"), FVector2D(125.0, 125.0)) :
FUtils::GetBrushFromImage(FUtils::GetResourcesPath("EffectCardUnSelected.png"), FVector2D(125.0, 125.0)))
.OnMouseButtonDown_Lambda([this](const FGeometry&, const FPointerEvent& PointerEvent)
SNew(SButton)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
.OnClicked_Lambda([this]()
{
MainInterface->OpenTimeline(FUtils::SingleCardFullPath(CardProperty->Name), true);
MainInterface->OnSelectCard(CardProperty->Guid);
if (GroupProperty->bIsDedicated)
{
MainInterface->OpenTimeline(FUtils::SingleCardFullPath(CardProperty->Name), true);
MainInterface->OnSelectCard(CardProperty->Guid);
}
else
{
if (GroupProperty->bIsDedicated == false)
{
const FString Name = FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, TEXT("FX"), GroupProperty->GroupName + TEXT(".bin"));
MainInterface->OpenTimeline(Name, true);
}
return FReply::Handled();
}
return FReply::Handled();
})
]
+ SOverlay::Slot()
[
SNew(SImage)
.Image(CardProperty->bIsActive ? FUtils::GetBrushFromImage(FUtils::GetResourcesPath("EffectCard.png"), FVector2D(128.0, 128.0)) :
FUtils::GetBrushFromImage(FUtils::GetResourcesPath("EffectCardUnSelected.png"), FVector2D(128.0, 128.0)))
.Visibility(EVisibility::HitTestInvisible)
]
+ SOverlay::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(SClickEditableText)
.InitTextPtr(&CardProperty->Name)
.OnEdited_Raw(this, &SEffectCard::OnNameEdited)
.CanEdit(!CardProperty->bIsActive)
.OnSingleClick_Lambda([this]()
SNew(SInlineEditableTextBlock)
.Text(FText::FromString(CardProperty->Name))
.OnVerifyTextChanged_Lambda([this](const FText& NewText, FText& OutErrorMessage)
{
if (NewText.IsEmpty())
{
OutErrorMessage = FText::FromString(TEXT("名称不能为空"));
return false;
}
for (FEffectCardProperty& CardProperty : GroupProperty->Cards)
{
if (CardProperty.Name == NewText.ToString() && CardProperty.Guid != this->CardProperty->Guid)
{
OutErrorMessage = FText::FromString(TEXT("名称已存在"));
return false;
}
}
return true;
})
]
+ SOverlay::Slot()
.VAlign(VAlign_Top)
.HAlign(HAlign_Right)
[
SNew(SButton)
.Content()
[
SNew(SImage)
.Image(FUtils::GetBrushFromImage(FUtils::GetResourcesPath("close-circle-fill.png"), {}))
]
.OnClicked_Lambda([]()
.OnTextCommitted_Lambda([this](const FText& NewText, ETextCommit::Type CommitType)
{
GEngine->GameViewport->AddViewportWidgetContent(
SNew(STips)
.Title(TEXT("确定删除特效卡吗?"))
.SubTitle(TEXT("特效卡删除后不可恢复")), 1
);
return FReply::Handled();
if (CommitType == ETextCommit::OnEnter)
{
OnNameEdited(NewText.ToString(), CardProperty->Name);
}
})
]
]
@ -105,4 +128,40 @@ void SEffectCard::Construct(const FArguments& InArgs)
}
void SEffectCard::ShowClosedButton(bool bShow)
{
if (bShow)
{
ClosedButton = SNew(SButton)
.Content()
[
SNew(SImage)
.Image(FUtils::GetBrushFromImage(FUtils::GetResourcesPath("close-circle-fill.png"), {16, 16}))
]
.OnClicked_Lambda([]()
{
GEngine->GameViewport->AddViewportWidgetContent(
SNew(STips)
.Title(TEXT("确定删除特效卡吗?"))
.SubTitle(TEXT("特效卡删除后不可恢复")), 1
);
return FReply::Handled();
});
Overlay->AddSlot()
.VAlign(VAlign_Top)
.HAlign(HAlign_Right)
[
ClosedButton.ToSharedRef()
];
}
else
{
Overlay->RemoveSlot(ClosedButton.ToSharedRef());
ClosedButton.Reset();
}
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION

View File

@ -18,12 +18,16 @@ public:
{
}
SLATE_ARGUMENT(FEffectCardProperty*, CardProperty)
SLATE_ARGUMENT(FEffectCardGroup*, GroupProperty)
SLATE_ARGUMENT(class SEffectCardGroup*, CardGroupPtr)
SLATE_ARGUMENT(FString, GroupName)
SLATE_ARGUMENT(ICutMainWidgetInterface*, MainInterface)
SLATE_END_ARGS()
FEffectCardProperty* CardProperty;
FEffectCardGroup* GroupProperty;
class SEffectCardGroup* CardGroupPtr;
FString GroupName;
void OnNameEdited(FString New, FString Old);
@ -33,4 +37,10 @@ public:
ICutMainWidgetInterface* MainInterface;
void ShowClosedButton(bool bShow);
TSharedPtr<SOverlay> Overlay;
TSharedPtr<SWidget> ClosedButton;
};

View File

@ -10,6 +10,7 @@
#include "Widgets/Layout/SExpandableArea.h"
#include "Widgets/Layout/SGridPanel.h"
#include "Widgets/Layout/SScrollBox.h"
#include "Widgets/Text/SInlineEditableTextBlock.h"
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
@ -32,6 +33,7 @@ void SEffectCardGroup::OnNameEdited(FString New, FString Old)
{
}
CallRender();
}
void SEffectCardGroup::Construct(const FArguments& InArgs)
@ -55,19 +57,14 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
})
.HeaderContent()
[
SNew(SClickEditableText)
.InitTextPtr(&EffectCardGroup->GroupName)
.CanEdit(EffectCardGroup->bCanEditName)
.IsNeedUpright(false)
.OnEdited_Raw(this, &SEffectCardGroup::OnNameEdited)
SNew(STextBlock)
.Text(EffectCardGroup->bIsDedicated ? FText::FromString(TEXT("独立特效卡")) : FText::FromString(TEXT("组合特效卡")))
]
.BodyContent()
[
SNew(SBorder)
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
// .ColorAndOpacity(EffectCardGroup->bIsDedicated ? FLinearColor(0.5, 0.5, 0.5, 1) :
// EffectCardGroup->bIsActive ? FLinearColor(1, 0, 0, 1) : FLinearColor(0.5, 0.5, 0.5, 1))
[
SNew(SOverlay)
+ SOverlay::Slot()
@ -83,7 +80,7 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
{
if (EffectCardGroup->bIsDedicated == false)
{
const FString Name = FPaths::Combine(FPaths::ProjectSavedDir() + FGlobalData::CurrentProjectName, TEXT("FX"), EffectCardGroup->GroupName + TEXT(".bin"));
const FString Name = FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, TEXT("FX"), EffectCardGroup->GroupName + TEXT(".bin"));
MainInterface->OpenTimeline(Name, true);
}
return FReply::Handled();
@ -93,12 +90,34 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
]
+ SOverlay::Slot()
[
SAssignNew(Contents, SScrollBox)
.Visibility(EVisibility::SelfHitTestInvisible)
+ SScrollBox::Slot()
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.SizeParam(FAuto())
[
SAssignNew(GridPanel, SGridPanel)
SNew(SInlineEditableTextBlock)
.Text(FText::FromString(EffectCardGroup->GroupName))
.OnVerifyTextChanged_Lambda([](const FText& Text, FText& OutErrorMessage)
{
return true;
})
.OnTextCommitted_Lambda([this](const FText& Text, ETextCommit::Type CommitType)
{
OnNameEdited(Text.ToString(), TEXT(""));
})
.Visibility(EffectCardGroup->bIsDedicated ? EVisibility::Collapsed : EVisibility::Visible)
]
+ SVerticalBox::Slot()
[
SAssignNew(Contents, SScrollBox)
.Visibility(EVisibility::SelfHitTestInvisible)
+ SScrollBox::Slot()
[
SAssignNew(GridPanel, SGridPanel)
]
]
]
]
]
@ -110,6 +129,7 @@ void SEffectCardGroup::Construct(const FArguments& InArgs)
void SEffectCardGroup::CallRender()
{
GridPanel->ClearChildren();
GridPanel->AddSlot(GridPanel->GetChildren()->Num() % 3, GridPanel->GetChildren()->Num() / 3)
[
SNew(SBox)
@ -122,7 +142,7 @@ void SEffectCardGroup::CallRender()
// 新建卡牌后 对卡牌进行个体保存。
FEffectCardProperty NewCard;
NewCard.Name = TEXT("未命名") + NewCard.Guid.ToString();
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Cyan, *FUtils::SingleCardFullPath(NewCard.Name));
FUtils::CreateDefaultTimelineSave(FUtils::SingleCardFullPath(NewCard.Name), FTimelineInfo::ETimelineType::FX);
{
FSaveModifier SaveModifier(FUtils::SingleCardFullPath(NewCard.Name));
@ -133,6 +153,7 @@ void SEffectCardGroup::CallRender()
MainInterface->AddNewCard(NewCard, EffectCardGroup->GroupName);
return FReply::Handled();
})
.ContentPadding(10.0)
[
SNew(STextBlock)
.Text(FText::FromString(TEXT("添加新特效卡")))
@ -147,6 +168,8 @@ void SEffectCardGroup::CallRender()
.CardProperty(&Property)
.GroupName(EffectCardGroup->GroupName)
.MainInterface(MainInterface)
.GroupProperty(EffectCardGroup)
.CardGroupPtr(this)
];
}

View File

@ -74,7 +74,7 @@ void SEffectCardsPanel::CallRender()
{
FEffectCardGroup* Group = AddNewGroup(TEXT("新建组") + FGuid::NewGuid().ToString());
const FString NewPath = FPaths::Combine(FPaths::ProjectSavedDir(), FGlobalData::CurrentProjectName, TEXT("FX"), Group->GroupName + TEXT(".bin"));
const FString NewPath = FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, TEXT("FX"), Group->GroupName + TEXT(".bin"));
FUtils::CreateDefaultTimelineSave(NewPath, FTimelineInfo::ETimelineType::FX);
{
FSaveModifier SaveModifier(NewPath);
@ -120,6 +120,10 @@ void SEffectCardsPanel::RemoveCard(const FGuid& GUID)
{
if (Property.Guid == GUID)
{
if (Property.bIsActive == true)
{
MainInterface->OpenTimeline(FUtils::MainSaveFullPath());
}
Group.Cards.RemoveAt(i);
break;
}
@ -199,48 +203,55 @@ void SEffectCardsPanel::SelectCard(const FGuid& Guid)
{
MainInterface->OpenTimeline(FUtils::MainSaveFullPath());
CurrentSelectedCardGuid.Invalidate();
DeselectedAll();
CallRender();
}
else
{
DeselectedAll();
CurrentSelectedCardGuid = Guid;
for (FEffectCardGroup& EffectCardGroup : EffectCardGroups)
{
if (EffectCardGroup.bIsDedicated)
{
for (FEffectCardProperty& Property : EffectCardGroup.Cards)
{
Property.bIsActive = false;
if (Guid == Property.Guid)
{
Property.bIsActive = true;
}
}
}
else
{
EffectCardGroup.bIsActive = false;
if (EffectCardGroup.Guid == Guid)
{
EffectCardGroup.bIsActive = true;
}
}
}
CurrentSelectedCardGuid = Guid;
CallRender();
}
}
void SEffectCardsPanel::DeselectedAll()
{
for (FEffectCardGroup& EffectCardGroup : EffectCardGroups)
{
if (EffectCardGroup.bIsDedicated)
{
for (FEffectCardProperty& Property : EffectCardGroup.Cards)
{
if (Guid == Property.Guid)
{
Property.bIsActive = true;
}
Property.bIsActive = false;
}
}
else
{
if (EffectCardGroup.Guid == Guid)
{
EffectCardGroup.bIsActive = true;
}
EffectCardGroup.bIsActive = false;
}
}
CallRender();
}
void SEffectCardsPanel::SavePanel(const FString& Path)

View File

@ -86,6 +86,8 @@ public:
void SelectCard(const FGuid& Guid);
void DeselectedAll();
FGuid CurrentSelectedCardGuid;
void SavePanel(const FString& Path);

View File

@ -10,6 +10,8 @@ BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void STips::Construct(const FArguments& InArgs)
{
FTextBlockStyle NormalText = FAppStyle::GetWidgetStyle<FTextBlockStyle>("NormalText");
NormalText.SetFontSize(20);
ChildSlot
[
SNew(SOverlay)
@ -41,9 +43,10 @@ void STips::Construct(const FArguments& InArgs)
[
SNew(STextBlock)
.Text(FText::FromString(InArgs._Title))
.TextStyle(&NormalText)
]
+ SVerticalBox::Slot()
.Padding(0, 40, 0, 0)
.Padding(0, 16, 0, 0)
.HAlign(HAlign_Center)
.VAlign(VAlign_Top)
[
@ -67,13 +70,15 @@ void STips::Construct(const FArguments& InArgs)
SNew(SButton)
.OnClicked_Lambda([this]()
{
GEngine->GameViewport->RemoveViewportWidgetContent(SharedThis(this));
return FReply::Handled();
})
.ButtonColorAndOpacity(FColor(0, 0,0 ,0))
[
SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
SNew(STextBlock)
.Text(FText::FromString(TEXT("取消")))
@ -93,25 +98,26 @@ void STips::Construct(const FArguments& InArgs)
return FReply::Handled();
})
.ButtonColorAndOpacity(FColor(0, 0,0 ,0))
[
SNew(SOverlay)
+ SOverlay::Slot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
SNew(STextBlock)
.Text(FText::FromString(TEXT("确定")))
.ColorAndOpacity(FSlateColor(FLinearColor(1.0f, 1.0f, 1.0f, 1.0f)))
]
]
]
]
]
]
]
]
];
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION

View File

@ -312,6 +312,11 @@ void SCutMainWindow::OpenTimeline(const FString& TimelineName, bool NeedSaveBefo
{
if (CutTimeline->TimelineInfo.CurrentOpenFullPath != FUtils::MainSaveFullPath())
CutTimeline->SaveTimeline(CutTimeline->TimelineInfo.CurrentOpenFullPath, CutTimeline->TimelineInfo);
else
{
CutTimeline->SaveTimeline(FUtils::MainSaveFullPath(), CutTimeline->TimelineInfo);
CutTimeline->TimelineInfo.CurrentOpenFullPath = FUtils::MainSaveFullPath();
}
}
}
}
@ -329,6 +334,8 @@ void SCutMainWindow::OpenTimeline(const FString& TimelineName, bool NeedSaveBefo
void SCutMainWindow::OpenProject(const FString& Project)
{
TArray<uint8> Data;
FFileHelper::LoadFileToArray(Data, *Project);
FMemoryReader Reader(Data);
@ -342,6 +349,10 @@ void SCutMainWindow::OpenProject(const FString& Project)
FGlobalData::CurrentProjectName = FPaths::GetCleanFilename(Project);
FTimelineInfo OpenedInfo;
FGlobalData::BasePath = Project;
CutTimeline->TimelineInfo.CurrentOpenFullPath = FUtils::MainSaveFullPath();
CutTimeline->LoadTimeline(FPaths::Combine(Project, FGlobalData::CurrentProjectName + TEXT(".bin")), OpenedInfo);
@ -511,7 +522,7 @@ void SCutMainWindow::ImportProject(const FString& ImportPath)
void SCutMainWindow::NewProject(const FString& NewPath)
{
FGlobalData::BasePath = NewPath;
CutTimeline->TimelineInfo.CurrentOpenFullPath = FUtils::MainSaveFullPath();
}
void SCutMainWindow::OnSelectCard(const FGuid& SelectedCard)
@ -522,6 +533,14 @@ void SCutMainWindow::OnSelectCard(const FGuid& SelectedCard)
}
}
void SCutMainWindow::OnRemoveCard(const FGuid& SelectedCard)
{
if (SelectedCard.IsValid())
{
EffectCardsPanel->RemoveCard(SelectedCard);
}
}
FTimelinePropertyData* SCutMainWindow::GetResourcePropertyDataPtr(FGuid GUID)
{

View File

@ -59,7 +59,7 @@ public:
virtual void ImportProject(const FString& ImportPath) override;
virtual void NewProject(const FString& NewPath) override;
virtual void OnSelectCard(const FGuid& SelectedCard) override;
virtual void OnRemoveCard(const FGuid& SelectedCard) override;
virtual FTimelinePropertyData* GetResourcePropertyDataPtr(FGuid GUID) override;
virtual FString GetGroupName(TSharedPtr<IWidgetInterface> WidgetInterface) override;
};

View File

@ -410,12 +410,14 @@ void SCutTimeline::SaveTimeline(const FString& SavedPath, FTimelineInfo Info)
MemoryWriter << StaticCastSharedPtr<STrackHead>(TrackGroupInstances[i].Head)->TrackData;
}
FFileHelper::SaveArrayToFile(SavedData, *FPaths::Combine(FPaths::ProjectSavedDir(), FGlobalData::CurrentProjectName, SavedPath));
FString NewSavedPath = FPaths::ConvertRelativePathToFull(SavedPath);
FFileHelper::SaveArrayToFile(SavedData, *NewSavedPath);
}
bool SCutTimeline::LoadTimeline(const FString& LoadPath, FTimelineInfo& Info)
{
GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Red, FString::Printf(TEXT("LoadPath : %s"), *LoadPath));
TArray<uint8> LoadData;
FPaths::ConvertRelativePathToFull(LoadPath);
FFileHelper::LoadFileToArray(LoadData, *LoadPath);

View File

@ -44,7 +44,7 @@ FReply STimelineClip::OnBorderMouseButtonDown(const FGeometry& Geometry, const F
const FVector2D LocalPos = Geometry.AbsoluteToLocal(PointerEvent.GetScreenSpacePosition());
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Blue, LocalPos.ToString());
if (LocalPos.X <= 10)
{
const TSharedPtr<FClip2ClipDragDropOperation> Clip2ClipDragDropOperation = MakeShared<FClip2ClipDragDropOperation>();
@ -126,7 +126,7 @@ void STimelineClip::Seek(int32 Frame)
AVRational frame_rate = ClipData->ResourcePropertyDataPtr->Context->streams[ClipData->ResourcePropertyDataPtr->VideoStream]->avg_frame_rate;
if (av_seek_frame(ClipData->ResourcePropertyDataPtr->Context, ClipData->ResourcePropertyDataPtr->VideoStream, Timestamp, AVSEEK_FLAG_BACKWARD) < 0)
{
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Blue, TEXT("Seek Failed"));
};
}
LastSeekFrame = SeekMovieFrame;
@ -166,7 +166,6 @@ void STimelineClip::Seek(int32 Frame)
}
av_packet_unref(Packet);
// GEngine->AddOnScreenDebugMessage(-1, 1.00f, FColor::Green, FString::FromInt(AllocatedFrame->best_effort_timestamp));
AVCodecContext* VideoCodecContext = ClipData->ResourcePropertyDataPtr->VideoCodecContext;

View File

@ -44,8 +44,28 @@ void STimelinePropertyPanel::Construct(const FArguments& InArgs)
]
+ SOverlay::Slot()
[
SNew(STextBlock)
.Text(FText::FromString(TEXT("角色组")))
SNew(SBox)
.WidthOverride(236)
.HeightOverride(76)
[
SNew(SOverlay)
+ SOverlay::Slot()
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
[
SNew(SImage)
]
+ SOverlay::Slot()
.VAlign(VAlign_Bottom)
.HAlign(HAlign_Fill)
[
SNew(STextBlock)
.Text(FText::FromString(TEXT("角色组")))
.Justification(ETextJustify::Center)
]
]
]
+ SOverlay::Slot()
.HAlign(HAlign_Fill)

View File

@ -81,7 +81,7 @@ void STrackBody::CallRender()
TimelineClip.ToSharedRef()
];
SlateClips.Add(TimelineClip);
// GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("%f"), TempClipData.ClipEndTime - TempClipData.ClipStartTime));
}
}
@ -143,7 +143,7 @@ void STrackBody::BreakClip(const FGuid& Guid)
NewClipData.CropClip(FClipData::ECropMethod::FromFront, SelectedClipFrame + 1);
TrackHead->TrackData.ClipData.Add(NewClipData);
// GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::Emerald, FString::Printf(TEXT("CropFrameLeft %d CropFrameRight %d"), SelectedClipFrame, CropFrameRight));
}
}
CallRender();