From 60b329d718e10160ee3c8707711e74e718f3a240 Mon Sep 17 00:00:00 2001 From: Sch <3516520171@qq.com> Date: Sat, 5 Aug 2023 10:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E9=98=B5=E4=BD=8D=E7=BD=AE=E5=92=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=AE=E6=94=B9=E7=BB=84=E5=90=8D=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Cut5/Utils/Utils.h | 1 - Source/Cut5/Widgets/SCutTimeline.cpp | 10 ++++++++++ Source/Cut5/Widgets/StatePanel/SLightArrayPanel.cpp | 2 +- Source/Cut5/Widgets/StatePanel/SStatePanel.cpp | 13 ++++++++++++- Source/Cut5/Widgets/StatePanel/SStatePanel.h | 3 ++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/Source/Cut5/Utils/Utils.h b/Source/Cut5/Utils/Utils.h index 19f75e4..51a48de 100644 --- a/Source/Cut5/Utils/Utils.h +++ b/Source/Cut5/Utils/Utils.h @@ -33,7 +33,6 @@ public: }; static FString MainSaveFullPath() { - GEngine->AddOnScreenDebugMessage(-1, 10.0f, FColor::White, FGlobalData::BasePath); return FPaths::Combine(FGlobalData::BasePath, FGlobalData::CurrentProjectName, FGlobalData::CurrentProjectName + TEXT(".bin")); }; }; diff --git a/Source/Cut5/Widgets/SCutTimeline.cpp b/Source/Cut5/Widgets/SCutTimeline.cpp index 736df2a..8bf519e 100644 --- a/Source/Cut5/Widgets/SCutTimeline.cpp +++ b/Source/Cut5/Widgets/SCutTimeline.cpp @@ -334,11 +334,19 @@ void SCutTimeline::SetAutoPlay(bool bStart) void SCutTimeline::OnGroupNameEdited(FString NewText, FString OldText) { + for (FTrackGroup& TrackGroup : TrackGroups) + { + if (TrackGroup.GroupName == OldText) + { + TrackGroup.GroupName = NewText; + } + } for (FSingleTrackGroupInstance& SingleTrackGroupInstance : TrackGroupInstances) { if (SingleTrackGroupInstance.GroupName == OldText) { SingleTrackGroupInstance.GroupName = NewText; + if (TSharedPtr Head = StaticCastSharedPtr(SingleTrackGroupInstance.Head)) { if (Head->TrackData.TrackType == ETrackType::PlayerTrack) @@ -347,7 +355,9 @@ void SCutTimeline::OnGroupNameEdited(FString NewText, FString OldText) } } } + } + RenderGroup(); } void SCutTimeline::RenderGroup() diff --git a/Source/Cut5/Widgets/StatePanel/SLightArrayPanel.cpp b/Source/Cut5/Widgets/StatePanel/SLightArrayPanel.cpp index 24a52db..8e968ee 100644 --- a/Source/Cut5/Widgets/StatePanel/SLightArrayPanel.cpp +++ b/Source/Cut5/Widgets/StatePanel/SLightArrayPanel.cpp @@ -76,7 +76,7 @@ int32 SLightArrayPanel::OnPaint(const FPaintArgs& Args, const FGeometry& Allotte FSlateDrawElement::MakeBox( OutDrawElements, LayerId, - AllottedGeometry.ToPaintGeometry(SingleLocalSize, FSlateLayoutTransform(FVector2D(i * SingleLocalSize.X, j * SingleLocalSize.Y))), + LightGrid->GetPaintSpaceGeometry().ToPaintGeometry(SingleLocalSize, FSlateLayoutTransform(FVector2D(i * SingleLocalSize.X, j * SingleLocalSize.Y))), &Brush, ESlateDrawEffect::None, LightGridColors[j * FGlobalData::LightArrayX + i] diff --git a/Source/Cut5/Widgets/StatePanel/SStatePanel.cpp b/Source/Cut5/Widgets/StatePanel/SStatePanel.cpp index 7fe1b10..794ffb6 100644 --- a/Source/Cut5/Widgets/StatePanel/SStatePanel.cpp +++ b/Source/Cut5/Widgets/StatePanel/SStatePanel.cpp @@ -113,6 +113,18 @@ void SStatePanel::Construct(const FArguments& InArgs) SNew(SBox) .WidthOverride(100) .HeightOverride(100) + [ + SAssignNew(SpotLight, SImage) + .Image(FUtils::GetBrushFromImage(FUtils::GetResourcesPath(TEXT("SpotLight.png")), FVector2D(0, 0))) + ] + ] + + SOverlay::Slot() + .HAlign(HAlign_Right) + .VAlign(VAlign_Top) + [ + SNew(SBox) + .WidthOverride(100) + .HeightOverride(60) [ SNew(SButton) .OnClicked_Lambda([this]() @@ -121,7 +133,6 @@ void SStatePanel::Construct(const FArguments& InArgs) bIsVideo = !bIsVideo; return FReply::Handled(); }) - ] ] diff --git a/Source/Cut5/Widgets/StatePanel/SStatePanel.h b/Source/Cut5/Widgets/StatePanel/SStatePanel.h index 51f3eff..64e581d 100644 --- a/Source/Cut5/Widgets/StatePanel/SStatePanel.h +++ b/Source/Cut5/Widgets/StatePanel/SStatePanel.h @@ -29,6 +29,7 @@ public: TSharedPtr ShowSwitcher; TSharedPtr MainShow; TSharedPtr Projector; + TSharedPtr SpotLight; - bool bIsVideo = true; + bool bIsVideo = false; };