the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 52 lines 1.7 kB view raw
1#pragma once 2 3#include "../media/xuiscene_Death.h" 4#include "XUI_CustomMessages.h" 5 6#define BUTTON_DEATH_RESPAWN 0 7#define BUTTON_DEATH_EXITGAME 1 8#define BUTTONS_DEATH_MAX BUTTON_DEATH_EXITGAME + 1 9 10 11 12class CScene_Death : public CXuiSceneImpl 13{ 14 protected: 15 // Control and Element wrapper objects. 16 CXuiScene m_Scene; 17 CXuiControl m_Buttons[BUTTONS_DEATH_MAX]; 18 CXuiControl m_Title; 19 // Message map. Here we tie messages to message handlers. 20 XUI_BEGIN_MSG_MAP() 21 XUI_ON_XM_INIT( OnInit ) 22 XUI_ON_XM_NOTIFY_SELCHANGED( OnNotifySelChanged ) 23 XUI_ON_XM_NOTIFY_PRESS_EX(OnNotifyPressEx) 24 XUI_ON_XM_KEYDOWN(OnKeyDown) 25 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer) 26 XUI_END_MSG_MAP() 27 28 // Control mapping to objects 29 BEGIN_CONTROL_MAP() 30 MAP_CONTROL(IDC_Respawn, m_Buttons[BUTTON_DEATH_RESPAWN]) 31 MAP_CONTROL(IDC_ExitGame, m_Buttons[BUTTON_DEATH_EXITGAME]) 32 MAP_CONTROL(IDC_Title, m_Title) 33 END_CONTROL_MAP() 34 35 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 36 HRESULT OnNotifySelChanged( HXUIOBJ hObjSource, XUINotifySelChanged* pNotifySelChangedData, BOOL& bHandled ); 37 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); 38 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 39 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled); 40public: 41 42 // Define the class. The class name must match the ClassOverride property 43 // set for the scene in the UI Authoring tool. 44 XUI_IMPLEMENT_CLASS( CScene_Death, L"CScene_Death", XUI_CLASS_SCENE ) 45 46 static int RespawnThreadProc( void* lpParameter ); 47private: 48 bool m_bIgnoreInput; 49 int m_iPad; 50 D3DXVECTOR3 m_OriginalPosition; 51 52};