the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2#include "..\UI\IUIScene_AbstractContainerMenu.h"
3#include "XUI_CustomMessages.h"
4#include "..\..\Common\Tutorial\TutorialEnum.h"
5
6class CXuiCtrlSlotList;
7class CXuiCtrlSlotItem;
8class AbstractContainerMenu;
9class Slot;
10
11class CXuiSceneAbstractContainer : public CXuiSceneImpl, public virtual IUIScene_AbstractContainerMenu
12{
13public:
14 BOOL isPauseScreen() {
15 return FALSE;
16 };
17
18 D3DXVECTOR3 GetCursorScreenPosition();
19
20protected:
21 virtual void PlatformInitialize(int iPad, int startIndex);
22 virtual void InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex = 0);
23
24 CXuiCtrlSlotList* m_inventoryControl;
25 CXuiCtrlSlotList* m_useRowControl;
26 CXuiCtrlSlotItem* m_pointerControl;
27 CXuiControl m_InventoryText;
28
29 HRESULT OnKeyDown(XUIMessageInput *pInputData, BOOL& bHandled);
30 // Timer function to poll stick input and update pointer position.
31 HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled );
32 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled);
33 HRESULT OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled );
34
35protected:
36 // 4J JEV - Wanted to override onClick method in XUI_Scene_Inventory_Creative,
37 // so am making this protected.
38
39
40protected:
41 int m_iPad;
42 D3DXVECTOR3 m_OriginalPosition;
43 bool m_bIgnoreKeyPresses;
44
45private:
46 int mapVKToAction(int vk);
47
48protected:
49 virtual HRESULT handleCustomTimer( XUIMessageTimer *pTimer, BOOL& bHandled );
50
51public:
52 int getPad() { return m_iPad; }
53
54#ifdef USE_POINTER_ACCEL
55 float m_fPointerVelX;
56 float m_fPointerVelY;
57
58 float m_fPointerAccelX;
59 float m_fPointerAccelY;
60#endif
61
62
63 HXUIOBJ m_hPointerTextMeasurer;
64 HXUIOBJ m_hPointerText;
65 HXUIOBJ m_hPointerTextBkg;
66 HXUIOBJ m_hPointerImg;
67
68 virtual int getSectionColumns(ESceneSection eSection);
69 virtual int getSectionRows(ESceneSection eSection);
70 virtual CXuiControl* GetSectionControl( ESceneSection eSection ) = 0;
71 virtual CXuiCtrlSlotList* GetSectionSlotList( ESceneSection eSection ) = 0;
72 virtual void GetPositionOfSection( ESceneSection eSection, UIVec2D* pPosition );
73 virtual void GetItemScreenData( ESceneSection eSection, int iItemIndex, UIVec2D* pPosition, UIVec2D* pSize );
74 void handleSectionClick(ESceneSection eSection);
75 virtual bool doesSectionTreeHaveFocus(ESceneSection eSection);
76 virtual void setSectionFocus(ESceneSection eSection, int iPad);
77 void setSectionSelectedSlot(ESceneSection eSection, int x, int y);
78 void setFocusToPointer(int iPad);
79 void SetPointerText(const wstring &description, vector<wstring> &unformattedStrings, bool newSlot);
80 virtual shared_ptr<ItemInstance> getSlotItem(ESceneSection eSection, int iSlot);
81 virtual bool isSlotEmpty(ESceneSection eSection, int iSlot);
82 virtual void adjustPointerForSafeZone();
83};