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/AnimEvent.h"
7#include "mc/client/gui/controls/AnimationTickResult.h"
8#include "mc/client/gui/controls/ComponentReceiveActionType.h"
9#include "mc/client/gui/controls/UIComponent.h"
10#include "mc/client/gui/screens/AnimationStatus.h"
11
12// auto generated forward declare list
13// clang-format off
15class UIAnim;
17class UIControl;
19class UIResolvedDef;
20class VisualTree;
21struct ScreenEvent;
22namespace mce { struct TimeStep; }
23// clang-format on
24
26public:
27 // UIAnimationComponent inner types declare
28 // clang-format off
29 struct NewAnimation;
30 // clang-format on
31
32 // UIAnimationComponent inner types define
33 struct NewAnimation {
34 public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIAnim>> newAnim;
38 ::ll::TypedStorage<4, 4, float> lastAnimDuration;
39 ::ll::TypedStorage<4, 4, float> lastAnimTime;
40 // NOLINTEND
41
42 public:
43 // member functions
44 // NOLINTBEGIN
45 MCAPI ~NewAnimation();
46 // NOLINTEND
47
48 public:
49 // destructor thunk
50 // NOLINTBEGIN
51 MCFOLD void $dtor();
52 // NOLINTEND
53 };
54
55 using AnimList = ::std::vector<::std::shared_ptr<::UIAnim>>;
56
57 using AnimListIter = ::std::_Vector_iterator<::std::_Vector_val<::std::_Simple_types<::std::shared_ptr<::UIAnim>>>>;
58
59public:
60 // member variables
61 // NOLINTBEGIN
62 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIAnim>>> mAnimList;
63 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIAnim>>> mOriginalAnimList;
64 ::ll::TypedStorage<8, 24, ::std::vector<::ScreenEvent>> mNewScreenEvents;
65 ::ll::TypedStorage<1, 1, bool> mTickAttached;
66 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mCreatedTime;
67 ::ll::TypedStorage<1, 1, bool> mRecievedFirstTick;
68 ::ll::TypedStorage<1, 1, bool> mDisableFastForward;
69 ::ll::TypedStorage<4, 4, uint> mResetId;
70 // NOLINTEND
71
72public:
73 // virtual functions
74 // NOLINTBEGIN
75 virtual ~UIAnimationComponent() /*override*/;
76
77 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
78
79 virtual void reset() /*override*/;
80
81 virtual ::ComponentReceiveActionType receive(
82 ::VisualTree& animationController,
83 ::ScreenInputContext& screenEvent,
84 ::UIAnimationController&,
85 ::ScreenEvent const&
86 ) /*override*/;
87 // NOLINTEND
88
89public:
90 // member functions
91 // NOLINTBEGIN
92 MCAPI void _addNextAnimation(
93 ::UIAnim& anim,
94 ::std::map<::std::string, ::std::shared_ptr<::UIAnim>>& animationNames,
95 ::std::shared_ptr<::UIAnim> const& firstAnim,
96 ::UIControlFactory& factory
97 );
98
99 MCAPI ::ui::AnimationStatus _animationTick(::mce::TimeStep const& timeStep);
100
101 MCAPI ::std::shared_ptr<::UIAnim> _createAnimation(::UIResolvedDef& def, ::UIControlFactory&);
102
103 MCAPI ::std::shared_ptr<::UIAnim> _createAnimation(::std::string const& name, ::UIControlFactory& factory);
104
105 MCAPI void _resetAnimations();
106
107 MCAPI ::AnimationTickResult
108 _tickUIAnim(::UIAnim* anim, ::std::vector<::UIAnimationComponent::NewAnimation>& newAnimsToAdd, float deltaTime);
109
110 MCAPI ::UIAnim* addAnimation(::std::string const& name, ::UIResolvedDef& def, ::UIControlFactory& factory);
111
112 MCAPI void collectScreenEvents(::AnimEvent animEvent, ::std::vector<::ScreenEvent>& screenEvents);
113
114 MCAPI void handleScreenEvent(::UIAnimationController& animationController, ::ScreenEvent const& screenEvent);
115
116 MCAPI bool hasAnimationWithEndEventId(uint id) const;
117
118 MCAPI bool hasAnimationWithPlayAndEndEventIds(uint playEventId, uint endEventId) const;
119
120 MCAPI bool isEventListener() const;
121
122 MCAPI void updateProperties();
123 // NOLINTEND
124
125public:
126 // destructor thunk
127 // NOLINTBEGIN
128 MCAPI void $dtor();
129 // NOLINTEND
130
131public:
132 // virtual function thunks
133 // NOLINTBEGIN
134 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
135
136 MCAPI void $reset();
137
138 MCAPI ::ComponentReceiveActionType $receive(
139 ::VisualTree& animationController,
140 ::ScreenInputContext& screenEvent,
141 ::UIAnimationController&,
142 ::ScreenEvent const&
143 );
144 // NOLINTEND
145
146public:
147 // vftables
148 // NOLINTBEGIN
149 MCNAPI static void** $vftable();
150 // NOLINTEND
151};
Definition ScreenInputContext.h:5
Definition UIAnim.h:5
Definition UIAnimationComponent.h:5
static MCAPI void ** $vftable()
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 TimeStep.h:7