the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include <assert.h>
3#include "..\XUI\XUI_SaveMessage.h"
4
5//----------------------------------------------------------------------------------
6// Performs initialization tasks - retrieves controls.
7//----------------------------------------------------------------------------------
8HRESULT CScene_SaveMessage::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
9{
10 MapChildControls();
11 CXuiSceneBase::ShowBackground( DEFAULT_XUI_MENU_USER, TRUE );
12 CXuiSceneBase::ShowLogo( DEFAULT_XUI_MENU_USER, TRUE );
13
14 m_button.SetText(app.GetString(IDS_CONFIRM_OK));
15
16 m_SaveMessage.SetText(app.GetString(IDS_SAVE_ICON_MESSAGE));
17
18 ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT );
19
20 // 4J-PB - If we have a signed in user connected, let's get the DLC now
21 for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
22 {
23 if( (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) )
24 {
25 if(!app.DLCInstallProcessCompleted() && !app.DLCInstallPending())
26 {
27 app.StartInstallDLCProcess(i);
28 break;
29 }
30 }
31 }
32
33 // set a timer on the saving message screen, so we continue after 8 seconds
34 XuiSetTimer( m_hObj,0,8000);
35 m_bIgnoreInput=false;
36 return S_OK;
37}
38
39//----------------------------------------------------------------------------------
40// Handler for the button press message.
41//----------------------------------------------------------------------------------
42HRESULT CScene_SaveMessage::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled)
43{
44 if(m_bIgnoreInput) return S_OK;
45
46 // This assumes all buttons can only be pressed with the A button
47 ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A);
48
49 XuiKillTimer(m_hObj,0);
50 app.NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu);
51 rfHandled = TRUE;
52 return S_OK;
53}
54
55HRESULT CScene_SaveMessage::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
56{
57 if(m_bIgnoreInput) return S_OK;
58
59 ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);
60
61 return S_OK;
62}
63
64// 4J-PB - added for Compliance fail -
65// Games must enter an interactive state that accepts player input within 20 seconds after the initial start-up sequence.
66// If an animation or cinematic shown during the start-up sequence runs longer than 20 seconds, it must be skippable using the START button or natural input.
67HRESULT CScene_SaveMessage::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled)
68{
69 m_bIgnoreInput=true;
70 XuiKillTimer(m_hObj,0);
71 app.NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu);
72
73 return S_OK;
74}
75
76