the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 59 lines 2.0 kB view raw
1#pragma once 2#include "../media/xuiscene_chat.h" 3#include "XUI_CustomMessages.h" 4 5#define CHAT_LINES_COUNT 10 6 7class CScene_Chat : public CXuiSceneImpl 8{ 9 10protected: 11 CXuiControl m_Labels[CHAT_LINES_COUNT]; 12 CXuiControl m_Backgrounds[CHAT_LINES_COUNT]; 13 CXuiControl m_Jukebox; 14 15 D3DXVECTOR3 m_OriginalPosition; 16 int m_iPad; 17 18 // Message map. Here we tie messages to message handlers. 19 XUI_BEGIN_MSG_MAP() 20 XUI_ON_XM_INIT( OnInit ) 21 XUI_ON_XM_TIMER( OnTimer ) 22 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer) 23 XUI_END_MSG_MAP() 24 25 BEGIN_CONTROL_MAP() 26 MAP_CONTROL(IDC_XuiLabel1, m_Labels[0]) 27 MAP_CONTROL(IDC_XuiLabel2, m_Labels[1]) 28 MAP_CONTROL(IDC_XuiLabel3, m_Labels[2]) 29 MAP_CONTROL(IDC_XuiLabel4, m_Labels[3]) 30 MAP_CONTROL(IDC_XuiLabel5, m_Labels[4]) 31 MAP_CONTROL(IDC_XuiLabel6, m_Labels[5]) 32 MAP_CONTROL(IDC_XuiLabel7, m_Labels[6]) 33 MAP_CONTROL(IDC_XuiLabel8, m_Labels[7]) 34 MAP_CONTROL(IDC_XuiLabel9, m_Labels[8]) 35 MAP_CONTROL(IDC_XuiLabel10, m_Labels[9]) 36 MAP_CONTROL(IDC_XuiBack1, m_Backgrounds[0]) 37 MAP_CONTROL(IDC_XuiBack2, m_Backgrounds[1]) 38 MAP_CONTROL(IDC_XuiBack3, m_Backgrounds[2]) 39 MAP_CONTROL(IDC_XuiBack4, m_Backgrounds[3]) 40 MAP_CONTROL(IDC_XuiBack5, m_Backgrounds[4]) 41 MAP_CONTROL(IDC_XuiBack6, m_Backgrounds[5]) 42 MAP_CONTROL(IDC_XuiBack7, m_Backgrounds[6]) 43 MAP_CONTROL(IDC_XuiBack8, m_Backgrounds[7]) 44 MAP_CONTROL(IDC_XuiBack9, m_Backgrounds[8]) 45 MAP_CONTROL(IDC_XuiBack10, m_Backgrounds[9]) 46 MAP_CONTROL(IDC_XuiLabelJukebox, m_Jukebox) 47 END_CONTROL_MAP() 48 49 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 50 HRESULT OnTimer( XUIMessageTimer *pXUIMessageTimer, BOOL &bHandled); 51 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled); 52 53public: 54 // Define the class. The class name must match the ClassOverride property 55 // set for the scene in the UI Authoring tool. 56 XUI_IMPLEMENT_CLASS( CScene_Chat, L"CScene_Chat", XUI_CLASS_SCENE ) 57 58 HRESULT OffsetTextPosition( float xOffset, float yOffset = 0.0f ); 59};