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 "UI.h"
3#include "UIScene_TrialExitUpsell.h"
4
5
6UIScene_TrialExitUpsell::UIScene_TrialExitUpsell(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
7{
8 // Setup all the Iggy references we need for this scene
9 initialiseMovie();
10}
11
12wstring UIScene_TrialExitUpsell::getMoviePath()
13{
14 return L"TrialExitUpsell";
15}
16
17void UIScene_TrialExitUpsell::updateTooltips()
18{
19 ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_EXIT_GAME,IDS_TOOLTIPS_BACK, IDS_UNLOCK_TITLE);
20}
21
22void UIScene_TrialExitUpsell::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
23{
24 //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");
25
26 ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);
27
28 switch(key)
29 {
30 case ACTION_MENU_CANCEL:
31 navigateBack();
32 break;
33 case ACTION_MENU_OK:
34#ifdef __ORBIS__
35 case ACTION_MENU_TOUCHPAD_PRESS:
36#endif
37 if(pressed)
38 {
39 //CD - Added for audio
40 ui.PlayUISFX(eSFX_Press);
41 app.ExitGame();
42 }
43 break;
44 case ACTION_MENU_X:
45 if(ProfileManager.IsSignedIn(iPad))
46 {
47 //CD - Added for audio
48 ui.PlayUISFX(eSFX_Press);
49
50 // 4J-PB - need to check this user can access the store
51#if defined(__PS3__) || defined(__PSVITA__)
52 bool bContentRestricted;
53 ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
54 if(bContentRestricted)
55 {
56 UINT uiIDA[1];
57 uiIDA[0]=IDS_CONFIRM_OK;
58 ui.RequestErrorMessage(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad());
59 }
60 else
61#endif
62 {
63 TelemetryManager->RecordUpsellPresented(iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID);
64 ProfileManager.DisplayFullVersionPurchase(false,iPad,eSen_UpsellID_Full_Version_Of_Game);
65 }
66 }
67 break;
68 }
69}
70
71void UIScene_TrialExitUpsell::handleAnimationEnd()
72{
73 //ui.NavigateToHomeMenu();
74 ui.NavigateToScene(0,eUIScene_SaveMessage);
75}