// 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 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 RootModelPin = WeakRootModel.Pin(); if (!RootModelPin) { return LayerId; } for (TViewModelPtr Child : RootModelPin->GetDescendantsOfType()) { LayerId = Child->OnPaintTimeSliderOverlay( Args, AllottedGeometry, MyCullingRect, OutDrawElements, LayerId, InWidgetStyle ); } return LayerId; } }