the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "../media/xuiscene_Win.h"
4#include "XUI_CustomMessages.h"
5
6class CScene_Win : public CXuiSceneImpl
7{
8private:
9 static const float AUTO_SCROLL_SPEED;
10 static const float PLAYER_SCROLL_SPEED;
11protected:
12 CXuiHtmlControl m_htmlControl;
13
14 // Message map. Here we tie messages to message handlers.
15 XUI_BEGIN_MSG_MAP()
16 XUI_ON_XM_INIT( OnInit )
17 XUI_ON_XM_TIMER( OnTimer )
18 XUI_ON_XM_KEYDOWN(OnKeyDown)
19 XUI_ON_XM_KEYUP(OnKeyUp)
20 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer)
21 XUI_ON_XM_NAV_RETURN(OnNavReturn)
22 XUI_ON_XM_NAV_FORWARD(OnNavForward)
23 XUI_END_MSG_MAP()
24
25 // Control mapping to objects
26 BEGIN_CONTROL_MAP()
27 MAP_CONTROL(IDC_HtmlControl, m_htmlControl)
28 END_CONTROL_MAP()
29
30 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
31 HRESULT OnTimer( XUIMessageTimer *pXUIMessageTimer, BOOL &bHandled);
32 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled);
33 HRESULT OnKeyUp(XUIMessageInput* pInputData, BOOL& rfHandled);
34 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled);
35 HRESULT OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled);
36 HRESULT OnNavForward(XUIMessageNavForward *pNavForwardData, BOOL& bHandled);
37public:
38
39 // Define the class. The class name must match the ClassOverride property
40 // set for the scene in the UI Authoring tool.
41 XUI_IMPLEMENT_CLASS( CScene_Win, L"CScene_Win", XUI_CLASS_SCENE )
42
43private:
44 bool m_bIgnoreInput;
45 int m_iPad;
46 D3DXVECTOR3 m_OriginalPosition;
47 wstring noNoiseString;
48 wstring noiseString;
49 int m_scrollDir;
50
51 vector<int> m_noiseLengths;
52
53 void updateNoise();
54
55public:
56 static BYTE s_winUserIndex;
57 static void setWinUserIndex(BYTE winUserIndex) { s_winUserIndex = winUserIndex; }
58};