aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp75
1 files changed, 75 insertions, 0 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp b/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
new file mode 100644
index 00000000..b395bc4c
--- /dev/null
+++ b/Minecraft.Client/Common/UI/UIScene_TrialExitUpsell.cpp
@@ -0,0 +1,75 @@
+#include "stdafx.h"
+#include "UI.h"
+#include "UIScene_TrialExitUpsell.h"
+
+
+UIScene_TrialExitUpsell::UIScene_TrialExitUpsell(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
+{
+ // Setup all the Iggy references we need for this scene
+ initialiseMovie();
+}
+
+wstring UIScene_TrialExitUpsell::getMoviePath()
+{
+ return L"TrialExitUpsell";
+}
+
+void UIScene_TrialExitUpsell::updateTooltips()
+{
+ ui.SetTooltips( DEFAULT_XUI_MENU_USER, IDS_EXIT_GAME,IDS_TOOLTIPS_BACK, IDS_UNLOCK_TITLE);
+}
+
+void UIScene_TrialExitUpsell::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
+{
+ //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");
+
+ ui.AnimateKeyPress(m_iPad, key, repeat, pressed, released);
+
+ switch(key)
+ {
+ case ACTION_MENU_CANCEL:
+ navigateBack();
+ break;
+ case ACTION_MENU_OK:
+#ifdef __ORBIS__
+ case ACTION_MENU_TOUCHPAD_PRESS:
+#endif
+ if(pressed)
+ {
+ //CD - Added for audio
+ ui.PlayUISFX(eSFX_Press);
+ app.ExitGame();
+ }
+ break;
+ case ACTION_MENU_X:
+ if(ProfileManager.IsSignedIn(iPad))
+ {
+ //CD - Added for audio
+ ui.PlayUISFX(eSFX_Press);
+
+ // 4J-PB - need to check this user can access the store
+#if defined(__PS3__) || defined(__PSVITA__)
+ bool bContentRestricted;
+ ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),true,NULL,&bContentRestricted,NULL);
+ if(bContentRestricted)
+ {
+ UINT uiIDA[1];
+ uiIDA[0]=IDS_CONFIRM_OK;
+ ui.RequestMessageBox(IDS_ONLINE_SERVICE_TITLE, IDS_CONTENT_RESTRICTION, uiIDA, 1, ProfileManager.GetPrimaryPad(),NULL,this, app.GetStringTable());
+ }
+ else
+#endif
+ {
+ TelemetryManager->RecordUpsellPresented(iPad, eSen_UpsellID_Full_Version_Of_Game, app.m_dwOfferID);
+ ProfileManager.DisplayFullVersionPurchase(false,iPad,eSen_UpsellID_Full_Version_Of_Game);
+ }
+ }
+ break;
+ }
+}
+
+void UIScene_TrialExitUpsell::handleAnimationEnd()
+{
+ //ui.NavigateToHomeMenu();
+ ui.NavigateToScene(0,eUIScene_SaveMessage);
+}