aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/XUI/XUI_SaveMessage.cpp
blob: 7c8160337488aecdc55b22ca845129b0dbda3000 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#include "stdafx.h"
#include <assert.h>
#include "..\XUI\XUI_SaveMessage.h"

//----------------------------------------------------------------------------------
// Performs initialization tasks - retrieves controls.
//----------------------------------------------------------------------------------
HRESULT CScene_SaveMessage::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
{
	MapChildControls();
	CXuiSceneBase::ShowBackground( DEFAULT_XUI_MENU_USER, TRUE );
	CXuiSceneBase::ShowLogo( DEFAULT_XUI_MENU_USER, TRUE );

	m_button.SetText(app.GetString(IDS_CONFIRM_OK));

	m_SaveMessage.SetText(app.GetString(IDS_SAVE_ICON_MESSAGE));

	ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_TOOLTIPS_SELECT );

	// 4J-PB - If we have a signed in user connected, let's get the DLC now
	for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
	{
		if( (InputManager.IsPadConnected(i) || ProfileManager.IsSignedIn(i)) ) 
		{
			if(!app.DLCInstallProcessCompleted() && !app.DLCInstallPending()) 
			{
				app.StartInstallDLCProcess(i);
				break;
			}
		}
	}

	// set a timer on the saving message screen, so we continue after 8 seconds
	XuiSetTimer( m_hObj,0,8000);
	m_bIgnoreInput=false;
	return S_OK;
}

//----------------------------------------------------------------------------------
// Handler for the button press message.
//----------------------------------------------------------------------------------
HRESULT CScene_SaveMessage::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress* pNotifyPressData, BOOL& rfHandled)
{
	if(m_bIgnoreInput) return S_OK;

	// This assumes all buttons can only be pressed with the A button
	ui.AnimateKeyPress(pNotifyPressData->UserIndex, VK_PAD_A);

	XuiKillTimer(m_hObj,0);
	app.NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu);
	rfHandled = TRUE;
	return S_OK;
}

HRESULT CScene_SaveMessage::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandled)
{
	if(m_bIgnoreInput) return S_OK;

	ui.AnimateKeyPress(pInputData->UserIndex, pInputData->dwKeyCode);

	return S_OK;
}

// 4J-PB  - added for Compliance fail - 
// Games must enter an interactive state that accepts player input within 20 seconds after the initial start-up sequence. 
// 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.
HRESULT CScene_SaveMessage::OnTimer(XUIMessageTimer *pData,BOOL& rfHandled)
{
	m_bIgnoreInput=true;
	XuiKillTimer(m_hObj,0);
	app.NavigateToScene(XUSER_INDEX_ANY,eUIScene_MainMenu);

	return S_OK;
}