the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 110 lines 3.2 kB view raw
1#include "stdafx.h" 2#include "UI.h" 3#include "UIScene_ReinstallMenu.h" 4 5UIScene_ReinstallMenu::UIScene_ReinstallMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer) 6{ 7 // Setup all the Iggy references we need for this scene 8 initialiseMovie(); 9 10#if TO_BE_IMPLEMENTED 11 XuiControlSetText(m_Buttons[eControl_Theme],app.GetString(IDS_REINSTALL_THEME)); 12 XuiControlSetText(m_Buttons[eControl_Gamerpic1],app.GetString(IDS_REINSTALL_GAMERPIC_1)); 13 XuiControlSetText(m_Buttons[eControl_Gamerpic2],app.GetString(IDS_REINSTALL_GAMERPIC_2)); 14 XuiControlSetText(m_Buttons[eControl_Avatar1],app.GetString(IDS_REINSTALL_AVATAR_ITEM_1)); 15 XuiControlSetText(m_Buttons[eControl_Avatar2],app.GetString(IDS_REINSTALL_AVATAR_ITEM_2)); 16 XuiControlSetText(m_Buttons[eControl_Avatar3],app.GetString(IDS_REINSTALL_AVATAR_ITEM_3)); 17#endif 18} 19 20wstring UIScene_ReinstallMenu::getMoviePath() 21{ 22 if(app.GetLocalPlayerCount() > 1) 23 { 24 return L"ReinstallSplit"; 25 } 26 else 27 { 28 return L"ReinstallMenu"; 29 } 30} 31 32void UIScene_ReinstallMenu::updateTooltips() 33{ 34 ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK,IDS_TOOLTIPS_SELECTDEVICE); 35} 36 37void UIScene_ReinstallMenu::updateComponents() 38{ 39 bool bNotInGame=(Minecraft::GetInstance()->level==NULL); 40 if(bNotInGame) 41 { 42 m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true); 43 m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true); 44 } 45 else 46 { 47 m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false); 48 49 // 4J Stu - Do we want to show the logo in-game? 50 //if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true); 51 //else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); 52 m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false); 53 54 } 55} 56 57void UIScene_ReinstallMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled) 58{ 59 //app.DebugPrintf("UIScene_DebugOverlay handling input for pad %d, key %d, down- %s, pressed- %s, released- %s\n", iPad, key, down?"TRUE":"FALSE", pressed?"TRUE":"FALSE", released?"TRUE":"FALSE"); 60 61 ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released); 62 63 switch(key) 64 { 65 case ACTION_MENU_CANCEL: 66 if(pressed && !repeat) 67 { 68 navigateBack(); 69 } 70 break; 71 case ACTION_MENU_OK: 72#ifdef __ORBIS__ 73 case ACTION_MENU_TOUCHPAD_PRESS: 74#endif 75 case ACTION_MENU_UP: 76 case ACTION_MENU_DOWN: 77 sendInputToMovie(key, repeat, pressed, released); 78 break; 79 } 80} 81 82void UIScene_ReinstallMenu::handlePress(F64 controlId, F64 childId) 83{ 84#if TO_BE_IMPLEMENTED 85 switch((int)controlId) 86 { 87 case BUTTON_HAO_CHANGESKIN: 88 ui.NavigateToScene(m_iPad, eUIScene_SkinSelectMenu); 89 break; 90 case BUTTON_HAO_HOWTOPLAY: 91 ui.NavigateToScene(m_iPad, eUIScene_HowToPlayMenu); 92 break; 93 case BUTTON_HAO_CONTROLS: 94 ui.NavigateToScene(m_iPad, eUIScene_ControlsMenu); 95 break; 96 case BUTTON_HAO_SETTINGS: 97 ui.NavigateToScene(m_iPad, eUIScene_SettingsMenu); 98 break; 99 case BUTTON_HAO_CREDITS: 100 ui.NavigateToScene(m_iPad, eUIScene_Credits); 101 break; 102 case BUTTON_HAO_REINSTALL: 103 ui.NavigateToScene(m_iPad, eUIScene_ReinstallMenu); 104 break; 105 case BUTTON_HAO_DEBUG: 106 ui.NavigateToScene(m_iPad, eUIScene_DebugOptions); 107 break; 108 } 109#endif 110}