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_howtoplay_menu.h"
4#include "XUI_CustomMessages.h"
5
6class CScene_HowToPlayMenu : public CXuiSceneImpl
7{
8protected:
9
10 enum eHTPButton
11 {
12 eHTPButton_WhatsNew = 0,
13 eHTPButton_Basics,
14 eHTPButton_Multiplayer,
15 eHTPButton_Hud,
16 eHTPButton_Creative,
17 eHTPButton_Inventory,
18 eHTPButton_Chest,
19 eHTPButton_Crafting,
20 eHTPButton_Furnace,
21 eHTPButton_Dispenser,
22 eHTPButton_Brewing,
23 eHTPButton_Enchantment,
24 eHTPButton_Anvil,
25 eHTPButton_FarmingAnimals,
26 eHTPButton_Breeding,
27 eHTPButton_Trading,
28 eHTPButton_NetherPortal,
29 eHTPButton_TheEnd,
30 eHTPButton_SocialMedia,
31 eHTPButton_BanningLevels,
32 eHTPButton_HostOptions,
33 eHTPButton_Max,
34 };
35
36 // Control and Element wrapper objects.
37 CXuiScene m_Scene;
38 CXuiElement m_Background;
39 CXuiList m_ButtonList;
40
41 // Message map. Here we tie messages to message handlers.
42 XUI_BEGIN_MSG_MAP()
43 XUI_ON_XM_INIT( OnInit )
44 XUI_ON_XM_NOTIFY_PRESS_EX(OnNotifyPressEx)
45 XUI_ON_XM_KEYDOWN(OnKeyDown)
46 XUI_ON_XM_NAV_RETURN(OnNavReturn)
47 XUI_ON_XM_SPLITSCREENPLAYER_MESSAGE(OnCustomMessage_Splitscreenplayer)
48 XUI_ON_XM_GET_SOURCE_TEXT(OnGetSourceDataText)
49 XUI_ON_XM_GET_ITEMCOUNT_ALL(OnGetItemCountAll)
50 XUI_ON_XM_NOTIFY_SELCHANGED(OnNotifySelChanged)
51
52 XUI_END_MSG_MAP()
53
54 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled );
55 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled);
56 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled);
57 HRESULT OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled);
58 HRESULT OnCustomMessage_Splitscreenplayer(bool bJoining, BOOL& bHandled);
59 HRESULT OnGetSourceDataText(XUIMessageGetSourceText *pGetSourceTextData, BOOL& bHandled);
60 HRESULT OnGetItemCountAll(XUIMessageGetItemCount *pGetItemCountData, BOOL& bHandled);
61 HRESULT OnNotifySelChanged(HXUIOBJ hObjSource, XUINotifySelChanged *pNotifySelChangedData, BOOL& bHandled);
62
63public:
64
65 // Define the class. The class name must match the ClassOverride property
66 // set for the scene in the UI Authoring tool.
67 XUI_IMPLEMENT_CLASS( CScene_HowToPlayMenu, L"CScene_HowToPlayMenu", XUI_CLASS_SCENE )
68
69private:
70
71 int m_iPad;
72 D3DXVECTOR3 m_OriginalPosition;
73 static unsigned int m_uiHTPButtonNameA[eHTPButton_Max];
74 static unsigned int m_uiHTPSceneA[eHTPButton_Max];
75 int m_iButtons;
76};