the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "AbstractContainerMenu.h"
4
5class MerchantContainer;
6
7class MerchantMenu : public AbstractContainerMenu
8{
9public:
10 static const int PAYMENT1_SLOT = 0;
11 static const int PAYMENT2_SLOT = 1;
12 static const int RESULT_SLOT = 2;
13
14 static const int INV_SLOT_START = RESULT_SLOT + 1;
15 static const int INV_SLOT_END = INV_SLOT_START + 9 * 3;
16 static const int USE_ROW_SLOT_START = INV_SLOT_END;
17 static const int USE_ROW_SLOT_END = USE_ROW_SLOT_START + 9;
18
19 static const int SELLSLOT1_X = 36;
20 static const int SELLSLOT2_X = SELLSLOT1_X + 26;
21 static const int BUYSLOT_X = 120;
22
23 static const int ROW1_Y = 24;
24 static const int ROW2_Y = 53;
25
26
27private:
28 shared_ptr<Merchant> trader;
29 shared_ptr<MerchantContainer> tradeContainer;
30 Level *level;
31
32public:
33 MerchantMenu(shared_ptr<Inventory> inventory, shared_ptr<Merchant> merchant, Level *level);
34
35 shared_ptr<MerchantContainer> getTradeContainer();
36 void addSlotListener(ContainerListener *listener);
37 void broadcastChanges();
38 void slotsChanged(); // 4J used to take a shared_ptr<Container> but wasn't using it, so removed to simplify things
39 void setSelectionHint(int hint);
40 void setData(int id, int value);
41 bool stillValid(shared_ptr<Player> player);
42 shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex);
43 void removed(shared_ptr<Player> player);
44
45 shared_ptr<Merchant> getMerchant(); // 4J Added
46};