the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 62 lines 2.1 kB view raw
1#pragma once 2using namespace std; 3#include "..\Media\xuiscene_trap.h" 4#include "XUI_Scene_AbstractContainer.h" 5#include "..\UI\IUIScene_DispenserMenu.h" 6#include "XUI_CustomMessages.h" 7 8class Container; 9class DispenserTileEntity; 10 11//-------------------------------------------------------------------------------------- 12// Scene implementation class. 13//-------------------------------------------------------------------------------------- 14class CXuiSceneTrap : public CXuiSceneAbstractContainer, public IUIScene_DispenserMenu 15{ 16public: 17 18 // Define the class. The class name must match the ClassOverride property 19 // set for the scene in the UI Authoring tool. 20 XUI_IMPLEMENT_CLASS( CXuiSceneTrap, L"CXuiSceneTrap", XUI_CLASS_SCENE ) 21 22protected: 23 XUI_BEGIN_MSG_MAP() 24 XUI_ON_XM_INIT( OnInit ) 25 XUI_ON_XM_KEYDOWN( OnKeyDown ) 26 XUI_ON_XM_DESTROY( OnDestroy ) 27 XUI_ON_XM_TIMER( OnTimer ) // Poll stick input on a timer. 28 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer) 29 XUI_ON_XM_TRANSITION_START(OnTransitionStart) 30 31 XUI_END_MSG_MAP() 32 33 // Control mapping to objects 34 BEGIN_CONTROL_MAP() 35 // Common to all abstract container scenes 36 MAP_CONTROL(IDC_Group, m_sceneGroup) 37 BEGIN_MAP_CHILD_CONTROLS( m_sceneGroup ) 38 39 MAP_OVERRIDE(IDC_Inventory, m_inventoryControl) 40 MAP_OVERRIDE(IDC_UseRow, m_useRowControl) 41 MAP_OVERRIDE(IDC_Pointer, m_pointerControl) 42 MAP_CONTROL(IDC_InventoryText,m_InventoryText) 43 44 MAP_CONTROL(IDC_DispenserText,m_DispenserText) 45 MAP_OVERRIDE(IDC_Trap, m_trapControl) 46 END_MAP_CHILD_CONTROLS() 47 END_CONTROL_MAP() 48 49 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 50 HRESULT OnDestroy(); 51 //HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled) {return S_OK;} 52 53 virtual void InitDataAssociations(int iPad, AbstractContainerMenu *menu, int startIndex = 0); 54private: 55 CXuiCtrlSlotList* m_trapControl; 56 CXuiControl m_sceneGroup; 57 CXuiControl m_DispenserText; 58 59 virtual CXuiControl* GetSectionControl( ESceneSection eSection ); 60 virtual CXuiCtrlSlotList* GetSectionSlotList( ESceneSection eSection ); 61 62};