点阵位置和修复修改组名不显示

This commit is contained in:
Sch 2023-08-05 10:33:33 +08:00
parent dc6765c015
commit 60b329d718
5 changed files with 25 additions and 4 deletions

View File

@ -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"));
};
};

View File

@ -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<STrackHead> Head = StaticCastSharedPtr<STrackHead>(SingleTrackGroupInstance.Head))
{
if (Head->TrackData.TrackType == ETrackType::PlayerTrack)
@ -347,7 +355,9 @@ void SCutTimeline::OnGroupNameEdited(FString NewText, FString OldText)
}
}
}
}
RenderGroup();
}
void SCutTimeline::RenderGroup()

View File

@ -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]

View File

@ -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();
})
]
]

View File

@ -29,6 +29,7 @@ public:
TSharedPtr<SWidgetSwitcher> ShowSwitcher;
TSharedPtr<SBox> MainShow;
TSharedPtr<SImage> Projector;
TSharedPtr<SImage> SpotLight;
bool bIsVideo = true;
bool bIsVideo = false;
};