mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-25 00:53:41 +00:00
DWORD→uint32_t, BYTE→uint8_t, HRESULT→int32_t, HANDLE→void*, UINT→uint32_t, INT→int32_t, WORD→uint16_t, LONG→int32_t, SHORT→int16_t, LONGLONG→int64_t, ULONG_PTR→uintptr_t, PBYTE→uint8_t*, LPWSTR/PWSTR→wchar_t*, FLOAT→float, CHAR→char, boolean→bool, CONST→const, TRUE→true, FALSE→false across 176 files (excluding vendor libs and Linux stubs).
63 lines
2.1 KiB
C++
63 lines
2.1 KiB
C++
#include "../../Minecraft.World/Platform/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();
|
|
}
|
|
|
|
std::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:
|
|
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
|
|
{
|
|
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);
|
|
}
|