feat: TU0 HowToPlay & Settings Menu (C++ Only)
This commit is contained in:
1 parent
0786cba82e
commit
9191967d7a
27 files changed
+2139
-5198
No files matched your search
@@ -134,8 +134,7 @@ enum eGameSetting
|
||||
eGameSetting_SoundFXVolume,
|
||||
eGameSetting_Gamma,
|
||||
eGameSetting_Difficulty,
|
||||
eGameSetting_Sensitivity_InGame,
|
||||
eGameSetting_Sensitivity_InMenu,
|
||||
eGameSetting_Sensitivity,
|
||||
eGameSetting_ViewBob,
|
||||
eGameSetting_ControlScheme,
|
||||
eGameSetting_ControlInvertLook,
|
||||
|
||||
@@ -63,7 +63,7 @@ typedef struct
|
||||
DWORD dwSelectedSkin;
|
||||
|
||||
// In-Menu sensitivity
|
||||
unsigned char ucMenuSensitivity;
|
||||
unsigned char ucSensitivity;
|
||||
unsigned char ucInterfaceOpacity;
|
||||
unsigned char ucPad02;//2 bytes of padding added here
|
||||
unsigned char usPad03;
|
||||
|
||||
@@ -700,7 +700,7 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
|
||||
app.DebugPrintf("SetDefaultOptions - Difficulty = 1\n");
|
||||
SetGameSettings(iPad,eGameSetting_Difficulty,1);
|
||||
}
|
||||
SetGameSettings(iPad,eGameSetting_Sensitivity_InGame,100);
|
||||
SetGameSettings(iPad,eGameSetting_Sensitivity,100);
|
||||
SetGameSettings(iPad,eGameSetting_ViewBob,1);
|
||||
SetGameSettings(iPad,eGameSetting_ControlScheme,0);
|
||||
SetGameSettings(iPad,eGameSetting_ControlInvertLook,(pSettings->iYAxisInversion!=0)?1:0);
|
||||
@@ -709,7 +709,7 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
|
||||
SetGameSettings(iPad,eGameSetting_GamertagsVisible,1);
|
||||
|
||||
// Interim TU 1.6.6
|
||||
SetGameSettings(iPad,eGameSetting_Sensitivity_InMenu,100);
|
||||
SetGameSettings(iPad,eGameSetting_Sensitivity,100);
|
||||
SetGameSettings(iPad,eGameSetting_DisplaySplitscreenGamertags,1);
|
||||
SetGameSettings(iPad,eGameSetting_Hints,1);
|
||||
SetGameSettings(iPad,eGameSetting_Autosave,2);
|
||||
@@ -836,8 +836,8 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
|
||||
// need to fill in values for the new profile data. No need to save the profile - that'll happen if they get changed, or if the auto save for the profile kicks in
|
||||
{
|
||||
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
|
||||
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucSensitivity=100; //eGameSetting_Sensitivity
|
||||
pGameSettings->usBitmaskValues|=0x0200; //eGameSetting_DisplaySplitscreenGamertags - on
|
||||
pGameSettings->usBitmaskValues|=0x0400; //eGameSetting_Hints - on
|
||||
pGameSettings->usBitmaskValues|=0x1000; //eGameSetting_Autosave - 2
|
||||
@@ -1081,8 +1081,8 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
|
||||
#endif
|
||||
|
||||
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
|
||||
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucSensitivity=100; //eGameSetting_Sensitivity
|
||||
pGameSettings->usBitmaskValues|=0x0200; //eGameSetting_DisplaySplitscreenGamertags - on
|
||||
pGameSettings->usBitmaskValues|=0x0400; //eGameSetting_Hints - on
|
||||
pGameSettings->usBitmaskValues|=0x1000; //eGameSetting_Autosave - 2
|
||||
@@ -1131,7 +1131,7 @@ void CMinecraftApp::ApplyGameSettingsChanged(int iPad)
|
||||
ActionGameSettings(iPad,eGameSetting_SoundFXVolume );
|
||||
ActionGameSettings(iPad,eGameSetting_Gamma );
|
||||
ActionGameSettings(iPad,eGameSetting_Difficulty );
|
||||
ActionGameSettings(iPad,eGameSetting_Sensitivity_InGame );
|
||||
ActionGameSettings(iPad,eGameSetting_Sensitivity );
|
||||
ActionGameSettings(iPad,eGameSetting_ViewBob );
|
||||
ActionGameSettings(iPad,eGameSetting_ControlScheme );
|
||||
ActionGameSettings(iPad,eGameSetting_ControlInvertLook);
|
||||
@@ -1140,7 +1140,7 @@ void CMinecraftApp::ApplyGameSettingsChanged(int iPad)
|
||||
ActionGameSettings(iPad,eGameSetting_GamertagsVisible);
|
||||
|
||||
// Interim TU 1.6.6
|
||||
ActionGameSettings(iPad,eGameSetting_Sensitivity_InMenu );
|
||||
ActionGameSettings(iPad,eGameSetting_Sensitivity );
|
||||
ActionGameSettings(iPad,eGameSetting_DisplaySplitscreenGamertags);
|
||||
ActionGameSettings(iPad,eGameSetting_Hints);
|
||||
ActionGameSettings(iPad,eGameSetting_InterfaceOpacity);
|
||||
@@ -1210,7 +1210,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
||||
}
|
||||
|
||||
break;
|
||||
case eGameSetting_Sensitivity_InGame:
|
||||
case eGameSetting_Sensitivity:
|
||||
// 4J-PB - we don't use the options value
|
||||
// tell the input that we've changed the sensitivity - range of the slider is 0 to 200, default is 100
|
||||
pMinecraft->options->set(Options::Option::SENSITIVITY,((float)GameSettingsA[iPad]->ucSensitivity)/100.0f);
|
||||
@@ -1278,15 +1278,6 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
|
||||
}
|
||||
}
|
||||
break;
|
||||
// Interim TU 1.6.6
|
||||
case eGameSetting_Sensitivity_InMenu:
|
||||
// 4J-PB - we don't use the options value
|
||||
// tell the input that we've changed the sensitivity - range of the slider is 0 to 200, default is 100
|
||||
//pMinecraft->options->set(Options::Option::SENSITIVITY,((float)GameSettingsA[iPad]->ucSensitivity)/100.0f);
|
||||
//InputManager.SetJoypadSensitivity(iPad,((float)GameSettingsA[iPad]->ucSensitivity)/100.0f);
|
||||
|
||||
break;
|
||||
|
||||
case eGameSetting_DisplaySplitscreenGamertags:
|
||||
for( BYTE idx = 0; idx < XUSER_MAX_COUNT; ++idx)
|
||||
{
|
||||
@@ -1639,7 +1630,7 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
|
||||
GameSettingsA[iPad]->bSettingsChanged=true;
|
||||
}
|
||||
break;
|
||||
case eGameSetting_Sensitivity_InGame:
|
||||
case eGameSetting_Sensitivity:
|
||||
if(GameSettingsA[iPad]->ucSensitivity!=ucVal)
|
||||
{
|
||||
GameSettingsA[iPad]->ucSensitivity=ucVal;
|
||||
@@ -1736,16 +1727,6 @@ void CMinecraftApp::SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucV
|
||||
GameSettingsA[iPad]->bSettingsChanged=true;
|
||||
}
|
||||
break;
|
||||
|
||||
// 4J-PB - Added for Interim TU for 1.6.6
|
||||
case eGameSetting_Sensitivity_InMenu:
|
||||
if(GameSettingsA[iPad]->ucMenuSensitivity!=ucVal)
|
||||
{
|
||||
GameSettingsA[iPad]->ucMenuSensitivity=ucVal;
|
||||
ActionGameSettings(iPad,eVal);
|
||||
GameSettingsA[iPad]->bSettingsChanged=true;
|
||||
}
|
||||
break;
|
||||
case eGameSetting_DisplaySplitscreenGamertags:
|
||||
if((GameSettingsA[iPad]->usBitmaskValues&0x0200)!=((ucVal&0x01)<<9))
|
||||
{
|
||||
@@ -2070,7 +2051,7 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
|
||||
case eGameSetting_Difficulty:
|
||||
return GameSettingsA[iPad]->usBitmaskValues&0x0003;
|
||||
break;
|
||||
case eGameSetting_Sensitivity_InGame:
|
||||
case eGameSetting_Sensitivity:
|
||||
return GameSettingsA[iPad]->ucSensitivity;
|
||||
break;
|
||||
case eGameSetting_ViewBob:
|
||||
@@ -2091,11 +2072,6 @@ unsigned char CMinecraftApp::GetGameSettings(int iPad,eGameSetting eVal)
|
||||
case eGameSetting_SplitScreenVertical:
|
||||
return ((GameSettingsA[iPad]->usBitmaskValues&0x0100)>>8);
|
||||
break;
|
||||
// 4J-PB - Added for Interim TU for 1.6.6
|
||||
case eGameSetting_Sensitivity_InMenu:
|
||||
return GameSettingsA[iPad]->ucMenuSensitivity;
|
||||
break;
|
||||
|
||||
case eGameSetting_DisplaySplitscreenGamertags:
|
||||
return ((GameSettingsA[iPad]->usBitmaskValues&0x0200)>>9);
|
||||
break;
|
||||
|
||||
Binary file not shown.
@@ -280,8 +280,8 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
||||
int iPad = getPad();
|
||||
|
||||
bool bStickInput = false;
|
||||
float fInputX = InputManager.GetJoypadStick_LX( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f); // apply the sensitivity
|
||||
float fInputY = InputManager.GetJoypadStick_LY( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f); // apply the sensitivity
|
||||
float fInputX = InputManager.GetJoypadStick_LX( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f); // apply the sensitivity
|
||||
float fInputY = InputManager.GetJoypadStick_LY( iPad, false )*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f); // apply the sensitivity
|
||||
|
||||
#ifdef __ORBIS__
|
||||
// should have sensitivity for the touchpad
|
||||
@@ -311,20 +311,20 @@ void IUIScene_AbstractContainerMenu::onMouseTick()
|
||||
|
||||
if(fNewX>m_fTouchPadDeadZoneX)
|
||||
{
|
||||
vPointerPos.x=m_oldvPointerPos.x+((fNewX-m_fTouchPadDeadZoneX)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f));
|
||||
vPointerPos.x=m_oldvPointerPos.x+((fNewX-m_fTouchPadDeadZoneX)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f));
|
||||
}
|
||||
else if(fNewX<-m_fTouchPadDeadZoneX)
|
||||
{
|
||||
vPointerPos.x=m_oldvPointerPos.x+((fNewX+m_fTouchPadDeadZoneX)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f));
|
||||
vPointerPos.x=m_oldvPointerPos.x+((fNewX+m_fTouchPadDeadZoneX)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f));
|
||||
}
|
||||
|
||||
if(fNewY>m_fTouchPadDeadZoneY)
|
||||
{
|
||||
vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f));
|
||||
vPointerPos.y=m_oldvPointerPos.y+((fNewY-m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f));
|
||||
}
|
||||
else if(fNewY<-m_fTouchPadDeadZoneY)
|
||||
{
|
||||
vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InMenu)/100.0f));
|
||||
vPointerPos.y=m_oldvPointerPos.y+((fNewY+m_fTouchPadDeadZoneY)*((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity)/100.0f));
|
||||
}
|
||||
|
||||
// Clamp to pointer extents.
|
||||
|
||||
@@ -261,24 +261,6 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
||||
case eUIScene_SettingsMenu:
|
||||
newScene = new UIScene_SettingsMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SettingsOptionsMenu:
|
||||
newScene = new UIScene_SettingsOptionsMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SettingsAudioMenu:
|
||||
newScene = new UIScene_SettingsAudioMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SettingsControlMenu:
|
||||
newScene = new UIScene_SettingsControlMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SettingsGraphicsMenu:
|
||||
newScene = new UIScene_SettingsGraphicsMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SettingsUIMenu:
|
||||
newScene = new UIScene_SettingsUIMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_SkinSelectMenu:
|
||||
newScene = new UIScene_SkinSelectMenu(iPad, initData, this);
|
||||
break;
|
||||
case eUIScene_HowToPlayMenu:
|
||||
newScene = new UIScene_HowToPlayMenu(iPad, initData, this);
|
||||
break;
|
||||
|
||||
@@ -5,61 +5,27 @@
|
||||
// strings for buttons in the list
|
||||
unsigned int UIScene_HowToPlayMenu::m_uiHTPButtonNameA[]=
|
||||
{
|
||||
IDS_HOW_TO_PLAY_MENU_WHATSNEW, // eHTPButton_WhatsNew
|
||||
IDS_HOW_TO_PLAY_MENU_BASICS, // eHTPButton_Basics,
|
||||
IDS_HOW_TO_PLAY_MENU_MULTIPLAYER, // eHTPButton_Multiplayer
|
||||
IDS_HOW_TO_PLAY_MENU_HUD, // eHTPButton_Hud,
|
||||
IDS_HOW_TO_PLAY_MENU_CREATIVE, // eHTPButton_Creative,
|
||||
IDS_HOW_TO_PLAY_MENU_INVENTORY, // eHTPButton_Inventory,
|
||||
IDS_HOW_TO_PLAY_MENU_CHESTS, // eHTPButton_Chest,
|
||||
IDS_HOW_TO_PLAY_MENU_CRAFTING, // eHTPButton_Crafting,
|
||||
IDS_HOW_TO_PLAY_MENU_FURNACE, // eHTPButton_Furnace,
|
||||
IDS_HOW_TO_PLAY_MENU_DISPENSER, // eHTPButton_Dispenser,
|
||||
|
||||
IDS_HOW_TO_PLAY_MENU_BREWING, // eHTPButton_Brewing,
|
||||
IDS_HOW_TO_PLAY_MENU_ENCHANTMENT, // eHTPButton_Enchantment,
|
||||
IDS_HOW_TO_PLAY_MENU_ANVIL,
|
||||
IDS_HOW_TO_PLAY_MENU_FARMANIMALS, // eHTPButton_Breeding,
|
||||
IDS_HOW_TO_PLAY_MENU_BREEDANIMALS, // eHTPButton_Breeding,
|
||||
IDS_HOW_TO_PLAY_MENU_TRADING,
|
||||
|
||||
IDS_HOW_TO_PLAY_MENU_NETHERPORTAL, // eHTPButton_NetherPortal,
|
||||
IDS_HOW_TO_PLAY_MENU_THEEND, // eHTPButton_TheEnd,
|
||||
#ifdef _XBOX
|
||||
IDS_HOW_TO_PLAY_MENU_SOCIALMEDIA, // eHTPButton_SocialMedia,
|
||||
IDS_HOW_TO_PLAY_MENU_BANLIST, // eHTPButton_BanningLevels,
|
||||
#endif
|
||||
IDS_HOW_TO_PLAY_MENU_HOSTOPTIONS, // eHTPButton_HostOptions,
|
||||
};
|
||||
|
||||
// mapping the buttons to a scene value
|
||||
unsigned int UIScene_HowToPlayMenu::m_uiHTPSceneA[]=
|
||||
{
|
||||
eHowToPlay_WhatsNew,
|
||||
eHowToPlay_Basics,
|
||||
eHowToPlay_Multiplayer,
|
||||
eHowToPlay_HUD,
|
||||
eHowToPlay_Creative,
|
||||
eHowToPlay_Inventory,
|
||||
eHowToPlay_Chest,
|
||||
eHowToPlay_InventoryCrafting,
|
||||
eHowToPlay_Furnace,
|
||||
eHowToPlay_Dispenser,
|
||||
|
||||
eHowToPlay_Brewing,
|
||||
eHowToPlay_Enchantment,
|
||||
eHowToPlay_Anvil,
|
||||
eHowToPlay_FarmingAnimals,
|
||||
eHowToPlay_Breeding,
|
||||
eHowToPlay_Trading,
|
||||
|
||||
eHowToPlay_NetherPortal,
|
||||
eHowToPlay_TheEnd,
|
||||
#ifdef _XBOX
|
||||
eHowToPlay_SocialMedia,
|
||||
eHowToPlay_BanList,
|
||||
#endif
|
||||
eHowToPlay_HostOptions,
|
||||
};
|
||||
|
||||
UIScene_HowToPlayMenu::UIScene_HowToPlayMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
@@ -71,30 +37,7 @@ UIScene_HowToPlayMenu::UIScene_HowToPlayMenu(int iPad, void *initData, UILayer *
|
||||
|
||||
for(unsigned int i = 0; i < eHTPButton_Max; ++i)
|
||||
{
|
||||
#ifdef __PS3__
|
||||
// If it's the blu ray, or the first Japanese digital game, there's no What's New until the first patch, which will take this line out
|
||||
if(StorageManager.GetBootTypeDisc() || (app.GetProductSKU()==e_sku_SCEJ))
|
||||
{
|
||||
if(!(i==eHTPButton_WhatsNew) )
|
||||
{
|
||||
m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i);//iCount++);
|
||||
}
|
||||
}
|
||||
else
|
||||
#elif defined(__ORBIS__) || defined(_DURANGO) || defined(__PSVITA__)
|
||||
// No What's New for the first PS4 and Xbox One builds
|
||||
if(true)
|
||||
{
|
||||
if(!(i==eHTPButton_WhatsNew) )
|
||||
{
|
||||
m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i);//iCount++);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i);//iCount++);
|
||||
}
|
||||
m_buttonListHowTo.addItem( app.GetString(m_uiHTPButtonNameA[i]) , i);//iCount++);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,29 +12,14 @@ private:
|
||||
|
||||
enum eHTPButton
|
||||
{
|
||||
eHTPButton_WhatsNew = 0,
|
||||
eHTPButton_Basics,
|
||||
eHTPButton_Multiplayer,
|
||||
eHTPButton_Hud,
|
||||
eHTPButton_Creative,
|
||||
eHTPButton_Inventory,
|
||||
eHTPButton_Chest,
|
||||
eHTPButton_Crafting,
|
||||
eHTPButton_Furnace,
|
||||
eHTPButton_Dispenser,
|
||||
eHTPButton_Brewing,
|
||||
eHTPButton_Enchantment,
|
||||
eHTPButton_Anvil,
|
||||
eHTPButton_FarmingAnimals,
|
||||
eHTPButton_Breeding,
|
||||
eHTPButton_Trading,
|
||||
eHTPButton_NetherPortal,
|
||||
eHTPButton_TheEnd,
|
||||
#ifdef _XBOX
|
||||
eHTPButton_SocialMedia,
|
||||
eHTPButton_BanningLevels,
|
||||
#endif
|
||||
eHTPButton_HostOptions,
|
||||
eHTPButton_Max,
|
||||
};
|
||||
|
||||
|
||||
@@ -1,116 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_SettingsAudioMenu.h"
|
||||
|
||||
UIScene_SettingsAudioMenu::UIScene_SettingsAudioMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
WCHAR TempString[256];
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),app.GetGameSettings(m_iPad,eGameSetting_MusicVolume));
|
||||
m_sliderMusic.init(TempString,eControl_Music,0,100,app.GetGameSettings(m_iPad,eGameSetting_MusicVolume));
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume));
|
||||
m_sliderSound.init(TempString,eControl_Sound,0,100,app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume));
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
UIScene_SettingsAudioMenu::~UIScene_SettingsAudioMenu()
|
||||
{
|
||||
}
|
||||
|
||||
wstring UIScene_SettingsAudioMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsAudioMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsAudioMenu";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsAudioMenu::updateTooltips()
|
||||
{
|
||||
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
|
||||
}
|
||||
|
||||
void UIScene_SettingsAudioMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsAudioMenu::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:
|
||||
if(pressed)
|
||||
{
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsAudioMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
WCHAR TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case eControl_Music:
|
||||
m_sliderMusic.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_MusicVolume,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),value);
|
||||
m_sliderMusic.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case eControl_Sound:
|
||||
m_sliderSound.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_SoundFXVolume,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),value);
|
||||
m_sliderSound.setLabel(TempString);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class UIScene_SettingsAudioMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_Music,
|
||||
eControl_Sound
|
||||
};
|
||||
|
||||
UIControl_Slider m_sliderMusic, m_sliderSound; // Sliders
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_sliderMusic, "Music")
|
||||
UI_MAP_ELEMENT( m_sliderSound, "Sound")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
public:
|
||||
UIScene_SettingsAudioMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsAudioMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsAudioMenu;}
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
@@ -1,116 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_SettingsControlMenu.h"
|
||||
|
||||
UIScene_SettingsControlMenu::UIScene_SettingsControlMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
WCHAR TempString[256];
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame));
|
||||
m_sliderSensitivityInGame.init(TempString,eControl_SensitivityInGame,0,200,app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame));
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu));
|
||||
m_sliderSensitivityInMenu.init(TempString,eControl_SensitivityInMenu,0,200,app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu));
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad,false);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
UIScene_SettingsControlMenu::~UIScene_SettingsControlMenu()
|
||||
{
|
||||
}
|
||||
|
||||
wstring UIScene_SettingsControlMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsControlMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsControlMenu";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsControlMenu::updateTooltips()
|
||||
{
|
||||
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
|
||||
}
|
||||
|
||||
void UIScene_SettingsControlMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsControlMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
|
||||
{
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
navigateBack();
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsControlMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
WCHAR TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case eControl_SensitivityInGame:
|
||||
m_sliderSensitivityInGame.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),value);
|
||||
m_sliderSensitivityInGame.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case eControl_SensitivityInMenu:
|
||||
m_sliderSensitivityInMenu.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),value);
|
||||
m_sliderSensitivityInMenu.setLabel(TempString);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class UIScene_SettingsControlMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_SensitivityInGame,
|
||||
eControl_SensitivityInMenu
|
||||
};
|
||||
|
||||
UIControl_Slider m_sliderSensitivityInGame, m_sliderSensitivityInMenu; // Sliders
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_sliderSensitivityInGame, "SensitivityInGame")
|
||||
UI_MAP_ELEMENT( m_sliderSensitivityInMenu, "SensitivityInMenu")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
public:
|
||||
UIScene_SettingsControlMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsControlMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsControlMenu;}
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
@@ -1,153 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_SettingsGraphicsMenu.h"
|
||||
|
||||
UIScene_SettingsGraphicsMenu::UIScene_SettingsGraphicsMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
m_checkboxClouds.init(app.GetString(IDS_CHECKBOX_RENDER_CLOUDS),eControl_Clouds,(app.GetGameSettings(m_iPad,eGameSetting_Clouds)!=0));
|
||||
m_checkboxBedrockFog.init(app.GetString(IDS_CHECKBOX_RENDER_BEDROCKFOG),eControl_BedrockFog,(app.GetGameSettings(m_iPad,eGameSetting_BedrockFog)!=0));
|
||||
m_checkboxCustomSkinAnim.init(app.GetString(IDS_CHECKBOX_CUSTOM_SKIN_ANIM),eControl_CustomSkinAnim,(app.GetGameSettings(m_iPad,eGameSetting_CustomSkinAnim)!=0));
|
||||
|
||||
|
||||
WCHAR TempString[256];
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma));
|
||||
m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma));
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity));
|
||||
m_sliderInterfaceOpacity.init(TempString,eControl_InterfaceOpacity,0,100,app.GetGameSettings(m_iPad,eGameSetting_InterfaceOpacity));
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
bool bInGame=(Minecraft::GetInstance()->level!=NULL);
|
||||
bool bIsPrimaryPad=(ProfileManager.GetPrimaryPad()==m_iPad);
|
||||
// if we're not in the game, we need to use basescene 0
|
||||
if(bInGame)
|
||||
{
|
||||
// If the game has started, then you need to be the host to change the in-game gamertags
|
||||
if(bIsPrimaryPad)
|
||||
{
|
||||
// we are the primary player on this machine, but not the game host
|
||||
// are we the game host? If not, we need to remove the bedrockfog setting
|
||||
if(!g_NetworkManager.IsHost())
|
||||
{
|
||||
// hide the in-game bedrock fog setting
|
||||
removeControl(&m_checkboxBedrockFog, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// We shouldn't have the bedrock fog option, or the m_CustomSkinAnim option
|
||||
removeControl(&m_checkboxBedrockFog, true);
|
||||
removeControl(&m_checkboxCustomSkinAnim, true);
|
||||
}
|
||||
}
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
UIScene_SettingsGraphicsMenu::~UIScene_SettingsGraphicsMenu()
|
||||
{
|
||||
}
|
||||
|
||||
wstring UIScene_SettingsGraphicsMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsGraphicsMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsGraphicsMenu";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsGraphicsMenu::updateTooltips()
|
||||
{
|
||||
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
|
||||
}
|
||||
|
||||
void UIScene_SettingsGraphicsMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsGraphicsMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
|
||||
{
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
// check the checkboxes
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Clouds,m_checkboxClouds.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_BedrockFog,m_checkboxBedrockFog.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_CustomSkinAnim,m_checkboxCustomSkinAnim.IsChecked()?1:0);
|
||||
|
||||
navigateBack();
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsGraphicsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
WCHAR TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case eControl_Gamma:
|
||||
m_sliderGamma.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Gamma,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value);
|
||||
m_sliderGamma.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case eControl_InterfaceOpacity:
|
||||
m_sliderInterfaceOpacity.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_InterfaceOpacity,value);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_INTERFACEOPACITY ),value);
|
||||
m_sliderInterfaceOpacity.setLabel(TempString);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class UIScene_SettingsGraphicsMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_Clouds,
|
||||
eControl_BedrockFog,
|
||||
eControl_CustomSkinAnim,
|
||||
eControl_Gamma,
|
||||
eControl_InterfaceOpacity
|
||||
};
|
||||
|
||||
UIControl_CheckBox m_checkboxClouds, m_checkboxBedrockFog, m_checkboxCustomSkinAnim; // Checkboxes
|
||||
UIControl_Slider m_sliderGamma, m_sliderInterfaceOpacity; // Sliders
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_checkboxClouds, "Clouds")
|
||||
UI_MAP_ELEMENT( m_checkboxBedrockFog, "BedrockFog")
|
||||
UI_MAP_ELEMENT( m_checkboxCustomSkinAnim, "CustomSkinAnim")
|
||||
UI_MAP_ELEMENT( m_sliderGamma, "Gamma")
|
||||
UI_MAP_ELEMENT( m_sliderInterfaceOpacity, "InterfaceOpacity")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
bool m_bNotInGame;
|
||||
public:
|
||||
UIScene_SettingsGraphicsMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsGraphicsMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsGraphicsMenu;}
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
@@ -3,28 +3,90 @@
|
||||
#include "UIScene_SettingsMenu.h"
|
||||
#include "..\..\Minecraft.h"
|
||||
|
||||
int UIScene_SettingsMenu::m_iDifficultySettingA[4]=
|
||||
{
|
||||
IDS_DIFFICULTY_PEACEFUL,
|
||||
IDS_DIFFICULTY_EASY,
|
||||
IDS_DIFFICULTY_NORMAL,
|
||||
IDS_DIFFICULTY_HARD
|
||||
};
|
||||
|
||||
int UIScene_SettingsMenu::m_iDifficultyTitleSettingA[4]=
|
||||
{
|
||||
IDS_DIFFICULTY_TITLE_PEACEFUL,
|
||||
IDS_DIFFICULTY_TITLE_EASY,
|
||||
IDS_DIFFICULTY_TITLE_NORMAL,
|
||||
IDS_DIFFICULTY_TITLE_HARD
|
||||
};
|
||||
|
||||
UIScene_SettingsMenu::UIScene_SettingsMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
WCHAR TempString[256];
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),app.GetGameSettings(m_iPad,eGameSetting_MusicVolume));
|
||||
m_sliderMusic.init(TempString,eControl_Music,0,100,app.GetGameSettings(m_iPad,eGameSetting_MusicVolume));
|
||||
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume));
|
||||
m_sliderSound.init(TempString,eControl_Sound,0,100,app.GetGameSettings(m_iPad,eGameSetting_SoundFXVolume));
|
||||
|
||||
m_buttons[BUTTON_ALL_OPTIONS].init(app.GetString(IDS_OPTIONS),BUTTON_ALL_OPTIONS);
|
||||
m_buttons[BUTTON_ALL_AUDIO].init(app.GetString(IDS_AUDIO),BUTTON_ALL_AUDIO);
|
||||
m_buttons[BUTTON_ALL_CONTROL].init(app.GetString(IDS_CONTROL),BUTTON_ALL_CONTROL);
|
||||
m_buttons[BUTTON_ALL_GRAPHICS].init(app.GetString(IDS_GRAPHICS),BUTTON_ALL_GRAPHICS);
|
||||
m_buttons[BUTTON_ALL_UI].init(app.GetString(IDS_USER_INTERFACE),BUTTON_ALL_UI);
|
||||
m_buttons[BUTTON_ALL_RESETTODEFAULTS].init(app.GetString(IDS_RESET_TO_DEFAULTS),BUTTON_ALL_RESETTODEFAULTS);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),app.GetGameSettings(m_iPad,eGameSetting_Gamma));
|
||||
m_sliderGamma.init(TempString,eControl_Gamma,0,100,app.GetGameSettings(m_iPad,eGameSetting_Gamma));
|
||||
|
||||
if(ProfileManager.GetPrimaryPad()!=m_iPad)
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
m_sliderSensitivity.init(TempString,eControl_Sensitivity,0,200,app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
|
||||
m_checkboxViewBob.init(app.GetString(IDS_VIEW_BOBBING),eControl_ViewBob,(app.GetGameSettings(m_iPad,eGameSetting_ViewBob)!=0));
|
||||
m_checkboxSplitscreen.init(app.GetString(IDS_CHECKBOX_VERTICAL_SPLIT_SCREEN),eControl_Splitscreen,(app.GetGameSettings(m_iPad,eGameSetting_SplitScreenVertical)!=0));
|
||||
//m_checkboxVisbileOnMaps.init(app.GetString(IDS_VISIBLE_ON_MAPS),eControl_VisibleOnMaps,(app.GetGameSettings(m_iPad,eGameSetting_VisibleOnMaps)!=0));
|
||||
|
||||
//str1k3r - temporarily remove the visible on maps checkbox
|
||||
removeControl(&m_checkboxVisbileOnMaps, true);
|
||||
|
||||
unsigned char ucValue = app.GetGameSettings(m_iPad,eGameSetting_Difficulty);
|
||||
|
||||
wchar_t difficultyLabels[4][256];
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
{
|
||||
removeControl( &m_buttons[BUTTON_ALL_AUDIO], true);
|
||||
removeControl( &m_buttons[BUTTON_ALL_GRAPHICS], true);
|
||||
swprintf( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i]));
|
||||
}
|
||||
m_sliderDifficulty.setAllPossibleLabels(4,difficultyLabels);
|
||||
m_sliderDifficulty.init(difficultyLabels[ucValue],eControl_Difficulty,0,3,ucValue);
|
||||
|
||||
wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]);
|
||||
EHTMLFontSize size = eHTMLSize_Normal;
|
||||
if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
|
||||
{
|
||||
size = eHTMLSize_Splitscreen;
|
||||
}
|
||||
wchar_t startTags[64];
|
||||
swprintf(startTags,64,L"<font color=\"#%08x\">",app.GetHTMLColour(eHTMLColor_White));
|
||||
wsText= startTags + wsText;
|
||||
|
||||
m_labelDifficultyText.init(wsText);
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
if(!m_bNotInGame)
|
||||
{
|
||||
// If the game has started, then these shouldnt show
|
||||
removeControl(&m_sliderDifficulty, true);
|
||||
m_labelDifficultyText.setVisible( false );
|
||||
|
||||
// If the game has started, then you need to be the host to change these settings
|
||||
if(ProfileManager.GetPrimaryPad()!=m_iPad)
|
||||
{
|
||||
// hide things we don't want the splitscreen player changing
|
||||
removeControl(&m_sliderMusic, true);
|
||||
removeControl(&m_sliderSound, true);
|
||||
removeControl(&m_sliderGamma, true);
|
||||
removeControl(&m_checkboxSplitscreen, true);
|
||||
}
|
||||
}
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
@@ -41,20 +103,28 @@ wstring UIScene_SettingsMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsMenuSplit";
|
||||
return L"SettingsGraphicsMenuSplit"; //L"SettingsMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsMenu";
|
||||
return L"SettingsGraphicsMenu"; //L"SettingsMenuSplit";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsMenu::handleReload()
|
||||
{
|
||||
if(ProfileManager.GetPrimaryPad()!=m_iPad)
|
||||
if(!m_bNotInGame)
|
||||
{
|
||||
removeControl( &m_buttons[BUTTON_ALL_AUDIO], true);
|
||||
removeControl( &m_buttons[BUTTON_ALL_GRAPHICS], true);
|
||||
removeControl(&m_sliderDifficulty, true);
|
||||
m_labelDifficultyText.setVisible( false );
|
||||
|
||||
if(ProfileManager.GetPrimaryPad()!=m_iPad)
|
||||
{
|
||||
removeControl(&m_sliderMusic, true);
|
||||
removeControl(&m_sliderSound, true);
|
||||
removeControl(&m_sliderGamma, true);
|
||||
removeControl(&m_checkboxSplitscreen, true);
|
||||
}
|
||||
}
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
@@ -67,8 +137,7 @@ void UIScene_SettingsMenu::updateTooltips()
|
||||
|
||||
void UIScene_SettingsMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
if(m_bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
@@ -76,7 +145,7 @@ void UIScene_SettingsMenu::updateComponents()
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
|
||||
@@ -85,19 +154,30 @@ void UIScene_SettingsMenu::updateComponents()
|
||||
|
||||
void UIScene_SettingsMenu::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);
|
||||
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
// if the profile data has been changed, then force a profile write
|
||||
// It seems we're allowed to break the 5 minute rule if it's the result of a user action
|
||||
// check the checkboxes
|
||||
// if the splitscreen vertical/horizontal has changed, need to update the scenes
|
||||
if(app.GetGameSettings(m_iPad,eGameSetting_SplitScreenVertical)!=(m_checkboxSplitscreen.IsChecked()?1:0))
|
||||
{
|
||||
// changed
|
||||
app.SetGameSettings(m_iPad,eGameSetting_SplitScreenVertical,m_checkboxSplitscreen.IsChecked()?1:0);
|
||||
|
||||
// close the xui scenes, so we don't have the navigate backed to menu at the wrong place
|
||||
if(app.GetLocalPlayerCount()==2)
|
||||
{
|
||||
ui.CloseAllPlayersScenes();
|
||||
}
|
||||
}
|
||||
app.SetGameSettings(m_iPad,eGameSetting_ViewBob,m_checkboxViewBob.IsChecked()?1:0);
|
||||
//app.SetGameSettings(m_iPad,eGameSetting_VisbleOnMaps,m_checkboxVisibleOnMaps.IsChecked()?1:0);
|
||||
|
||||
app.CheckGameSettingsChanged(true,iPad);
|
||||
navigateBack();
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
@@ -108,61 +188,65 @@ void UIScene_SettingsMenu::handleInput(int iPad, int key, bool repeat, bool pres
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsMenu::handlePress(F64 controlId, F64 childId)
|
||||
void UIScene_SettingsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
//CD - Added for audio
|
||||
ui.PlayUISFX(eSFX_Press);
|
||||
|
||||
switch((int)controlId)
|
||||
wchar_t TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case BUTTON_ALL_OPTIONS:
|
||||
ui.NavigateToScene(m_iPad, eUIScene_SettingsOptionsMenu);
|
||||
case eControl_Music:
|
||||
m_sliderMusic.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_MusicVolume,value);
|
||||
swprintf(TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_MUSIC ),value);
|
||||
m_sliderMusic.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case BUTTON_ALL_AUDIO:
|
||||
ui.NavigateToScene(m_iPad, eUIScene_SettingsAudioMenu);
|
||||
case eControl_Sound:
|
||||
m_sliderSound.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_SoundFXVolume,value);
|
||||
swprintf(TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SOUND ),value);
|
||||
m_sliderSound.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case BUTTON_ALL_CONTROL:
|
||||
ui.NavigateToScene(m_iPad, eUIScene_SettingsControlMenu);
|
||||
case eControl_Gamma:
|
||||
m_sliderGamma.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Gamma,value);
|
||||
swprintf(TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_GAMMA ),value);
|
||||
m_sliderGamma.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case BUTTON_ALL_GRAPHICS:
|
||||
ui.NavigateToScene(m_iPad, eUIScene_SettingsGraphicsMenu);
|
||||
case eControl_Sensitivity:
|
||||
m_sliderSensitivity.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity,value);
|
||||
swprintf(TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY ),value);
|
||||
m_sliderSensitivity.setLabel(TempString);
|
||||
|
||||
break;
|
||||
case BUTTON_ALL_UI:
|
||||
ui.NavigateToScene(m_iPad, eUIScene_SettingsUIMenu);
|
||||
break;
|
||||
case BUTTON_ALL_RESETTODEFAULTS:
|
||||
case eControl_Difficulty:
|
||||
m_sliderDifficulty.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value);
|
||||
|
||||
wstring wsText=app.GetString(m_iDifficultySettingA[value]);
|
||||
EHTMLFontSize size = eHTMLSize_Normal;
|
||||
if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
|
||||
{
|
||||
// check they really want to do this
|
||||
UINT uiIDA[2];
|
||||
uiIDA[0]=IDS_CONFIRM_CANCEL;
|
||||
uiIDA[1]=IDS_CONFIRM_OK;
|
||||
|
||||
ui.RequestMessageBox(IDS_DEFAULTS_TITLE, IDS_DEFAULTS_TEXT, uiIDA, 2, m_iPad,&UIScene_SettingsMenu::ResetDefaultsDialogReturned,this, app.GetStringTable(), NULL, 0, false);
|
||||
}
|
||||
size = eHTMLSize_Splitscreen;
|
||||
}
|
||||
swprintf(TempString,64,L"<font color=\"#%08x\">",app.GetHTMLColour(eHTMLColor_White));
|
||||
wsText= TempString + wsText;
|
||||
m_labelDifficultyText.setLabel(wsText.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int UIScene_SettingsMenu::ResetDefaultsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result)
|
||||
{
|
||||
UIScene_SettingsMenu* pClass = (UIScene_SettingsMenu*)pParam;
|
||||
|
||||
// results switched for this dialog
|
||||
if(result==C4JStorage::EMessage_ResultDecline)
|
||||
{
|
||||
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
app.SetDefaultOptions(StorageManager.GetDashboardProfileSettings(pClass->m_iPad),pClass->m_iPad);
|
||||
#else
|
||||
app.SetDefaultOptions(ProfileManager.GetDashboardProfileSettings(pClass->m_iPad),pClass->m_iPad);
|
||||
#endif
|
||||
// if the profile data has been changed, then force a profile write
|
||||
// It seems we're allowed to break the 5 minute rule if it's the result of a user action
|
||||
app.CheckGameSettingsChanged(true,iPad);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -2,29 +2,44 @@
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
#define BUTTON_ALL_OPTIONS 0
|
||||
#define BUTTON_ALL_AUDIO 1
|
||||
#define BUTTON_ALL_CONTROL 2
|
||||
#define BUTTON_ALL_GRAPHICS 4
|
||||
#define BUTTON_ALL_UI 5
|
||||
#define BUTTON_ALL_RESETTODEFAULTS 6
|
||||
#define BUTTONS_ALL_MAX BUTTON_ALL_RESETTODEFAULTS + 1
|
||||
|
||||
class UIScene_SettingsMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
UIControl_Button m_buttons[BUTTONS_ALL_MAX];
|
||||
enum EControls
|
||||
{
|
||||
eControl_Music,
|
||||
eControl_Sound,
|
||||
eControl_Gamma,
|
||||
eControl_Sensitivity,
|
||||
eControl_Splitscreen,
|
||||
eControl_ViewBob,
|
||||
eControl_VisibleOnMaps,
|
||||
eControl_Difficulty
|
||||
};
|
||||
protected:
|
||||
static int m_iDifficultySettingA[4];
|
||||
static int m_iDifficultyTitleSettingA[4];
|
||||
|
||||
private:
|
||||
UIControl_CheckBox m_checkboxViewBob, m_checkboxSplitscreen, m_checkboxVisbileOnMaps; // Checkboxes
|
||||
UIControl_Slider m_sliderMusic, m_sliderSound, m_sliderGamma, m_sliderSensitivity, m_sliderDifficulty; // Sliders
|
||||
UIControl_Label m_labelDifficultyText; //Text
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_OPTIONS], "Button1")
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_AUDIO], "Button2")
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_CONTROL], "Button3")
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_GRAPHICS], "Button4")
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_UI], "Button5")
|
||||
UI_MAP_ELEMENT( m_buttons[BUTTON_ALL_RESETTODEFAULTS], "Button6")
|
||||
UI_MAP_ELEMENT( m_sliderMusic, "Music")
|
||||
UI_MAP_ELEMENT( m_sliderSound, "Sound")
|
||||
UI_MAP_ELEMENT( m_sliderGamma, "Gamma")
|
||||
UI_MAP_ELEMENT( m_sliderSensitivity, "Sensitivity")
|
||||
UI_MAP_ELEMENT( m_checkboxViewBob, "ViewBob")
|
||||
UI_MAP_ELEMENT( m_checkboxSplitscreen, "Splitscreen")
|
||||
UI_MAP_ELEMENT( m_checkboxVisbileOnMaps, "VisibleOnMaps")
|
||||
UI_MAP_ELEMENT( m_sliderDifficulty, "Difficulty")
|
||||
UI_MAP_ELEMENT( m_labelDifficultyText, "DifficultyText")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
bool m_bNotInGame;
|
||||
public:
|
||||
UIScene_SettingsMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsMenu();
|
||||
~UIScene_SettingsMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsMenu;}
|
||||
|
||||
@@ -40,8 +55,5 @@ public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
protected:
|
||||
void handlePress(F64 controlId, F64 childId);
|
||||
|
||||
static int ResetDefaultsDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
@@ -1,253 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_SettingsOptionsMenu.h"
|
||||
|
||||
int UIScene_SettingsOptionsMenu::m_iDifficultySettingA[4]=
|
||||
{
|
||||
IDS_DIFFICULTY_PEACEFUL,
|
||||
IDS_DIFFICULTY_EASY,
|
||||
IDS_DIFFICULTY_NORMAL,
|
||||
IDS_DIFFICULTY_HARD
|
||||
};
|
||||
|
||||
int UIScene_SettingsOptionsMenu::m_iDifficultyTitleSettingA[4]=
|
||||
{
|
||||
IDS_DIFFICULTY_TITLE_PEACEFUL,
|
||||
IDS_DIFFICULTY_TITLE_EASY,
|
||||
IDS_DIFFICULTY_TITLE_NORMAL,
|
||||
IDS_DIFFICULTY_TITLE_HARD
|
||||
};
|
||||
|
||||
UIScene_SettingsOptionsMenu::UIScene_SettingsOptionsMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
m_checkboxViewBob.init(app.GetString(IDS_VIEW_BOBBING),eControl_ViewBob,(app.GetGameSettings(m_iPad,eGameSetting_ViewBob)!=0));
|
||||
m_checkboxShowHints.init(app.GetString(IDS_HINTS),eControl_ShowHints,(app.GetGameSettings(m_iPad,eGameSetting_Hints)!=0));
|
||||
m_checkboxShowTooltips.init(app.GetString(IDS_IN_GAME_TOOLTIPS),eControl_ShowTooltips,(app.GetGameSettings(m_iPad,eGameSetting_Tooltips)!=0));
|
||||
m_checkboxInGameGamertags.init(app.GetString(IDS_IN_GAME_GAMERTAGS),eControl_InGameGamertags,(app.GetGameSettings(m_iPad,eGameSetting_GamertagsVisible)!=0));
|
||||
|
||||
// check if we should display the mash-up option
|
||||
if(m_bNotInGame && app.GetMashupPackWorlds(m_iPad)!=0xFFFFFFFF)
|
||||
{
|
||||
// the mash-up option is needed
|
||||
m_bMashUpWorldsUnhideOption=true;
|
||||
m_checkboxMashupWorlds.init(app.GetString(IDS_UNHIDE_MASHUP_WORLDS),eControl_ShowMashUpWorlds,false);
|
||||
}
|
||||
else
|
||||
{
|
||||
//m_checkboxMashupWorlds.init(L"",eControl_ShowMashUpWorlds,false);
|
||||
removeControl(&m_checkboxMashupWorlds, true);
|
||||
m_bMashUpWorldsUnhideOption=false;
|
||||
}
|
||||
|
||||
unsigned char ucValue=app.GetGameSettings(m_iPad,eGameSetting_Autosave);
|
||||
|
||||
wchar_t autosaveLabels[9][256];
|
||||
for(unsigned int i = 0; i < 9; ++i)
|
||||
{
|
||||
if(i==0)
|
||||
{
|
||||
swprintf( autosaveLabels[i], 256, L"%ls", app.GetString( IDS_SLIDER_AUTOSAVE_OFF ));
|
||||
}
|
||||
else
|
||||
{
|
||||
swprintf( autosaveLabels[i], 256, L"%ls: %d %ls", app.GetString( IDS_SLIDER_AUTOSAVE ),i*15, app.GetString( IDS_MINUTES ));
|
||||
}
|
||||
|
||||
}
|
||||
m_sliderAutosave.setAllPossibleLabels(9,autosaveLabels);
|
||||
m_sliderAutosave.init(autosaveLabels[ucValue],eControl_Autosave,0,8,ucValue);
|
||||
|
||||
#if defined(_XBOX_ONE) || defined(__ORBIS__)
|
||||
removeControl(&m_sliderAutosave,true);
|
||||
#endif
|
||||
|
||||
ucValue = app.GetGameSettings(m_iPad,eGameSetting_Difficulty);
|
||||
wchar_t difficultyLabels[4][256];
|
||||
for(unsigned int i = 0; i < 4; ++i)
|
||||
{
|
||||
swprintf( difficultyLabels[i], 256, L"%ls: %ls", app.GetString( IDS_SLIDER_DIFFICULTY ),app.GetString(m_iDifficultyTitleSettingA[i]));
|
||||
}
|
||||
m_sliderDifficulty.setAllPossibleLabels(4,difficultyLabels);
|
||||
m_sliderDifficulty.init(difficultyLabels[ucValue],eControl_Difficulty,0,3,ucValue);
|
||||
|
||||
wstring wsText=app.GetString(m_iDifficultySettingA[app.GetGameSettings(m_iPad,eGameSetting_Difficulty)]);
|
||||
EHTMLFontSize size = eHTMLSize_Normal;
|
||||
if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
|
||||
{
|
||||
size = eHTMLSize_Splitscreen;
|
||||
}
|
||||
wchar_t startTags[64];
|
||||
swprintf(startTags,64,L"<font color=\"#%08x\">",app.GetHTMLColour(eHTMLColor_White));
|
||||
wsText= startTags + wsText;
|
||||
|
||||
m_labelDifficultyText.init(wsText);
|
||||
|
||||
// If you are in-game, only the game host can change in-game gamertags, and you can't change difficulty
|
||||
// only the primary player gets to change the autosave and difficulty settings
|
||||
bool bRemoveDifficulty=false;
|
||||
bool bRemoveAutosave=false;
|
||||
bool bRemoveInGameGamertags=false;
|
||||
float fRemoveHeight=0.0f,fWidth,fHeight;
|
||||
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
bool bPrimaryPlayer = ProfileManager.GetPrimaryPad()==m_iPad;
|
||||
if(!bPrimaryPlayer)
|
||||
{
|
||||
bRemoveDifficulty=true;
|
||||
bRemoveAutosave=true;
|
||||
bRemoveInGameGamertags=true;
|
||||
}
|
||||
|
||||
if(!bNotInGame) // in the game
|
||||
{
|
||||
bRemoveDifficulty=true;
|
||||
if(!g_NetworkManager.IsHost())
|
||||
{
|
||||
bRemoveAutosave=true;
|
||||
bRemoveInGameGamertags=true;
|
||||
}
|
||||
}
|
||||
if(bRemoveDifficulty)
|
||||
{
|
||||
m_labelDifficultyText.setVisible( false );
|
||||
removeControl(&m_sliderDifficulty, true);
|
||||
}
|
||||
|
||||
if(bRemoveAutosave)
|
||||
{
|
||||
removeControl(&m_sliderAutosave, true);
|
||||
}
|
||||
|
||||
if(bRemoveInGameGamertags)
|
||||
{
|
||||
removeControl(&m_checkboxInGameGamertags, true);
|
||||
}
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
UIScene_SettingsOptionsMenu::~UIScene_SettingsOptionsMenu()
|
||||
{
|
||||
}
|
||||
|
||||
wstring UIScene_SettingsOptionsMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsOptionsMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsOptionsMenu";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsOptionsMenu::updateTooltips()
|
||||
{
|
||||
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
|
||||
}
|
||||
|
||||
void UIScene_SettingsOptionsMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,RenderManager.IsHiDef());
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsOptionsMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
|
||||
{
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
// check the checkboxes
|
||||
app.SetGameSettings(m_iPad,eGameSetting_ViewBob,m_checkboxViewBob.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_GamertagsVisible,m_checkboxInGameGamertags.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Hints,m_checkboxShowHints.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Tooltips,m_checkboxShowTooltips.IsChecked()?1:0);
|
||||
|
||||
// the mashup option will only be shown if some worlds have been previously hidden
|
||||
if(m_bMashUpWorldsUnhideOption && m_checkboxMashupWorlds.IsChecked())
|
||||
{
|
||||
// unhide all worlds
|
||||
app.EnableMashupPackWorlds(m_iPad);
|
||||
}
|
||||
|
||||
// 4J-PB - don't action changes here or we might write to the profile on backing out here and then get a change in the settings all, and write again on backing out there
|
||||
//app.CheckGameSettingsChanged(true,pInputData->UserIndex);
|
||||
|
||||
navigateBack();
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsOptionsMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
WCHAR TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case eControl_Autosave:
|
||||
m_sliderAutosave.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Autosave,value);
|
||||
// Update the autosave timer
|
||||
app.SetAutosaveTimerTime();
|
||||
|
||||
break;
|
||||
case eControl_Difficulty:
|
||||
m_sliderDifficulty.handleSliderMove(value);
|
||||
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Difficulty,value);
|
||||
|
||||
wstring wsText=app.GetString(m_iDifficultySettingA[value]);
|
||||
EHTMLFontSize size = eHTMLSize_Normal;
|
||||
if(!RenderManager.IsHiDef() && !RenderManager.IsWidescreen())
|
||||
{
|
||||
size = eHTMLSize_Splitscreen;
|
||||
}
|
||||
wchar_t startTags[64];
|
||||
swprintf(startTags,64,L"<font color=\"#%08x\">",app.GetHTMLColour(eHTMLColor_White));
|
||||
wsText= startTags + wsText;
|
||||
m_labelDifficultyText.setLabel(wsText.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class UIScene_SettingsOptionsMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_ViewBob,
|
||||
eControl_ShowHints,
|
||||
eControl_ShowTooltips,
|
||||
eControl_InGameGamertags,
|
||||
eControl_ShowMashUpWorlds,
|
||||
eControl_Autosave,
|
||||
eControl_Difficulty
|
||||
};
|
||||
protected:
|
||||
static int m_iDifficultySettingA[4];
|
||||
static int m_iDifficultyTitleSettingA[4];
|
||||
|
||||
private:
|
||||
UIControl_CheckBox m_checkboxViewBob, m_checkboxShowHints, m_checkboxShowTooltips, m_checkboxInGameGamertags, m_checkboxMashupWorlds; // Checkboxes
|
||||
UIControl_Slider m_sliderAutosave, m_sliderDifficulty; // Sliders
|
||||
UIControl_Label m_labelDifficultyText; //Text
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_checkboxViewBob, "ViewBob")
|
||||
UI_MAP_ELEMENT( m_checkboxShowHints, "ShowHints")
|
||||
UI_MAP_ELEMENT( m_checkboxShowTooltips, "ShowTooltips")
|
||||
UI_MAP_ELEMENT( m_checkboxInGameGamertags, "InGameGamertags")
|
||||
UI_MAP_ELEMENT( m_checkboxMashupWorlds, "ShowMashUpWorlds")
|
||||
UI_MAP_ELEMENT( m_sliderAutosave, "Autosave")
|
||||
UI_MAP_ELEMENT( m_sliderDifficulty, "Difficulty")
|
||||
UI_MAP_ELEMENT( m_labelDifficultyText, "DifficultyText")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
bool m_bNotInGame;
|
||||
bool m_bMashUpWorldsUnhideOption;
|
||||
public:
|
||||
UIScene_SettingsOptionsMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsOptionsMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsOptionsMenu;}
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
@@ -1,183 +0,0 @@
|
||||
#include "stdafx.h"
|
||||
#include "UI.h"
|
||||
#include "UIScene_SettingsUIMenu.h"
|
||||
|
||||
UIScene_SettingsUIMenu::UIScene_SettingsUIMenu(int iPad, void *initData, UILayer *parentLayer) : UIScene(iPad, parentLayer)
|
||||
{
|
||||
// Setup all the Iggy references we need for this scene
|
||||
initialiseMovie();
|
||||
|
||||
m_bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
|
||||
m_checkboxDisplayHUD.init(app.GetString(IDS_CHECKBOX_DISPLAY_HUD),eControl_DisplayHUD,(app.GetGameSettings(m_iPad,eGameSetting_DisplayHUD)!=0));
|
||||
m_checkboxDisplayHand.init(app.GetString(IDS_CHECKBOX_DISPLAY_HAND),eControl_DisplayHand,(app.GetGameSettings(m_iPad,eGameSetting_DisplayHand)!=0));
|
||||
m_checkboxDisplayDeathMessages.init(app.GetString(IDS_CHECKBOX_DEATH_MESSAGES),eControl_DisplayDeathMessages,(app.GetGameSettings(m_iPad,eGameSetting_DeathMessages)!=0));
|
||||
m_checkboxDisplayAnimatedCharacter.init(app.GetString(IDS_CHECKBOX_ANIMATED_CHARACTER),eControl_DisplayAnimatedCharacter,(app.GetGameSettings(m_iPad,eGameSetting_AnimatedCharacter)!=0));
|
||||
m_checkboxSplitscreen.init(app.GetString(IDS_CHECKBOX_VERTICAL_SPLIT_SCREEN),eControl_Splitscreen,(app.GetGameSettings(m_iPad,eGameSetting_SplitScreenVertical)!=0));
|
||||
m_checkboxShowSplitscreenGamertags.init(app.GetString(IDS_CHECKBOX_DISPLAY_SPLITSCREENGAMERTAGS),eControl_ShowSplitscreenGamertags,(app.GetGameSettings(m_iPad,eGameSetting_DisplaySplitscreenGamertags)!=0));
|
||||
|
||||
WCHAR TempString[256];
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),app.GetGameSettings(m_iPad,eGameSetting_UISize)+1);
|
||||
m_sliderUISize.init(TempString,eControl_UISize,1,3,app.GetGameSettings(m_iPad,eGameSetting_UISize)+1);
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1);
|
||||
m_sliderUISizeSplitscreen.init(TempString,eControl_UISizeSplitscreen,1,3,app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1);
|
||||
|
||||
doHorizontalResizeCheck();
|
||||
|
||||
bool bInGame=(Minecraft::GetInstance()->level!=NULL);
|
||||
bool bPrimaryPlayer = ProfileManager.GetPrimaryPad()==m_iPad;
|
||||
|
||||
// if we're not in the game, we need to use basescene 0
|
||||
if(bInGame)
|
||||
{
|
||||
// If the game has started, then you need to be the host to change the in-game gamertags
|
||||
if(!bPrimaryPlayer)
|
||||
{
|
||||
// hide things we don't want the splitscreen player changing
|
||||
removeControl(&m_checkboxSplitscreen, true);
|
||||
removeControl(&m_checkboxShowSplitscreenGamertags, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(app.GetLocalPlayerCount()>1)
|
||||
{
|
||||
#if TO_BE_IMPLEMENTED
|
||||
app.AdjustSplitscreenScene(m_hObj,&m_OriginalPosition,m_iPad);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsUIMenu::updateTooltips()
|
||||
{
|
||||
ui.SetTooltips( m_iPad, IDS_TOOLTIPS_SELECT,IDS_TOOLTIPS_BACK);
|
||||
}
|
||||
|
||||
void UIScene_SettingsUIMenu::updateComponents()
|
||||
{
|
||||
bool bNotInGame=(Minecraft::GetInstance()->level==NULL);
|
||||
if(bNotInGame)
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,true);
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_parentLayer->showComponent(m_iPad,eUIComponent_Panorama,false);
|
||||
|
||||
if( app.GetLocalPlayerCount() == 1 ) m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,true);
|
||||
else m_parentLayer->showComponent(m_iPad,eUIComponent_Logo,false);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
UIScene_SettingsUIMenu::~UIScene_SettingsUIMenu()
|
||||
{
|
||||
}
|
||||
|
||||
wstring UIScene_SettingsUIMenu::getMoviePath()
|
||||
{
|
||||
if(app.GetLocalPlayerCount() > 1)
|
||||
{
|
||||
return L"SettingsUIMenuSplit";
|
||||
}
|
||||
else
|
||||
{
|
||||
return L"SettingsUIMenu";
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsUIMenu::handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled)
|
||||
{
|
||||
ui.AnimateKeyPress(iPad, key, repeat, pressed, released);
|
||||
|
||||
switch(key)
|
||||
{
|
||||
case ACTION_MENU_CANCEL:
|
||||
if(pressed)
|
||||
{
|
||||
// check the checkboxes
|
||||
app.SetGameSettings(m_iPad,eGameSetting_DisplayHUD,m_checkboxDisplayHUD.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_DisplayHand,m_checkboxDisplayHand.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_DisplaySplitscreenGamertags,m_checkboxShowSplitscreenGamertags.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_DeathMessages,m_checkboxDisplayDeathMessages.IsChecked()?1:0);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_AnimatedCharacter,m_checkboxDisplayAnimatedCharacter.IsChecked()?1:0);
|
||||
|
||||
// if the splitscreen vertical/horizontal has changed, need to update the scenes
|
||||
if(app.GetGameSettings(m_iPad,eGameSetting_SplitScreenVertical)!=(m_checkboxSplitscreen.IsChecked()?1:0))
|
||||
{
|
||||
// changed
|
||||
app.SetGameSettings(m_iPad,eGameSetting_SplitScreenVertical,m_checkboxSplitscreen.IsChecked()?1:0);
|
||||
|
||||
// close the xui scenes, so we don't have the navigate backed to menu at the wrong place
|
||||
if(app.GetLocalPlayerCount()==2)
|
||||
{
|
||||
ui.CloseAllPlayersScenes();
|
||||
}
|
||||
else
|
||||
{
|
||||
navigateBack();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
navigateBack();
|
||||
}
|
||||
handled = true;
|
||||
}
|
||||
break;
|
||||
case ACTION_MENU_OK:
|
||||
#ifdef __ORBIS__
|
||||
case ACTION_MENU_TOUCHPAD_PRESS:
|
||||
#endif
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
case ACTION_MENU_UP:
|
||||
case ACTION_MENU_DOWN:
|
||||
case ACTION_MENU_LEFT:
|
||||
case ACTION_MENU_RIGHT:
|
||||
sendInputToMovie(key, repeat, pressed, released);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UIScene_SettingsUIMenu::handleSliderMove(F64 sliderId, F64 currentValue)
|
||||
{
|
||||
WCHAR TempString[256];
|
||||
int value = (int)currentValue;
|
||||
switch((int)sliderId)
|
||||
{
|
||||
case eControl_UISize:
|
||||
m_sliderUISize.handleSliderMove(value);
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZE ),value);
|
||||
m_sliderUISize.setLabel(TempString);
|
||||
|
||||
// is this different from the current value?
|
||||
if(value != app.GetGameSettings(m_iPad,eGameSetting_UISize)+1)
|
||||
{
|
||||
app.SetGameSettings(m_iPad,eGameSetting_UISize,value-1);
|
||||
// Apply the changes to the selected text position
|
||||
ui.UpdateSelectedItemPos(m_iPad);
|
||||
}
|
||||
|
||||
break;
|
||||
case eControl_UISizeSplitscreen:
|
||||
m_sliderUISizeSplitscreen.handleSliderMove(value);
|
||||
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d", app.GetString( IDS_SLIDER_UISIZESPLITSCREEN ),value);
|
||||
m_sliderUISizeSplitscreen.setLabel(TempString);
|
||||
|
||||
if(value != app.GetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen)+1)
|
||||
{
|
||||
// slider is 1 to 3
|
||||
app.SetGameSettings(m_iPad,eGameSetting_UISizeSplitscreen,value-1);
|
||||
// Apply the changes to the selected text position
|
||||
ui.UpdateSelectedItemPos(m_iPad);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "UIScene.h"
|
||||
|
||||
class UIScene_SettingsUIMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
enum EControls
|
||||
{
|
||||
eControl_DisplayHUD,
|
||||
eControl_DisplayHand,
|
||||
eControl_DisplayDeathMessages,
|
||||
eControl_DisplayAnimatedCharacter,
|
||||
eControl_Splitscreen,
|
||||
eControl_ShowSplitscreenGamertags,
|
||||
eControl_UISize,
|
||||
eControl_UISizeSplitscreen
|
||||
};
|
||||
|
||||
UIControl_CheckBox m_checkboxDisplayHUD, m_checkboxDisplayHand, m_checkboxDisplayDeathMessages, m_checkboxDisplayAnimatedCharacter, m_checkboxSplitscreen, m_checkboxShowSplitscreenGamertags; // Checkboxes
|
||||
UIControl_Slider m_sliderUISize, m_sliderUISizeSplitscreen; // Sliders
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
UI_MAP_ELEMENT( m_checkboxDisplayHUD, "DisplayHUD")
|
||||
UI_MAP_ELEMENT( m_checkboxDisplayHand, "DisplayHand")
|
||||
UI_MAP_ELEMENT( m_checkboxDisplayDeathMessages, "DisplayDeathMessages")
|
||||
UI_MAP_ELEMENT( m_checkboxDisplayAnimatedCharacter, "DisplayAnimatedCharacter")
|
||||
UI_MAP_ELEMENT( m_checkboxSplitscreen, "Splitscreen")
|
||||
UI_MAP_ELEMENT( m_checkboxShowSplitscreenGamertags, "ShowSplitscreenGamertags")
|
||||
|
||||
UI_MAP_ELEMENT( m_sliderUISize, "UISize")
|
||||
UI_MAP_ELEMENT( m_sliderUISizeSplitscreen, "UISizeSplitscreen")
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
bool m_bNotInGame;
|
||||
public:
|
||||
UIScene_SettingsUIMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
virtual ~UIScene_SettingsUIMenu();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SettingsUIMenu;}
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue);
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,189 +0,0 @@
|
||||
#pragma once
|
||||
#include "..\..\..\Minecraft.World\Definitions.h"
|
||||
#include "UIScene.h"
|
||||
#include "UIControl_PlayerSkinPreview.h"
|
||||
|
||||
class UIScene_SkinSelectMenu : public UIScene
|
||||
{
|
||||
private:
|
||||
static WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
|
||||
|
||||
// 4J Stu - How many to show on each side of the main control
|
||||
static const BYTE sidePreviewControls = 4;
|
||||
|
||||
#ifdef __PSVITA__
|
||||
enum ETouchInput
|
||||
{
|
||||
ETouchInput_TabLeft = 10,
|
||||
ETouchInput_TabRight,
|
||||
ETouchInput_TabCenter,
|
||||
ETouchInput_IggyCharacters,
|
||||
|
||||
ETouchInput_Count,
|
||||
};
|
||||
#endif
|
||||
|
||||
enum ESkinSelectNavigation
|
||||
{
|
||||
eSkinNavigation_Pack,
|
||||
eSkinNavigation_Skin,
|
||||
|
||||
eSkinNavigation_Count,
|
||||
};
|
||||
|
||||
enum ECharacters
|
||||
{
|
||||
eCharacter_Current,
|
||||
eCharacter_Next1,
|
||||
eCharacter_Next2,
|
||||
eCharacter_Next3,
|
||||
eCharacter_Next4,
|
||||
eCharacter_Previous1,
|
||||
eCharacter_Previous2,
|
||||
eCharacter_Previous3,
|
||||
eCharacter_Previous4,
|
||||
|
||||
eCharacter_COUNT,
|
||||
};
|
||||
|
||||
UIControl_PlayerSkinPreview m_characters[eCharacter_COUNT];
|
||||
UIControl_Label m_labelSkinName, m_labelSkinOrigin;
|
||||
UIControl_Label m_labelSelected;
|
||||
UIControl m_controlSkinNamePlate, m_controlSelectedPanel, m_controlIggyCharacters, m_controlTimer;
|
||||
#ifdef __PSVITA__
|
||||
UIControl_Touch m_TouchTabLeft, m_TouchTabRight, m_TouchTabCenter, m_TouchIggyCharacters;
|
||||
#endif
|
||||
IggyName m_funcSetPlayerCharacterSelected, m_funcSetCharacterLocked;
|
||||
IggyName m_funcSetLeftLabel, m_funcSetRightLabel, m_funcSetCentreLabel;
|
||||
UI_BEGIN_MAP_ELEMENTS_AND_NAMES(UIScene)
|
||||
#ifdef __PSVITA__
|
||||
UI_MAP_ELEMENT( m_TouchTabLeft, "TouchTabLeft" )
|
||||
UI_MAP_ELEMENT( m_TouchTabRight, "TouchTabRight" )
|
||||
UI_MAP_ELEMENT( m_TouchTabCenter, "TouchTabCenter" )
|
||||
UI_MAP_ELEMENT( m_TouchIggyCharacters, "TouchIggyCharacters" )
|
||||
#endif
|
||||
UI_MAP_ELEMENT( m_controlSkinNamePlate, "SkinNamePlate")
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlSkinNamePlate )
|
||||
UI_MAP_ELEMENT( m_labelSkinName, "SkinTitle1")
|
||||
UI_MAP_ELEMENT( m_labelSkinOrigin, "SkinTitle2")
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_ELEMENT( m_controlSelectedPanel, "SelectedPanel" )
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlSelectedPanel )
|
||||
UI_MAP_ELEMENT( m_labelSelected, "SelectedPanelLabel" )
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_ELEMENT( m_controlTimer, "Timer" )
|
||||
|
||||
// 4J Stu - These aren't really used a AS3 controls, but adding here means that they get ticked by the scene
|
||||
UI_MAP_ELEMENT( m_controlIggyCharacters, "IggyCharacters" )
|
||||
UI_BEGIN_MAP_CHILD_ELEMENTS( m_controlIggyCharacters )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Current], "iggy_Character0" )
|
||||
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Next1], "iggy_Character1" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Next2], "iggy_Character2" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Next3], "iggy_Character3" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Next4], "iggy_Character4" )
|
||||
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Previous1], "iggy_Character5" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Previous2], "iggy_Character6" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Previous3], "iggy_Character7" )
|
||||
UI_MAP_ELEMENT( m_characters[eCharacter_Previous4], "iggy_Character8" )
|
||||
UI_END_MAP_CHILD_ELEMENTS()
|
||||
|
||||
UI_MAP_NAME( m_funcSetPlayerCharacterSelected, L"SetPlayerCharacterSelected" )
|
||||
UI_MAP_NAME( m_funcSetCharacterLocked, L"SetCharacterLocked" )
|
||||
|
||||
UI_MAP_NAME( m_funcSetLeftLabel, L"SetLeftLabel" )
|
||||
UI_MAP_NAME( m_funcSetCentreLabel, L"SetCenterLabel" )
|
||||
UI_MAP_NAME( m_funcSetRightLabel, L"SetRightLabel" )
|
||||
UI_END_MAP_ELEMENTS_AND_NAMES()
|
||||
|
||||
DLCPack *m_currentPack;
|
||||
DWORD m_packIndex, m_skinIndex;
|
||||
DWORD m_originalSkinId;
|
||||
wstring m_currentSkinPath, m_selectedSkinPath, m_selectedCapePath;
|
||||
vector<SKIN_BOX *> *m_vAdditionalSkinBoxes;
|
||||
|
||||
bool m_bSlidingSkins, m_bAnimatingMove;
|
||||
ESkinSelectNavigation m_currentNavigation;
|
||||
|
||||
bool m_bNoSkinsToShow;
|
||||
DWORD m_currentPackCount;
|
||||
bool m_bIgnoreInput;
|
||||
bool m_bSkinIndexChanged;
|
||||
wstring m_leftLabel, m_centreLabel, m_rightLabel;
|
||||
|
||||
S32 m_iTouchXStart;
|
||||
bool m_bTouchScrolled;
|
||||
public:
|
||||
UIScene_SkinSelectMenu(int iPad, void *initData, UILayer *parentLayer);
|
||||
#ifdef __PSVITA__
|
||||
virtual ~UIScene_SkinSelectMenu() { DeleteCriticalSection(&m_DLCInstallCS); }
|
||||
#endif
|
||||
|
||||
virtual void tick();
|
||||
|
||||
virtual void updateTooltips();
|
||||
virtual void updateComponents();
|
||||
|
||||
virtual EUIScene getSceneType() { return eUIScene_SkinSelectMenu;}
|
||||
|
||||
virtual void handleAnimationEnd();
|
||||
|
||||
|
||||
protected:
|
||||
// TODO: This should be pure virtual in this class
|
||||
virtual wstring getMoviePath();
|
||||
|
||||
public:
|
||||
// INPUT
|
||||
virtual void handleInput(int iPad, int key, bool repeat, bool pressed, bool released, bool &handled);
|
||||
|
||||
virtual void customDraw(IggyCustomDrawCallbackRegion *region);
|
||||
|
||||
private:
|
||||
void handleSkinIndexChanged();
|
||||
int getNextSkinIndex(DWORD sourceIndex);
|
||||
int getPreviousSkinIndex(DWORD sourceIndex);
|
||||
|
||||
TEXTURE_NAME getTextureId(int skinIndex);
|
||||
|
||||
void handlePackIndexChanged();
|
||||
void updatePackDisplay();
|
||||
int getNextPackIndex(DWORD sourceIndex);
|
||||
int getPreviousPackIndex(DWORD sourceIndex);
|
||||
|
||||
void setCharacterSelected(bool selected);
|
||||
void setCharacterLocked(bool locked);
|
||||
|
||||
void setLeftLabel(const wstring &label);
|
||||
void setCentreLabel(const wstring &label);
|
||||
void setRightLabel(const wstring &label);
|
||||
|
||||
virtual void HandleDLCMountingComplete();
|
||||
virtual void HandleDLCInstalled();
|
||||
#ifdef _XBOX_ONE
|
||||
virtual void HandleDLCLicenseChange();
|
||||
#endif
|
||||
|
||||
void showNotOnlineDialog(int iPad);
|
||||
|
||||
static int UnlockSkinReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int RenableInput(LPVOID lpVoid, int, int);
|
||||
void AddFavoriteSkin(int iPad,int iSkinID);
|
||||
|
||||
void InputActionOK(unsigned int iPad);
|
||||
#ifdef __PSVITA__
|
||||
virtual void handleTouchInput(unsigned int iPad, S32 x, S32 y, int iId, bool bPressed, bool bRepeat, bool bReleased);
|
||||
#endif //__PSVITA__
|
||||
virtual void handleReload();
|
||||
|
||||
#ifdef __ORBIS__
|
||||
bool m_bErrorDialogRunning;
|
||||
#endif
|
||||
|
||||
#ifdef __PSVITA__
|
||||
CRITICAL_SECTION m_DLCInstallCS; // to prevent a race condition between the install and the mounted callback
|
||||
#endif
|
||||
};
|
||||
@@ -18,12 +18,12 @@ HRESULT CScene_SettingsControl::OnInit( XUIMessageInit* pInitData, BOOL& bHandle
|
||||
|
||||
// Display the tooltips
|
||||
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME].SetValue(app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame));
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME].SetValue(app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME].SetText(TempString);
|
||||
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU].SetValue(app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu));
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU].SetValue(app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),app.GetGameSettings(m_iPad,eGameSetting_Sensitivity));
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU].SetText(TempString);
|
||||
|
||||
// if we're not in the game, we need to use basescene 0
|
||||
@@ -65,13 +65,13 @@ HRESULT CScene_SettingsControl::OnNotifyValueChanged( HXUIOBJ hObjSource, XUINot
|
||||
|
||||
if(hObjSource==m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME].GetSlider() )
|
||||
{
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InGame,pNotifyValueChanged->nValue);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity,pNotifyValueChanged->nValue);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INGAME ),pNotifyValueChanged->nValue);
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INGAME].SetText(TempString);
|
||||
}
|
||||
else if(hObjSource==m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU].GetSlider() )
|
||||
{
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity_InMenu,pNotifyValueChanged->nValue);
|
||||
app.SetGameSettings(m_iPad,eGameSetting_Sensitivity,pNotifyValueChanged->nValue);
|
||||
swprintf( (WCHAR *)TempString, 256, L"%ls: %d%%", app.GetString( IDS_SLIDER_SENSITIVITY_INMENU ),pNotifyValueChanged->nValue);
|
||||
m_SliderA[SLIDER_SETTINGS_SENSITIVITY_INMENU].SetText(TempString);
|
||||
}
|
||||
|
||||
@@ -399,8 +399,8 @@ void C_4JProfile::Initialise( DWORD dwTitleID,
|
||||
|
||||
// Set some sane initial values!
|
||||
GAME_SETTINGS *pGameSettings = (GAME_SETTINGS *)profileData[i];
|
||||
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucInterfaceOpacity=80; //eGameSetting_Sensitivity_InMenu
|
||||
pGameSettings->ucSensitivity=100; //eGameSetting_Sensitivity
|
||||
pGameSettings->usBitmaskValues|=0x0200; //eGameSetting_DisplaySplitscreenGamertags - on
|
||||
pGameSettings->usBitmaskValues|=0x0400; //eGameSetting_Hints - on
|
||||
pGameSettings->usBitmaskValues|=0x1000; //eGameSetting_Autosave - 2
|
||||
|
||||
@@ -77,9 +77,9 @@ void Input::tick(LocalPlayer *player)
|
||||
float tx = 0.0f;
|
||||
float ty = 0.0f;
|
||||
if( pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LOOK_LEFT) || pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LOOK_RIGHT) )
|
||||
tx = InputManager.GetJoypadStick_RX(iPad)*(((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InGame))/100.0f); // apply sensitivity to look
|
||||
tx = InputManager.GetJoypadStick_RX(iPad)*(((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity))/100.0f); // apply sensitivity to look
|
||||
if( pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LOOK_UP) || pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_LOOK_DOWN) )
|
||||
ty = InputManager.GetJoypadStick_RY(iPad)*(((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity_InGame))/100.0f); // apply sensitivity to look
|
||||
ty = InputManager.GetJoypadStick_RY(iPad)*(((float)app.GetGameSettings(iPad,eGameSetting_Sensitivity))/100.0f); // apply sensitivity to look
|
||||
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
if (app.GetFreezePlayers()) tx = ty = 0.0f;
|
||||
|
||||
@@ -5429,12 +5429,8 @@ Would you like to unlock the full game now?</value>
|
||||
<value>Gamma</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SLIDER_SENSITIVITY_INGAME">
|
||||
<value>Game Sensitivity</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_SLIDER_SENSITIVITY_INMENU">
|
||||
<value>Interface Sensitivity</value>
|
||||
<data name="IDS_SLIDER_SENSITIVITY">
|
||||
<value>Sensitivity</value>
|
||||
</data>
|
||||
|
||||
<data name="IDS_DIFFICULTY_TITLE_PEACEFUL">
|
||||
|
||||
+1927
-1924
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user