the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 105 lines 3.2 kB view raw
1#pragma once 2 3#include "IUIScene_StartGame.h" 4 5class UIScene_CreateWorldMenu : public IUIScene_StartGame 6{ 7private: 8 enum EControls 9 { 10 eControl_EditWorldName, 11 eControl_TexturePackList, 12 eControl_GameModeToggle, 13 eControl_Difficulty, 14 eControl_MoreOptions, 15 eControl_NewWorld, 16 eControl_OnlineGame, 17 }; 18 19 static int m_iDifficultyTitleSettingA[4]; 20 21 22 wstring m_worldName; 23 wstring m_seed; 24 25 UIControl m_controlMainPanel; 26 UIControl_Label m_labelWorldName; 27 UIControl_Button m_buttonGamemode, m_buttonMoreOptions, m_buttonCreateWorld; 28 UIControl_TextInput m_editWorldName; 29 UIControl_Slider m_sliderDifficulty; 30 UIControl_CheckBox m_checkboxOnline; 31 32 UIControl_BitmapIcon m_bitmapIcon, m_bitmapComparison; 33 34 UI_BEGIN_MAP_ELEMENTS_AND_NAMES(IUIScene_StartGame) 35 UI_MAP_ELEMENT( m_controlMainPanel, "MainPanel" ) 36 UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlMainPanel ) 37 UI_MAP_ELEMENT( m_labelWorldName, "WorldName") 38 UI_MAP_ELEMENT( m_editWorldName, "EditWorldName") 39 UI_MAP_ELEMENT( m_texturePackList, "TexturePackSelector") 40 UI_MAP_ELEMENT( m_buttonGamemode, "GameModeToggle") 41 UI_MAP_ELEMENT( m_checkboxOnline, "CheckboxOnline") 42 UI_MAP_ELEMENT( m_buttonMoreOptions, "MoreOptions") 43 UI_MAP_ELEMENT( m_buttonCreateWorld, "NewWorld") 44 UI_MAP_ELEMENT( m_sliderDifficulty, "Difficulty") 45 UI_END_MAP_CHILD_ELEMENTS() 46 UI_END_MAP_ELEMENTS_AND_NAMES() 47 48 bool m_bGameModeCreative; 49 int m_iGameModeId; 50 bool m_bMultiplayerAllowed; 51 DLCPack * m_pDLCPack; 52 bool m_bRebuildTouchBoxes; 53 54public: 55 UIScene_CreateWorldMenu(int iPad, void *initData, UILayer *parentLayer); 56 virtual ~UIScene_CreateWorldMenu(); 57 58 virtual void updateTooltips(); 59 virtual void updateComponents(); 60 61 virtual EUIScene getSceneType() { return eUIScene_CreateWorldMenu;} 62 63 virtual void handleDestroy(); 64 virtual void tick(); 65 66 virtual UIControl* GetMainPanel(); 67 68 virtual void handleTouchBoxRebuild(); 69 70protected: 71 // TODO: This should be pure virtual in this class 72 virtual wstring getMoviePath(); 73 74 virtual void handleTimerComplete(int id); 75 virtual void handleGainFocus(bool navBack); 76 77public: 78 // INPUT 79 virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled); 80 81private: 82 void StartSharedLaunchFlow(); 83 bool IsLocalMultiplayerAvailable(); 84 85#ifdef _DURANGO 86 static void checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege, int iPad); 87#endif 88 89protected: 90 static int KeyboardCompleteWorldNameCallback(LPVOID lpParam,const bool bRes); 91 void handlePress(F64 controlId, F64 childId); 92 void handleSliderMove(F64 sliderId, F64 currentValue); 93 94 static void CreateGame(UIScene_CreateWorldMenu* pClass, DWORD dwLocalUsersMask); 95 static int ConfirmCreateReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 96 static int StartGame_SignInReturned(void *pParam,bool bContinue, int iPad); 97 static int MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result); 98 99#ifdef __ORBIS__ 100 //static int PSPlusReturned(void *pParam,int iPad,C4JStorage::EMessageResult result); 101 static int ContinueOffline(void *pParam,int iPad,C4JStorage::EMessageResult result); 102#endif 103 104 virtual void checkStateAndStartGame(); 105};