Files
UnrealEngine/Engine/Source/Editor/Sequencer/Private/Widgets/Overlays/STopSliderAreaOverlay.cpp
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

37 lines
1.1 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "STopSliderAreaOverlay.h"
#include "MVVM/Extensions/ITopTimeSliderOverlayExtension.h"
#include "MVVM/ViewModels/ViewModel.h"
#include "MVVM/ViewModels/ViewModelIterators.h"
namespace UE::Sequencer
{
void STopSliderAreaOverlay::Construct(const FArguments& InArgs, TWeakViewModelPtr<FViewModel> InRootModel)
{
WeakRootModel = MoveTemp(InRootModel);
SetVisibility(EVisibility::HitTestInvisible);
}
int32 STopSliderAreaOverlay::OnPaint(
const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect,
FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled
) const
{
const TViewModelPtr<FViewModel> RootModelPin = WeakRootModel.Pin();
if (!RootModelPin)
{
return LayerId;
}
for (TViewModelPtr<ITopTimeSliderOverlayExtension> Child : RootModelPin->GetDescendantsOfType<ITopTimeSliderOverlayExtension>())
{
LayerId = Child->OnPaintTimeSliderOverlay(
Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle
);
}
return LayerId;
}
}