LeviLamina
Loading...
Searching...
No Matches
BundleHelper.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/ViewRequest.h"
7#include "mc/client/gui/screens/controllers/ActiveBundleData.h"
8
9// auto generated forward declare list
10// clang-format off
12class ItemStack;
13class ItemStackBase;
15// clang-format on
16
17class BundleHelper {
18public:
19 // BundleHelper inner types define
20 enum class BundleItemStickScrollDirection : int {
21 Left = 0,
22 Right = 1,
23 Up = 2,
24 Down = 3,
25 };
26
27 enum class BundleItemScrollWheelDirection : int {
28 Up = 0,
29 Down = 1,
30 };
31
32public:
33 // member variables
34 // NOLINTBEGIN
35 ::ll::TypedStorage<8, 144, ::ActiveBundleData> mActiveBundleData;
36 // NOLINTEND
37
38public:
39 // member functions
40 // NOLINTBEGIN
41 MCAPI bool bundleModeItemTransferOut(
42 ::ContainerScreenController& controller,
43 ::std::string const& toCollectionName,
44 int toCollectionIndex,
45 ::std::string const& fromBundleCollectionName,
46 int fromBundleCollectionIndex
47 );
48
49 MCFOLD ::ActiveBundleData const& getActiveBundleData() const;
50
51 MCAPI ::ItemStack const& getItemStackFromBundle(
52 ::ContainerScreenController const& controller,
53 ::ItemStackBase const& bundleItem,
54 int bundleItemIdx
55 ) const;
56
57 MCAPI ::BundleTooltipLayoutData const&
58 getTooltipLayoutData(::ContainerScreenController const& controller, ::ItemStackBase const& bundleItem) const;
59
60 MCAPI void handleBundleActive(
61 ::ContainerScreenController& controller,
62 ::std::string const& collectionName,
63 int collectionIndex
64 );
65
66 MCAPI void handleBundleHovered(
67 ::ContainerScreenController& controller,
68 ::std::string const& collectionName,
69 int collectionIndex
70 );
71
72 MCAPI void handleBundleItemTransferIn(
73 ::ContainerScreenController& controller,
74 ::std::string const& collectionName,
75 int collectionIndex
76 );
77
78 MCAPI void handleBundleItemTransferOut(
79 ::ContainerScreenController& controller,
80 ::std::string const& collectionName,
81 int collectionIndex
82 );
83
84 MCAPI ::ui::ViewRequest handleBundlePlaceAll(
85 ::ContainerScreenController& controller,
86 ::std::string const& collectionName,
87 int collectionIndex
88 );
89
90 MCAPI ::ui::ViewRequest handleBundlePlaceOne(
91 ::ContainerScreenController& controller,
92 ::std::string const& collectionName,
93 int collectionIndex
94 );
95
96 MCAPI void handleBundleUnselected(::ContainerScreenController& controller);
97
98 MCAPI void invalidateBundleTooltipLayoutData();
99
100 MCAPI bool isSlotInteractiveBundle(
101 ::ContainerScreenController const& controller,
102 ::std::string const& collectionName,
103 int collectionIndex
104 ) const;
105
106 MCAPI ::ui::ViewRequest onBundleItemRightStick(
107 ::ContainerScreenController& controller,
108 ::BundleHelper::BundleItemStickScrollDirection direction
109 );
110
111 MCAPI ::ui::ViewRequest onBundleItemScrollWheel(
112 ::ContainerScreenController& controller,
113 ::BundleHelper::BundleItemScrollWheelDirection direction
114 );
115
116 MCAPI void resetActiveBundleData();
117
118 MCAPI bool shouldHandleBundleIdlePlaceAll(
119 ::ContainerScreenController& controller,
120 ::std::string const& collectionName,
121 int collectionIndex
122 ) const;
123
124 MCAPI ~BundleHelper();
125 // NOLINTEND
126
127public:
128 // static functions
129 // NOLINTBEGIN
130 MCAPI static bool _isBundleSelected(
131 ::std::string const& collectionName,
132 int collectionIndex,
133 ::ActiveBundleData const& activeBundleData
134 );
135
136 MCAPI static ::ui::ViewRequest _onBundleItemRightStick(
137 ::BundleHelper::BundleItemStickScrollDirection direction,
138 ::BundleTooltipLayoutData tooltipLayoutData,
139 ::ActiveBundleData& activeBundleData
140 );
141
142 MCAPI static ::ui::ViewRequest _onBundleItemScrollWheel(
143 ::BundleHelper::BundleItemScrollWheelDirection direction,
144 ::BundleTooltipLayoutData tooltipLayoutData,
145 ::ActiveBundleData& activeBundleData
146 );
147
148 MCAPI static bool _shouldShowBundleOpen(
149 ::std::string const& collectionName,
150 int collectionIndex,
151 bool usingTouchScheme,
152 ::ActiveBundleData const& activeBundleData
153 );
154
155 MCAPI static void registerBindings(::ContainerScreenController& controller);
156
157 MCAPI static void registerEventHandlers(::ContainerScreenController& controller);
158
159 MCAPI static void registerStateMachine(::ContainerScreenController& controller);
160 // NOLINTEND
161
162public:
163 // destructor thunk
164 // NOLINTBEGIN
165 MCAPI void $dtor();
166 // NOLINTEND
167};
Definition BundleHelper.h:5
Definition ContainerScreenController.h:5
Definition ItemStackBase.h:52
Definition ItemStack.h:35
Definition BundleTooltipLayoutData.h:5