Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
UIAnimationComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
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"
10
11// auto generated forward declare list
12// clang-format off
14class UIAnim;
16class UIControl;
18class UIResolvedDef;
19class VisualTree;
20struct ScreenEvent;
21namespace mce { struct TimeStep; }
22// clang-format on
23
25public:
26 // UIAnimationComponent inner types declare
27 // clang-format off
28 struct NewAnimation;
29 // clang-format on
30
31 // UIAnimationComponent inner types define
32 struct NewAnimation {
33 public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIAnim>> newAnim;
37 ::ll::TypedStorage<4, 4, float> lastAnimDuration;
38 ::ll::TypedStorage<4, 4, float> lastAnimTime;
39 // NOLINTEND
40 };
41
42 using AnimList = ::std::vector<::std::shared_ptr<::UIAnim>>;
43
44 using AnimListIter = ::std::_Vector_iterator<::std::_Vector_val<::std::_Simple_types<::std::shared_ptr<::UIAnim>>>>;
45
46public:
47 // member variables
48 // NOLINTBEGIN
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;
57 // NOLINTEND
58
59public:
60 // virtual functions
61 // NOLINTBEGIN
62 virtual ~UIAnimationComponent() /*override*/ = default;
63
64 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
65
66 virtual void reset() /*override*/;
67
68 virtual ::ComponentReceiveActionType receive(
69 ::VisualTree& visualTree,
70 ::ScreenInputContext& context,
71 ::UIAnimationController& animationController,
72 ::ScreenEvent const& screenEvent
73 ) /*override*/;
74 // NOLINTEND
75
76public:
77 // member functions
78 // NOLINTBEGIN
79 MCNAPI void _addNextAnimation(
80 ::UIAnim& anim,
81 ::std::map<::std::string, ::std::shared_ptr<::UIAnim>>& animationNames,
82 ::std::shared_ptr<::UIAnim> const& firstAnim,
83 ::UIControlFactory& factory
84 );
85
86 MCNAPI ::ui::AnimationStatus _animationTick(::mce::TimeStep const& timeStep);
87
88 MCNAPI ::std::shared_ptr<::UIAnim> _createAnimation(::UIResolvedDef& def, ::UIControlFactory& factory);
89
90 MCNAPI void _resetAnimations();
91
92 MCNAPI ::AnimationTickResult
93 _tickUIAnim(::UIAnim* anim, ::std::vector<::UIAnimationComponent::NewAnimation>& newAnimsToAdd, float deltaTime);
94
95 MCNAPI ::UIAnim* addAnimation(::std::string const& name, ::UIResolvedDef& def, ::UIControlFactory& factory);
96
97 MCNAPI void handleScreenEvent(::UIAnimationController& animationController, ::ScreenEvent const& screenEvent);
98
99 MCNAPI bool hasAnimationWithEndEventId(uint id) const;
100
101 MCNAPI bool hasAnimationWithPlayAndEndEventIds(uint playEventId, uint endEventId) const;
102 // NOLINTEND
103
104public:
105 // virtual function thunks
106 // NOLINTBEGIN
107 MCNAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
108
109 MCNAPI void $reset();
110
111 MCNAPI ::ComponentReceiveActionType $receive(
112 ::VisualTree& visualTree,
114 ::UIAnimationController& animationController,
115 ::ScreenEvent const& screenEvent
116 );
117 // NOLINTEND
118};
Definition ScreenInputContext.h:5
Definition UIAnim.h:5
Definition UIAnimationComponent.h:5
MCAPI void handleScreenEvent(::UIAnimationController &animationController, ::ScreenEvent const &screenEvent)
MCAPI::ui::AnimationStatus _animationTick(::mce::TimeStep const &timeStep)
MCAPI::ComponentReceiveActionType $receive(::VisualTree &visualTree, ::ScreenInputContext &context, ::UIAnimationController &animationController, ::ScreenEvent const &screenEvent)
MCAPI::AnimationTickResult _tickUIAnim(::UIAnim *anim, ::std::vector<::UIAnimationComponent::NewAnimation > &newAnimsToAdd, float deltaTime)
MCAPI::UIAnim * addAnimation(::std::string const &name, ::UIResolvedDef &def, ::UIControlFactory &factory)
MCAPI ::std::shared_ptr<::UIAnim > _createAnimation(::UIResolvedDef &def, ::UIControlFactory &factory)
MCAPI bool hasAnimationWithEndEventId(uint id) const
MCAPI void _resetAnimations()
MCAPI bool hasAnimationWithPlayAndEndEventIds(uint playEventId, uint endEventId) const
MCAPI ::std::unique_ptr<::UIComponent > $clone(::UIControl &cloneOwner) const
MCAPI void $reset()
MCAPI void _addNextAnimation(::UIAnim &anim, ::std::map<::std::string, ::std::shared_ptr<::UIAnim > > &animationNames, ::std::shared_ptr<::UIAnim > const &firstAnim, ::UIControlFactory &factory)
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControlFactory.h:5
Definition UIControl.h:5
Definition UIResolvedDef.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5
Definition UIAnimationComponent.h:13
Definition context.h:5
Definition TimeStep.h:7