the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 41 lines 1.3 kB view raw
1#pragma once 2#include "AbstractContainerMenu.h" 3#include "Random.h" 4 5class EnchantmentMenu : public AbstractContainerMenu 6{ 7 // 4J Stu Made these public for UI menus, perhaps should make friend class? 8public: 9 static const int INGREDIENT_SLOT = 0; 10 static const int INV_SLOT_START = EnchantmentMenu::INGREDIENT_SLOT + 1; 11 static const int INV_SLOT_END = EnchantmentMenu::INV_SLOT_START + 9 * 3; 12 static const int USE_ROW_SLOT_START = EnchantmentMenu::INV_SLOT_END; 13 static const int USE_ROW_SLOT_END = EnchantmentMenu::USE_ROW_SLOT_START + 9; 14 15public: 16 shared_ptr<Container> enchantSlots; 17 18private: 19 Level *level; 20 int x, y, z; 21 Random random; 22 23 bool m_costsChanged; // 4J Added 24 25public: 26 __int64 nameSeed; 27 28public: 29 int costs[3]; 30 31 EnchantmentMenu(shared_ptr<Inventory> inventory, Level *level, int xt, int yt, int zt); 32 33 virtual void addSlotListener(ContainerListener *listener); 34 virtual void broadcastChanges(); 35 virtual void setData(int id, int value); 36 virtual void slotsChanged();// 4J used to take a shared_ptr<Container> container but wasn't using it, so removed to simplify things 37 virtual bool clickMenuButton(shared_ptr<Player> player, int i); 38 void removed(shared_ptr<Player> player); 39 virtual bool stillValid(shared_ptr<Player> player); 40 virtual shared_ptr<ItemInstance> quickMoveStack(shared_ptr<Player> player, int slotIndex); 41};