3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/controls/AnimationTickResult.h"
7#include "mc/client/gui/controls/ComponentReceiveActionType.h"
8#include "mc/client/gui/controls/UIComponent.h"
9#include "mc/client/gui/screens/AnimationStatus.h"
36 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIAnim>> newAnim;
37 ::ll::TypedStorage<4, 4, float> lastAnimDuration;
38 ::ll::TypedStorage<4, 4, float> lastAnimTime;
42 using AnimList = ::std::vector<::std::shared_ptr<::UIAnim>>;
44 using AnimListIter = ::std::_Vector_iterator<::std::_Vector_val<::std::_Simple_types<::std::shared_ptr<::UIAnim>>>>;
49 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIAnim>>> mAnimList;
50 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIAnim>>> mOriginalAnimList;
51 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenEvent>> mNewScreenEvents;
52 ::ll::TypedStorage<1, 1, bool> mTickAttached;
53 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mCreatedTime;
54 ::ll::TypedStorage<1, 1, bool> mRecievedFirstTick;
55 ::ll::TypedStorage<1, 1, bool> mDisableFastForward;
56 ::ll::TypedStorage<4, 4, uint> mResetId;
62 virtual ~UIAnimationComponent() =
default;
64 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
66 virtual void reset() ;
68 virtual ::ComponentReceiveActionType receive(
69 ::VisualTree& visualTree,
70 ::ScreenInputContext& context,
71 ::UIAnimationController& animationController,
72 ::ScreenEvent
const& screenEvent
79 MCAPI
void _addNextAnimation(
81 ::std::map<::std::string, ::std::shared_ptr<::UIAnim>>& animationNames,
82 ::std::shared_ptr<::UIAnim>
const& firstAnim,
83 ::UIControlFactory& factory
86 MCAPI ::ui::AnimationStatus _animationTick(::mce::TimeStep
const& timeStep);
88 MCAPI ::std::shared_ptr<::UIAnim> _createAnimation(::UIResolvedDef& def, ::UIControlFactory& factory);
90 MCAPI
void _resetAnimations();
92 MCAPI ::AnimationTickResult
93 _tickUIAnim(::UIAnim* anim, ::std::vector<::UIAnimationComponent::NewAnimation>& newAnimsToAdd,
float deltaTime);
95 MCAPI ::UIAnim* addAnimation(::std::string
const& name, ::UIResolvedDef& def, ::UIControlFactory& factory);
97 MCAPI
void handleScreenEvent(::UIAnimationController& animationController, ::ScreenEvent
const& screenEvent);
99 MCAPI
bool hasAnimationWithEndEventId(uint
id)
const;
101 MCAPI
bool hasAnimationWithPlayAndEndEventIds(uint playEventId, uint endEventId)
const;
107 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
111 MCAPI ::ComponentReceiveActionType $receive(
112 ::VisualTree& visualTree,
113 ::ScreenInputContext& context,
114 ::UIAnimationController& animationController,
115 ::ScreenEvent
const& screenEvent
Definition ScreenInputContext.h:5
Definition UIAnimationComponent.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControlFactory.h:5
Definition UIResolvedDef.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5
Definition UIAnimationComponent.h:13