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 MCAPI ::ItemStack const& getItemStackFromBundle(
50 ::ContainerScreenController const& controller,
51 ::ItemStackBase const& bundleItem,
52 int bundleItemIdx
53 ) const;
54
55 MCAPI void handleBundleActive(
56 ::ContainerScreenController& controller,
57 ::std::string const& collectionName,
58 int collectionIndex
59 );
60
61 MCAPI void handleBundleHovered(
62 ::ContainerScreenController& controller,
63 ::std::string const& collectionName,
64 int collectionIndex
65 );
66
67 MCAPI void handleBundleItemTransferIn(
68 ::ContainerScreenController& controller,
69 ::std::string const& collectionName,
70 int collectionIndex
71 );
72
73 MCAPI void handleBundleItemTransferOut(
74 ::ContainerScreenController& controller,
75 ::std::string const& collectionName,
76 int collectionIndex
77 );
78
79 MCAPI void handleBundleUnselected(::ContainerScreenController& controller);
80
81 MCAPI bool isSlotInteractiveBundle(
82 ::ContainerScreenController const& controller,
83 ::std::string const& collectionName,
84 int collectionIndex
85 ) const;
86
87 MCAPI ::ui::ViewRequest onBundleItemRightStick(
88 ::ContainerScreenController& controller,
89 ::BundleHelper::BundleItemStickScrollDirection direction
90 );
91
92 MCAPI ::ui::ViewRequest onBundleItemScrollWheel(
93 ::ContainerScreenController& controller,
94 ::BundleHelper::BundleItemScrollWheelDirection direction
95 );
96
97 MCAPI bool shouldHandleBundleIdlePlaceAll(
98 ::ContainerScreenController& controller,
99 ::std::string const& collectionName,
100 int collectionIndex
101 ) const;
102
103 MCAPI bool
104 shouldShowBundleOpen(::std::string const& collectionName, int collectionIndex, bool usingTouchScheme) const;
105
106 MCAPI ~BundleHelper();
107 // NOLINTEND
108
109public:
110 // static functions
111 // NOLINTBEGIN
112 MCAPI static ::ui::ViewRequest _onBundleItemRightStick(
113 ::BundleHelper::BundleItemStickScrollDirection direction,
114 ::BundleTooltipLayoutData tooltipLayoutData,
115 ::ActiveBundleData& activeBundleData
116 );
117
118 MCAPI static void registerBindings(::ContainerScreenController& controller);
119
120 MCAPI static void registerEventHandlers(::ContainerScreenController& controller);
121
122 MCAPI static void registerStateMachine(::ContainerScreenController& controller);
123 // NOLINTEND
124
125public:
126 // destructor thunk
127 // NOLINTBEGIN
128 MCAPI void $dtor();
129 // NOLINTEND
130};
Definition BundleHelper.h:5
Definition ContainerScreenController.h:5
Definition ItemStackBase.h:44
Definition ItemStack.h:26
Definition BundleTooltipLayoutData.h:5