the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 70 lines 2.0 kB view raw
1#include "stdafx.h" 2#include "XUI_PartnernetPassword.h" 3#include "..\XUI\XUI_Ctrl_4JList.h" 4 5#ifdef _CONTENT_PACKAGE 6#ifndef _FINAL_BUILD 7 8//---------------------------------------------------------------------------------- 9// Performs initialization tasks - retrieves controls. 10//---------------------------------------------------------------------------------- 11HRESULT CScene_PartnernetPassword::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) 12{ 13 MapChildControls(); 14 ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT); 15 16 m_PartnernetPassword.SetEnable(true); 17 18 m_PartnernetPassword.SetTextLimit(XCONTENT_MAX_DISPLAYNAME_LENGTH); 19 20 // set the caret to the end of the default text 21 m_PartnernetPassword.SetCaretPosition(0); 22 m_PartnernetPassword.SetKeyboardType(C_4JInput::EKeyboardMode_Phone); 23 24 m_PartnernetPassword.SetTitleAndText(IDS_NAME_WORLD,IDS_NAME_WORLD_TEXT); 25 26 return S_OK; 27} 28 29//---------------------------------------------------------------------------------- 30// Handler for the button press message. 31//---------------------------------------------------------------------------------- 32HRESULT CScene_PartnernetPassword::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled) 33{ 34 // This assumes all buttons can only be pressed with the A button 35 ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A); 36 37 if(hObjPressed==m_OK) 38 { 39 // create the world and launch 40 wstring wPassword = m_PartnernetPassword.GetText(); 41 if(wPassword==L"5183") 42 { 43 app.NavigateBack(pNotifyPressData->UserIndex); 44 app.SetPartnernetPasswordRunning(false); 45 ui.SetTooltips( DEFAULT_XUI_MENU_USER, -1); 46 } 47 rfHandled = TRUE; 48 } 49 50 return S_OK; 51} 52 53HRESULT CScene_PartnernetPassword::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled) 54{ 55 ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode); 56 57 // Explicitly handle B button presses 58 switch(pInputData->dwKeyCode) 59 { 60 case VK_PAD_A: 61 case VK_PAD_B: 62 case VK_ESCAPE: 63 rfHandled = TRUE; 64 break; 65 } 66 return S_OK; 67} 68 69#endif 70#endif