the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 118 lines 4.9 kB view raw
1#pragma once 2#include "..\Media\xuiscene_multi_create.h" 3#include "XUI_Ctrl_4JEdit.h" 4#include "XUI_Ctrl_SliderWrapper.h" 5#include "XUI_MultiGameLaunchMoreOptions.h" 6 7class CXuiCtrl4JList; 8class CXuiCtrl4JIcon; 9 10class CScene_MultiGameCreate : public CXuiSceneImpl 11{ 12protected: 13 CXuiScene m_MainScene; 14 CXuiScene m_TexturePackDetails; 15 CXuiControl m_NewWorld; 16 CXuiControl m_labelWorldName; 17 CXuiControl m_labelSeed; 18 CXuiControl m_labelRandomSeed; 19 CXuiControl m_MoreOptions; 20 CXuiCtrl4JEdit m_EditSeed; 21 CXuiCtrl4JEdit m_EditWorldName; 22 CXuiControl m_ButtonGameMode; 23 CXuiCtrlSliderWrapper m_SliderDifficulty; 24 CXuiCtrl4JList *m_pTexturePacksList; 25 CXuiControl m_texturePackTitle, m_texturePackDescription; 26 CXuiCtrl4JIcon *m_texturePackIcon, *m_texturePackComparison; 27 28 XUI_BEGIN_MSG_MAP() 29 XUI_ON_XM_INIT( OnInit ) 30 XUI_ON_XM_KEYDOWN(OnKeyDown) 31 XUI_ON_XM_NOTIFY_PRESS_EX(OnNotifyPressEx) 32 XUI_ON_XM_NOTIFY_VALUE_CHANGED(OnNotifyValueChanged) 33 XUI_ON_XM_CONTROL_NAVIGATE(OnControlNavigate) 34 XUI_ON_XM_TIMER( OnTimer ) 35 XUI_ON_XM_TRANSITION_START(OnTransitionStart) 36 XUI_ON_XM_TRANSITION_END(OnTransitionEnd) 37 XUI_ON_XM_NOTIFY_SELCHANGED( OnNotifySelChanged ) 38 XUI_ON_XM_NOTIFY_KILL_FOCUS( OnNotifyKillFocus ) 39 XUI_ON_XM_DLCINSTALLED_MESSAGE(OnCustomMessage_DLCInstalled) 40 XUI_ON_XM_DLCLOADED_MESSAGE(OnCustomMessage_DLCMountingComplete) 41 XUI_ON_XM_DESTROY( OnDestroy ) 42 XUI_END_MSG_MAP() 43 44 BEGIN_CONTROL_MAP() 45 MAP_CONTROL(IDC_MainScene, m_MainScene) 46 BEGIN_MAP_CHILD_CONTROLS(m_MainScene) 47 MAP_CONTROL(IDC_XuiLabelWorldName, m_labelWorldName) 48 MAP_CONTROL(IDC_XuiLabelSeed, m_labelSeed) 49 MAP_CONTROL(IDC_XuiLabelRandomSeed, m_labelRandomSeed) 50 MAP_CONTROL(IDC_XuiGameModeToggle, m_ButtonGameMode) 51 MAP_CONTROL(IDC_XuiNewWorld, m_NewWorld) 52 MAP_CONTROL(IDC_XuiMoreOptions, m_MoreOptions) 53 MAP_CONTROL(IDC_XuiEditSeed, m_EditSeed) 54 MAP_CONTROL(IDC_XuiEditWorldName, m_EditWorldName) 55 MAP_CONTROL(IDC_XuiSliderDifficulty, m_SliderDifficulty) 56 MAP_OVERRIDE(IDC_TexturePacksList, m_pTexturePacksList) 57 END_MAP_CHILD_CONTROLS() 58 MAP_CONTROL(IDC_TexturePackDetails, m_TexturePackDetails) 59 BEGIN_MAP_CHILD_CONTROLS(m_TexturePackDetails) 60 MAP_CONTROL(IDC_TexturePackName, m_texturePackTitle) 61 MAP_CONTROL(IDC_TexturePackDescription, m_texturePackDescription) 62 MAP_OVERRIDE(IDC_Icon, m_texturePackIcon) 63 MAP_OVERRIDE(IDC_ComparisonPic, m_texturePackComparison) 64 END_MAP_CHILD_CONTROLS() 65 END_CONTROL_MAP() 66 67 68 HRESULT OnInit( XUIMessageInit* pInitData, BOOL& bHandled ); 69 HRESULT OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData,BOOL& rfHandled); 70 HRESULT OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled); 71 HRESULT OnNotifyValueChanged (HXUIOBJ hObjSource, XUINotifyValueChanged* pValueChangedData, BOOL& rfHandled); 72 HRESULT OnControlNavigate( XUIMessageControlNavigate *pControlNavigateData, BOOL &bHandled); 73 HRESULT OnTimer( XUIMessageTimer *pTimer, BOOL& bHandled ); 74 HRESULT OnTransitionStart( XUIMessageTransition *pTransition, BOOL& bHandled ); 75 HRESULT OnTransitionEnd( XUIMessageTransition *pTransition, BOOL& bHandled ); 76 HRESULT OnNotifySelChanged( HXUIOBJ hObjSource, XUINotifySelChanged* pNotifySelChangedData, BOOL& bHandled ); 77 HRESULT OnNotifyKillFocus(HXUIOBJ hObjSource, XUINotifyFocus *pNotifyFocusData, BOOL& bHandled); 78 HRESULT OnCustomMessage_DLCInstalled(); 79 HRESULT OnCustomMessage_DLCMountingComplete(); 80 HRESULT OnDestroy(); 81 82public: 83 84 // Define the class. The class name must match the ClassOverride property 85 // set for the scene in the UI Authoring tool. 86 XUI_IMPLEMENT_CLASS( CScene_MultiGameCreate, L"CScene_MultiGameCreate", XUI_CLASS_SCENE ) 87 88private: 89 static int LoadSaveDataReturned(void *pParam,bool bContinue); 90 static int StartGame_SignInReturned(void *pParam,bool bContinue, int iPad); 91 static void CreateGame(CScene_MultiGameCreate* pClass, DWORD dwLocalUsersMask); 92 static int ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 93 static int UnlockTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 94 static int WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 95 static int TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 96 97 98 void ToggleShowSaveList(); 99 void UpdateTexturePackDescription(int index); 100 void ClearTexturePackDescription(); 101 void UpdateCurrentTexturePack(); 102 103 bool m_bMultiplayerAllowed; 104 int m_iPad; 105 int m_CurrentDifficulty; 106 static int m_iDifficultyTitleSettingA[4]; 107 LaunchMoreOptionsMenuInitData m_MoreOptionsParams; 108 bool m_bGameModeSurvival; 109 bool m_bIgnoreInput; 110 unsigned int m_currentTexturePackIndex; 111 DLCPack * m_pDLCPack; 112 bool m_bSetup; 113 bool m_texturePackDescDisplayed; 114 HXUIBRUSH m_hTexturePackIconBrush; 115 HXUIBRUSH m_hTexturePackComparisonBrush; 116 int *m_iConfigA; // track the texture packs that we don't have installed 117 int m_iTexturePacksNotInstalled; 118};