mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-22 01:05:32 +00:00
cleanup: flatten dead branches in common app and ui code
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
#include "../../Minecraft.World/Platform/stdafx.h"
|
||||
#include "UI.h"
|
||||
#if 0 || 0
|
||||
#include "../Network/Sony/SonyCommerce.h"
|
||||
#endif
|
||||
#include "UIScene_DLCMainMenu.h"
|
||||
|
||||
#define PLAYER_ONLINE_TIMER_ID 0
|
||||
@@ -19,58 +16,23 @@ UIScene_DLCMainMenu::UIScene_DLCMainMenu(int iPad, void* initData,
|
||||
m_labelOffers.init(IDS_DOWNLOADABLE_CONTENT_OFFERS);
|
||||
m_buttonListOffers.init(eControl_OffersList);
|
||||
|
||||
#if 0 || 0
|
||||
// load any local DLC images
|
||||
app.LoadLocalDLCImages();
|
||||
#endif
|
||||
|
||||
#if 0 || 0 || 0
|
||||
// show a timer on this menu
|
||||
m_Timer.setVisible(true);
|
||||
|
||||
m_bCategoriesShown = false;
|
||||
#endif
|
||||
|
||||
if (m_loadedResolution == eSceneResolution_1080) {
|
||||
m_labelXboxStore.init(L"");
|
||||
}
|
||||
|
||||
#if 0
|
||||
m_Timer.setVisible(false);
|
||||
|
||||
m_buttonListOffers.addItem(IDS_DLC_MENU_SKINPACKS, e_DLC_SkinPack);
|
||||
m_buttonListOffers.addItem(IDS_DLC_MENU_TEXTUREPACKS, e_DLC_TexturePacks);
|
||||
m_buttonListOffers.addItem(IDS_DLC_MENU_MASHUPPACKS, e_DLC_MashupPacks);
|
||||
|
||||
app.AddDLCRequest(e_Marketplace_Content); // content is skin packs, texture
|
||||
// packs and mash-up packs
|
||||
// we also need to mount the local DLC so we can tell what's been purchased
|
||||
app.StartInstallDLCProcess(iPad);
|
||||
#endif
|
||||
|
||||
TelemetryManager->RecordMenuShown(iPad, eUIScene_DLCMainMenu, 0);
|
||||
|
||||
#if 0 || 0
|
||||
app.GetCommerce()->ShowPsStoreIcon();
|
||||
#endif
|
||||
|
||||
#if (0 || 0 || 0)
|
||||
addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME);
|
||||
#endif
|
||||
}
|
||||
|
||||
UIScene_DLCMainMenu::~UIScene_DLCMainMenu() {
|
||||
// Alert the app the we no longer want to be informed of ethernet
|
||||
// connections
|
||||
app.SetLiveLinkRequired(false);
|
||||
#if 0 || 0
|
||||
app.FreeLocalDLCImages();
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// 4J-JEV: Have to switch back to user preferred languge now.
|
||||
setLanguageOverride(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
std::wstring UIScene_DLCMainMenu::getMoviePath() { return L"DLCMainMenu"; }
|
||||
@@ -90,16 +52,10 @@ void UIScene_DLCMainMenu::handleInput(int iPad, int key, bool repeat,
|
||||
switch (key) {
|
||||
case ACTION_MENU_CANCEL:
|
||||
if (pressed) {
|
||||
#if 0 || 0
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#if 0
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
@@ -125,9 +81,7 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) {
|
||||
|
||||
// Xbox One will have requested the marketplace content - there is
|
||||
// only that type
|
||||
#if 1
|
||||
app.AddDLCRequest((eDLCMarketplaceType)iIndex, true);
|
||||
#endif
|
||||
killTimer(PLAYER_ONLINE_TIMER_ID);
|
||||
ui.NavigateToScene(m_iPad, eUIScene_DLCOffersMenu, param);
|
||||
break;
|
||||
@@ -136,37 +90,12 @@ void UIScene_DLCMainMenu::handlePress(F64 controlId, F64 childId) {
|
||||
}
|
||||
|
||||
void UIScene_DLCMainMenu::handleTimerComplete(int id) {
|
||||
#if (0 || 0 || 0)
|
||||
switch (id) {
|
||||
case PLAYER_ONLINE_TIMER_ID:
|
||||
#ifndef _WINDOWS64
|
||||
if (ProfileManager.IsSignedInLive(ProfileManager.GetPrimaryPad()) ==
|
||||
false) {
|
||||
// check the player hasn't gone offline
|
||||
// If they have, bring up the PSN warning and exit from the
|
||||
// leaderboards
|
||||
unsigned int uiIDA[1];
|
||||
uiIDA[0] = IDS_OK;
|
||||
C4JStorage::EMessageResult result = ui.RequestErrorMessage(
|
||||
IDS_CONNECTION_LOST,
|
||||
g_NetworkManager.CorrectErrorIDS(
|
||||
IDS_CONNECTION_LOST_LIVE_NO_EXIT),
|
||||
uiIDA, 1, ProfileManager.GetPrimaryPad(),
|
||||
UIScene_DLCMainMenu::ExitDLCMainMenu, this);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int UIScene_DLCMainMenu::ExitDLCMainMenu(void* pParam, int iPad,
|
||||
C4JStorage::EMessageResult result) {
|
||||
UIScene_DLCMainMenu* pClass = (UIScene_DLCMainMenu*)pParam;
|
||||
|
||||
#if 0 || 0
|
||||
app.GetCommerce()->HidePsStoreIcon();
|
||||
#endif
|
||||
pClass->navigateBack();
|
||||
|
||||
return 0;
|
||||
@@ -179,55 +108,10 @@ void UIScene_DLCMainMenu::handleGainFocus(bool navBack) {
|
||||
|
||||
if (navBack) {
|
||||
// add the timer back in
|
||||
#if (0 || 0 || 0)
|
||||
addTimer(PLAYER_ONLINE_TIMER_ID, PLAYER_ONLINE_TIMER_TIME);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_DLCMainMenu::tick() {
|
||||
UIScene::tick();
|
||||
|
||||
#if 0 || 0 || 0
|
||||
if ((m_bCategoriesShown == false) &&
|
||||
(app.GetCommerceCategoriesRetrieved())) {
|
||||
// disable the timer display on this menu
|
||||
m_Timer.setVisible(false);
|
||||
m_bCategoriesShown = true;
|
||||
|
||||
// add the categories to the list box
|
||||
SonyCommerce::CategoryInfo* pCategories = app.GetCategoryInfo();
|
||||
std::list<SonyCommerce::CategoryInfoSub>::iterator iter =
|
||||
pCategories->subCategories.begin();
|
||||
SonyCommerce::CategoryInfoSub category;
|
||||
for (int i = 0; i < pCategories->countOfSubCategories; i++) {
|
||||
// add a button in with the subcategory
|
||||
category = (SonyCommerce::CategoryInfoSub)(*iter);
|
||||
|
||||
std::string teststring = category.categoryName;
|
||||
m_buttonListOffers.addItem(teststring, i);
|
||||
|
||||
iter++;
|
||||
}
|
||||
|
||||
// set the focus to the first thing in the categories if there are any
|
||||
if (pCategories->countOfSubCategories > 0) {
|
||||
m_buttonListOffers.setFocus(true);
|
||||
} else {
|
||||
#if 0 || 0 || 0
|
||||
app.CheckForEmptyStore(ProfileManager.GetPrimaryPad());
|
||||
#endif
|
||||
// need to display text to say no downloadable content available yet
|
||||
m_labelOffers.setLabel(app.GetString(IDS_NO_DLCCATEGORIES));
|
||||
|
||||
#if 0
|
||||
// 4J-JEV: TRC Requirement (R4055), need to display this system
|
||||
// message.
|
||||
ProfileManager.DisplaySystemMessage(
|
||||
SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_EMPTY_STORE,
|
||||
ProfileManager.GetPrimaryPad());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user