LeviLamina
Loading...
Searching...
No Matches
NpcInteractScreenController.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/ViewRequest.h"
8#include "mc/client/gui/screens/controllers/ClientInstanceScreenController.h"
9#include "mc/world/events/EventResult.h"
10#include "mc/world/events/NpcEventListener.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
16class Player;
17struct ActorUniqueID;
19struct INpcDialogueData;
20struct NpcGUIOffset;
21struct UIPropertyBag;
22namespace Json { class Value; }
23// clang-format on
24
26public:
27 // NpcInteractScreenController inner types declare
28 // clang-format off
29 struct NpcActionEditData;
30 // clang-format on
31
32 // NpcInteractScreenController inner types define
33 enum class Section : uchar {};
34
35 enum class NpcTextEdit : int {};
36
37 enum class NpcTextErrorStatus : uchar {};
38
39 struct NpcActionEditData {};
40
41public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
45 ::ll::TypedStorage<1, 1, ::NpcInteractScreenController::Section> mVisibleSection;
46 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::INpcDialogueData>> mDialogueData;
47 ::ll::TypedStorage<1, 1, bool> mShouldRefresh;
48 ::ll::TypedStorage<1, 1, bool> mHasActionWarning;
49 ::ll::TypedStorage<1, 1, bool> mSaveToServer;
50 ::ll::TypedStorage<4, 4, int> mMaxSkinsPerRow;
51 ::ll::TypedStorage<4, 4, int> mStartSkinIndex;
52 ::ll::TypedStorage<4, 4, int> mMaxSkinButtonIndex;
53 ::ll::TypedStorage<4, 4, int> mMaxSkinIndex;
54 ::ll::TypedStorage<4, 4, int> mSelectedSkinIndex;
55 ::ll::TypedStorage<4, 4, int> mHoverSkin;
56 ::ll::TypedStorage<4, 4, int> mMaximizedEditIndex;
57 ::ll::TypedStorage<4, 4, int> mActionDeleteIndex;
58 ::ll::TypedStorage<4, 4, int> mActionCollectionIndex;
59 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DeferredTextObject>> mDeferredNameText;
60 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::DeferredTextObject>> mDeferredInteractText;
61 ::ll::TypedStorage<8, 24, ::std::vector<::NpcInteractScreenController::NpcActionEditData>> mDeferredActionTexts;
62 // NOLINTEND
63
64public:
65 // prevent constructor by default
66 NpcInteractScreenController& operator=(NpcInteractScreenController const&);
67 NpcInteractScreenController(NpcInteractScreenController const&);
68 NpcInteractScreenController();
69
70public:
71 // virtual functions
72 // NOLINTBEGIN
73 virtual ~NpcInteractScreenController() /*override*/;
74
75 virtual ::ui::DirtyFlag tick() /*override*/;
76
77 virtual void onTerminate() /*override*/;
78
79 virtual void onCreation() /*override*/;
80
81 virtual void addStaticScreenVars(::Json::Value& globalVars) /*override*/;
82
83 virtual ::EventResult onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data) /*override*/;
84
85 virtual ::EventResult onNpcInteractScreenClose(::ActorUniqueID npcId, bool performClosingActions) /*override*/;
86
87 virtual bool _isStillValid() const /*override*/;
88 // NOLINTEND
89
90public:
91 // member functions
92 // NOLINTBEGIN
93 MCAPI NpcInteractScreenController(
94 ::std::shared_ptr<::ClientInstanceScreenModel> model,
95 ::Player& player,
96 ::std::shared_ptr<::INpcDialogueData> dialogueData
97 );
98
99 MCAPI void _addNewDeferredButtonTexts(uint64 actionIndex);
100
101 MCAPI ::Actor* _getActor() const;
102
103 MCAPI ::std::string _getDialogText() const;
104
105 MCAPI void _handleTextChanged(::NpcInteractScreenController::NpcTextEdit edit, int index);
106
107 MCAPI bool _isAddActionAllowed();
108
109 MCAPI ::ui::ViewRequest _leaveFrom(::NpcInteractScreenController::Section fromSection);
110
111 MCAPI void _registerBindings();
112
113 MCAPI void _registerEventHandlers();
114 // NOLINTEND
115
116public:
117 // static functions
118 // NOLINTBEGIN
119 MCFOLD static void _bagVecs(::UIPropertyBag& bag, ::NpcGUIOffset const& offsets);
120 // NOLINTEND
121
122public:
123 // constructor thunks
124 // NOLINTBEGIN
125 MCAPI void* $ctor(
126 ::std::shared_ptr<::ClientInstanceScreenModel> model,
127 ::Player& player,
128 ::std::shared_ptr<::INpcDialogueData> dialogueData
129 );
130 // NOLINTEND
131
132public:
133 // destructor thunk
134 // NOLINTBEGIN
135 MCAPI void $dtor();
136 // NOLINTEND
137
138public:
139 // virtual function thunks
140 // NOLINTBEGIN
141 MCAPI ::ui::DirtyFlag $tick();
142
143 MCAPI void $onTerminate();
144
145 MCAPI void $onCreation();
146
147 MCFOLD void $addStaticScreenVars(::Json::Value& globalVars);
148
149 MCAPI ::EventResult $onNpcDialogueDataChange(::std::shared_ptr<::INpcDialogueData> data);
150
151 MCAPI ::EventResult $onNpcInteractScreenClose(::ActorUniqueID npcId, bool performClosingActions);
152
153 MCAPI bool $_isStillValid() const;
154 // NOLINTEND
155
156public:
157 // vftables
158 // NOLINTBEGIN
159 MCNAPI static void** $vftable();
160
161 MCNAPI static void** $vftableForScreenController();
162
164 // NOLINTEND
165};
Definition Actor.h:105
Definition ClientInstanceScreenController.h:5
Definition ClientInstanceScreenModel.h:5
Definition Value.h:16
Definition NpcEventListener.h:14
Definition NpcInteractScreenController.h:5
static MCAPI void ** $vftableForEnableNonOwnerReferences()
static MCAPI void ** $vftable()
static MCAPI void ** $vftableForScreenController()
Definition Player.h:125
Definition ActorUniqueID.h:5
Definition DeferredTextObject.h:5
Definition INpcDialogueData.h:12
Definition NpcGUIOffset.h:5
Definition NpcInteractScreenController.h:19
Definition UIPropertyBag.h:5