the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 82 lines 2.8 kB view raw
1#pragma once 2 3#include "IUIScene_TradingMenu.h" 4 5class InventoryMenu; 6 7class UIScene_TradingMenu : public UIScene, public IUIScene_TradingMenu 8{ 9private: 10 bool m_showingRightArrow, m_showingLeftArrow; 11 12public: 13 UIScene_TradingMenu(int iPad, void *initData, UILayer *parentLayer); 14 15 virtual EUIScene getSceneType() { return eUIScene_TradingMenu;} 16 17protected: 18 UIControl m_controlMainPanel; 19 UIControl_SlotList m_slotListTrades; 20 UIControl_SlotList m_slotListRequest1, m_slotListRequest2; 21 UIControl_SlotList m_slotListHotbar, m_slotListInventory; 22 UIControl_Label m_labelInventory; 23 UIControl_Label m_labelTrading, m_labelRequired; 24 UIControl_Label m_labelRequest1, m_labelRequest2; 25 26 IggyName m_funcMoveSelector, m_funcShowScrollRightArrow, m_funcShowScrollLeftArrow, m_funcSetOfferDescription, m_funcSetActiveSlot; 27 28 UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene) 29 UI_MAP_ELEMENT( m_controlMainPanel, "MainPanel" ) 30 UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlMainPanel ) 31 UI_MAP_ELEMENT( m_slotListTrades, "TradingBar") 32 UI_MAP_ELEMENT( m_slotListRequest1, "Request1") 33 UI_MAP_ELEMENT( m_slotListRequest2, "Request2") 34 35 UI_MAP_ELEMENT( m_labelTrading, "VillagerText") 36 UI_MAP_ELEMENT( m_labelRequired, "RequiredLabel") 37 38 UI_MAP_ELEMENT( m_labelRequest1, "Request1Label") 39 UI_MAP_ELEMENT( m_labelRequest2, "Request2Label") 40 41 UI_MAP_ELEMENT( m_slotListHotbar, "HotBar") 42 UI_MAP_ELEMENT( m_slotListInventory, "Inventory") 43 UI_MAP_ELEMENT( m_labelInventory, "InventoryLabel") 44 45 UI_END_MAP_CHILD_ELEMENTS() 46 47 UI_MAP_NAME(m_funcMoveSelector, L"MoveSelector") 48 UI_MAP_NAME(m_funcShowScrollRightArrow, L"ShowScrollRightArrow") 49 UI_MAP_NAME(m_funcShowScrollLeftArrow, L"ShowScrollLeftArrow") 50 UI_MAP_NAME(m_funcSetOfferDescription, L"SetOfferDescription") 51 UI_MAP_NAME(m_funcSetActiveSlot, L"SetSelectorSlot") 52 UI_END_MAP_ELEMENTS_AND_NAMES() 53 54 virtual wstring getMoviePath(); 55 virtual void updateTooltips(); 56 virtual void handleDestroy(); 57 virtual void handleReload(); 58 59 virtual void tick(); 60 61 void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); 62 63 void customDraw(IggyCustomDrawCallbackRegion *region); 64 65 virtual void showScrollRightArrow(bool show); 66 virtual void showScrollLeftArrow(bool show); 67 virtual void moveSelector(bool right); 68 virtual void setTitle(const wstring &name); 69 virtual void setRequest1Name(const wstring &name); 70 virtual void setRequest2Name(const wstring &name); 71 72 virtual void setRequest1RedBox(bool show); 73 virtual void setRequest2RedBox(bool show); 74 virtual void setTradeRedBox(int index, bool show); 75 76 virtual void setOfferDescription(vector<HtmlString> *description); 77 78 virtual void HandleMessage(EUIMessage message, void *data); 79 void handleInventoryUpdated(LPVOID data); 80 81 int getPad() { return m_iPad; } 82};