2009-10-01 01:10:58 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
|
|
#include "usbloader/wbfs.h"
|
|
|
|
#include "language/gettext.h"
|
|
|
|
#include "libwiigui/gui.h"
|
|
|
|
#include "libwiigui/gui_customoptionbrowser.h"
|
|
|
|
#include "prompts/PromptWindows.h"
|
|
|
|
#include "prompts/DiscBrowser.h"
|
|
|
|
#include "settings/SettingsPrompts.h"
|
2010-09-24 23:22:01 +02:00
|
|
|
#include "settings/CGameSettings.h"
|
2010-09-25 10:51:44 +02:00
|
|
|
#include "settings/CGameStatistics.h"
|
2009-10-01 01:10:58 +02:00
|
|
|
#include "prompts/filebrowser.h"
|
|
|
|
#include "cheats/cheatmenu.h"
|
2010-09-24 19:58:56 +02:00
|
|
|
#include "themes/CTheme.h"
|
2009-10-01 01:10:58 +02:00
|
|
|
#include "fatmounter.h"
|
|
|
|
#include "menu.h"
|
2010-02-15 00:22:52 +01:00
|
|
|
#include "menu/menus.h"
|
2009-10-01 01:10:58 +02:00
|
|
|
#include "filelist.h"
|
2010-09-25 08:54:27 +02:00
|
|
|
#include "FileOperations/fileops.h"
|
2009-10-01 01:10:58 +02:00
|
|
|
#include "sys.h"
|
|
|
|
#include "cfg.h"
|
2009-11-15 22:30:44 +01:00
|
|
|
#include "usbloader/partition_usbloader.h"
|
2009-11-15 20:52:58 +01:00
|
|
|
#include "usbloader/utils.h"
|
2009-11-22 17:42:53 +01:00
|
|
|
#include "xml/xml.h"
|
2010-09-19 01:04:39 +02:00
|
|
|
#include "wad/nandtitle.h"
|
2010-09-19 12:53:24 +02:00
|
|
|
#include "prompts/TitleBrowser.h"
|
2009-10-01 01:10:58 +02:00
|
|
|
|
|
|
|
#define MAXOPTIONS 13
|
|
|
|
|
2010-01-19 11:48:50 +01:00
|
|
|
/*** Extern functions ***/
|
|
|
|
extern void ResumeGui();
|
|
|
|
extern void HaltGui();
|
2009-10-01 01:10:58 +02:00
|
|
|
extern void titles_default();
|
|
|
|
|
|
|
|
/*** Extern variables ***/
|
|
|
|
extern GuiWindow * mainWindow;
|
2010-02-15 00:22:52 +01:00
|
|
|
extern GuiBGM * bgMusic;
|
2009-10-01 01:10:58 +02:00
|
|
|
extern GuiImage * bgImg;
|
|
|
|
extern GuiImageData * pointer[4];
|
|
|
|
extern GuiImageData * background;
|
2010-01-19 11:48:50 +01:00
|
|
|
extern u8 shutdown;
|
|
|
|
extern u8 reset;
|
2009-10-01 11:17:55 +02:00
|
|
|
extern u8 mountMethod;
|
2009-10-01 01:10:58 +02:00
|
|
|
extern struct discHdr *dvdheader;
|
2009-11-15 20:52:58 +01:00
|
|
|
extern PartList partitions;
|
|
|
|
extern char game_partition[6];
|
2009-12-19 15:05:31 +01:00
|
|
|
extern u8 load_from_fs;
|
2009-10-25 00:03:12 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
static const char *opts_no_yes[settings_off_on_max] = { trNOOP( "No" ), trNOOP( "Yes" ) };
|
|
|
|
static const char *opts_off_on[settings_off_on_max] = { trNOOP( "OFF" ), trNOOP( "ON" ) };
|
|
|
|
static const char *opts_videomode[settings_language_max][2] = { { "", trNOOP( "Disc Default" ) }, {
|
|
|
|
trNOOP( "System Default" ), "" }, { trNOOP( "AutoPatch" ), "" }, { trNOOP( "Force" ), " PAL50" }, {
|
|
|
|
trNOOP( "Force" ), " PAL60" }, { trNOOP( "Force" ), " NTSC" } };
|
|
|
|
static const char *opts_language[settings_language_max] = { trNOOP( "Console Default" ), trNOOP( "Japanese" ),
|
|
|
|
trNOOP( "English" ), trNOOP( "German" ), trNOOP( "French" ), trNOOP( "Spanish" ), trNOOP( "Italian" ),
|
|
|
|
trNOOP( "Dutch" ), trNOOP( "SChinese" ), trNOOP( "TChinese" ), trNOOP( "Korean" ) };
|
2010-09-28 20:58:56 +02:00
|
|
|
static const char *opts_lockedgames[2] = { trNOOP( "0 (Locked and Unlocked Games)" ), trNOOP( "1 (Unlocked Games Only)" ) };
|
2010-09-24 02:48:03 +02:00
|
|
|
static const char *opts_parentalcontrol[5] = { trNOOP( "0 (Everyone)" ), trNOOP( "1 (Child 7+)" ),
|
|
|
|
trNOOP( "2 (Teen 12+)" ), trNOOP( "3 (Mature 16+)" ), trNOOP( "4 (Adults Only 18+)" ) };
|
|
|
|
static const char *opts_error002[3] = { trNOOP( "No" ), trNOOP( "Yes" ), trNOOP( "Anti" ) };
|
|
|
|
static const char *opts_partitions[settings_partitions_max] = { trNOOP( "Game partition" ), trNOOP( "All partitions" ),
|
|
|
|
trNOOP( "Remove update" ) };
|
|
|
|
static const char *opts_installdir[settings_installdir_max] = { trNOOP( "None" ), trNOOP( "GAMEID_Gamename" ),
|
|
|
|
trNOOP( "Gamename [GAMEID]" ) };
|
|
|
|
|
|
|
|
bool IsValidPartition(int fs_type, int cios)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (cios == 249 || cios == 250)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
return fs_type == FS_TYPE_WBFS;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return fs_type == FS_TYPE_WBFS || fs_type == FS_TYPE_FAT32 || fs_type == FS_TYPE_NTFS;
|
|
|
|
}
|
2010-05-29 09:38:54 +02:00
|
|
|
}
|
|
|
|
|
2009-10-01 01:10:58 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* MenuSettings
|
|
|
|
***************************************************************************/
|
2010-02-09 11:59:55 +01:00
|
|
|
int MenuSettings()
|
|
|
|
{
|
2010-09-19 01:16:05 +02:00
|
|
|
int menu = MENU_NONE;
|
|
|
|
int ret;
|
|
|
|
int choice = 0;
|
|
|
|
bool exit = false;
|
|
|
|
|
|
|
|
// backup game language setting
|
|
|
|
char opt_lang[100];
|
2010-09-24 02:48:03 +02:00
|
|
|
strcpy(opt_lang, Settings.language_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
// backup title override setting
|
|
|
|
int opt_override = Settings.titlesOverride;
|
|
|
|
// backup partition index
|
|
|
|
u8 settingspartitionold = Settings.partition;
|
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
FADE, LEFT, RIGHT
|
2010-09-19 01:16:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
int slidedirection = FADE;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
// because destroy GuiSound must wait while sound playing is finished, we use a global sound
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!btnClick2) btnClick2 = new GuiSound(button_click2_pcm, button_click2_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
// GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, Settings.sfxvolume);
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiSound btnClick1(button_click_pcm, button_click_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png"));
|
|
|
|
GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData MainButtonImgData(Resources::GetFile("settings_title.png"), Resources::GetFileSize("settings_title.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData MainButtonImgOverData(Resources::GetFile("settings_title_over.png"), Resources::GetFileSize("settings_title_over.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData PageindicatorImgData(Resources::GetFile("pageindicator.png"), Resources::GetFileSize("pageindicator.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData arrow_left(Resources::GetFile("startgame_arrow_left.png"), Resources::GetFileSize("startgame_arrow_left.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData arrow_right(Resources::GetFile("startgame_arrow_right.png"), Resources::GetFileSize("startgame_arrow_right.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData creditsImgData(Resources::GetFile("credits_button.png"), Resources::GetFileSize("credits_button.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData creditsOver(Resources::GetFile("credits_button_over.png"), Resources::GetFileSize("credits_button_over.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage creditsImg(&creditsImgData);
|
|
|
|
GuiImage creditsImgOver(&creditsOver);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
GuiTrigger trigA;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigHome;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigB;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigL;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigL.SetButtonOnlyTrigger(-1, WPAD_BUTTON_LEFT | WPAD_CLASSIC_BUTTON_LEFT, PAD_BUTTON_LEFT);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigR;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigR.SetButtonOnlyTrigger(-1, WPAD_BUTTON_RIGHT | WPAD_CLASSIC_BUTTON_RIGHT, PAD_BUTTON_RIGHT);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigMinus;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigMinus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS, 0);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigPlus;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigPlus.SetButtonOnlyTrigger(-1, WPAD_BUTTON_PLUS | WPAD_CLASSIC_BUTTON_PLUS, 0);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiText titleTxt(tr( "Settings" ), 28, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
titleTxt.SetPosition(0, 40);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage settingsbackground(&settingsbg);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 19:58:56 +02:00
|
|
|
GuiText backBtnTxt(tr( "Back" ), 22, Theme.prompttext);
|
2010-09-24 02:48:03 +02:00
|
|
|
backBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30);
|
|
|
|
GuiImage backBtnImg(&btnOutline);
|
|
|
|
if (Settings.wsprompt == yes)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
backBtnTxt.SetWidescreen(Settings.widescreen);
|
|
|
|
backBtnImg.SetWidescreen(Settings.widescreen);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiButton backBtn(&backBtnImg, &backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, btnClick2, 1);
|
|
|
|
backBtn.SetLabel(&backBtnTxt);
|
|
|
|
backBtn.SetTrigger(&trigB);
|
|
|
|
|
|
|
|
GuiButton homo(1, 1);
|
|
|
|
homo.SetTrigger(&trigHome);
|
|
|
|
|
|
|
|
GuiImage PageindicatorImg1(&PageindicatorImgData);
|
|
|
|
GuiText PageindicatorTxt1("1", 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
GuiButton PageIndicatorBtn1(PageindicatorImg1.GetWidth(), PageindicatorImg1.GetHeight());
|
|
|
|
PageIndicatorBtn1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
PageIndicatorBtn1.SetPosition(165, 400);
|
|
|
|
PageIndicatorBtn1.SetImage(&PageindicatorImg1);
|
|
|
|
PageIndicatorBtn1.SetLabel(&PageindicatorTxt1);
|
|
|
|
PageIndicatorBtn1.SetSoundOver(&btnSoundOver);
|
|
|
|
PageIndicatorBtn1.SetSoundClick(&btnClick1);
|
|
|
|
PageIndicatorBtn1.SetTrigger(&trigA);
|
2010-09-19 01:16:05 +02:00
|
|
|
PageIndicatorBtn1.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage PageindicatorImg2(&PageindicatorImgData);
|
|
|
|
GuiText PageindicatorTxt2("2", 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
GuiButton PageIndicatorBtn2(PageindicatorImg2.GetWidth(), PageindicatorImg2.GetHeight());
|
|
|
|
PageIndicatorBtn2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
PageIndicatorBtn2.SetPosition(200, 400);
|
|
|
|
PageIndicatorBtn2.SetImage(&PageindicatorImg2);
|
|
|
|
PageIndicatorBtn2.SetLabel(&PageindicatorTxt2);
|
|
|
|
PageIndicatorBtn2.SetSoundOver(&btnSoundOver);
|
|
|
|
PageIndicatorBtn2.SetSoundClick(&btnClick1);
|
|
|
|
PageIndicatorBtn2.SetTrigger(&trigA);
|
2010-09-19 01:16:05 +02:00
|
|
|
PageIndicatorBtn2.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage PageindicatorImg3(&PageindicatorImgData);
|
|
|
|
GuiText PageindicatorTxt3("3", 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
GuiButton PageIndicatorBtn3(PageindicatorImg3.GetWidth(), PageindicatorImg3.GetHeight());
|
|
|
|
PageIndicatorBtn3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
PageIndicatorBtn3.SetPosition(235, 400);
|
|
|
|
PageIndicatorBtn3.SetImage(&PageindicatorImg3);
|
|
|
|
PageIndicatorBtn3.SetLabel(&PageindicatorTxt3);
|
|
|
|
PageIndicatorBtn3.SetSoundOver(&btnSoundOver);
|
|
|
|
PageIndicatorBtn3.SetSoundClick(&btnClick1);
|
|
|
|
PageIndicatorBtn3.SetTrigger(&trigA);
|
2010-09-19 01:16:05 +02:00
|
|
|
PageIndicatorBtn3.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage GoLeftImg(&arrow_left);
|
|
|
|
GuiButton GoLeftBtn(GoLeftImg.GetWidth(), GoLeftImg.GetHeight());
|
|
|
|
GoLeftBtn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
|
|
|
GoLeftBtn.SetPosition(25, -25);
|
|
|
|
GoLeftBtn.SetImage(&GoLeftImg);
|
|
|
|
GoLeftBtn.SetSoundOver(&btnSoundOver);
|
|
|
|
GoLeftBtn.SetSoundClick(btnClick2);
|
2010-09-19 01:16:05 +02:00
|
|
|
GoLeftBtn.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
GoLeftBtn.SetTrigger(&trigA);
|
|
|
|
GoLeftBtn.SetTrigger(&trigL);
|
|
|
|
GoLeftBtn.SetTrigger(&trigMinus);
|
|
|
|
|
|
|
|
GuiImage GoRightImg(&arrow_right);
|
|
|
|
GuiButton GoRightBtn(GoRightImg.GetWidth(), GoRightImg.GetHeight());
|
|
|
|
GoRightBtn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
|
|
|
|
GoRightBtn.SetPosition(-25, -25);
|
|
|
|
GoRightBtn.SetImage(&GoRightImg);
|
|
|
|
GoRightBtn.SetSoundOver(&btnSoundOver);
|
|
|
|
GoRightBtn.SetSoundClick(btnClick2);
|
2010-09-19 01:16:05 +02:00
|
|
|
GoRightBtn.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
GoRightBtn.SetTrigger(&trigA);
|
|
|
|
GoRightBtn.SetTrigger(&trigR);
|
|
|
|
GoRightBtn.SetTrigger(&trigPlus);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
char MainButtonText[50];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", " ");
|
|
|
|
|
|
|
|
GuiImage MainButton1Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton1ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton1Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton1Txt.SetMaxWidth(MainButton1Img.GetWidth());
|
|
|
|
GuiButton MainButton1(MainButton1Img.GetWidth(), MainButton1Img.GetHeight());
|
|
|
|
MainButton1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton1.SetPosition(0, 90);
|
|
|
|
MainButton1.SetImage(&MainButton1Img);
|
|
|
|
MainButton1.SetImageOver(&MainButton1ImgOver);
|
|
|
|
MainButton1.SetLabel(&MainButton1Txt);
|
|
|
|
MainButton1.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton1.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton1.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton2Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton2ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton2Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton2Txt.SetMaxWidth(MainButton2Img.GetWidth());
|
|
|
|
GuiButton MainButton2(MainButton2Img.GetWidth(), MainButton2Img.GetHeight());
|
|
|
|
MainButton2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton2.SetPosition(0, 160);
|
|
|
|
MainButton2.SetImage(&MainButton2Img);
|
|
|
|
MainButton2.SetImageOver(&MainButton2ImgOver);
|
|
|
|
MainButton2.SetLabel(&MainButton2Txt);
|
|
|
|
MainButton2.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton2.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton2.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton2.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton3Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton3ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton3Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton3Txt.SetMaxWidth(MainButton3Img.GetWidth());
|
|
|
|
GuiButton MainButton3(MainButton3Img.GetWidth(), MainButton3Img.GetHeight());
|
|
|
|
MainButton3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton3.SetPosition(0, 230);
|
|
|
|
MainButton3.SetImage(&MainButton3Img);
|
|
|
|
MainButton3.SetImageOver(&MainButton3ImgOver);
|
|
|
|
MainButton3.SetLabel(&MainButton3Txt);
|
|
|
|
MainButton3.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton3.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton3.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton3.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton4Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton4ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton4Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton4Txt.SetMaxWidth(MainButton4Img.GetWidth());
|
|
|
|
GuiButton MainButton4(MainButton4Img.GetWidth(), MainButton4Img.GetHeight());
|
|
|
|
MainButton4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton4.SetPosition(0, 300);
|
|
|
|
MainButton4.SetImage(&MainButton4Img);
|
|
|
|
MainButton4.SetImageOver(&MainButton4ImgOver);
|
|
|
|
MainButton4.SetLabel(&MainButton4Txt);
|
|
|
|
MainButton4.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton4.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton4.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton4.SetTrigger(&trigA);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
customOptionList options2(MAXOPTIONS);
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, "bg_options_settings.png", 0, 150);
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetPosition(0, 90);
|
|
|
|
optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiWindow w(screenwidth, screenheight);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
int pageToDisplay = 1;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (pageToDisplay > 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
menu = MENU_NONE;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
/** Standard procedure made in all pages **/
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "GUI Settings" ));
|
|
|
|
MainButton1Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Game Load" ));
|
|
|
|
MainButton2Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Parental Control" ));
|
|
|
|
MainButton3Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Sound" ));
|
|
|
|
MainButton4Txt.SetText(MainButtonText);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
w.RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&settingsbackground);
|
|
|
|
w.Append(&PageIndicatorBtn1);
|
|
|
|
w.Append(&PageIndicatorBtn2);
|
|
|
|
w.Append(&PageIndicatorBtn3);
|
|
|
|
w.Append(&titleTxt);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&homo);
|
|
|
|
w.Append(&GoRightBtn);
|
|
|
|
w.Append(&GoLeftBtn);
|
|
|
|
w.Append(&MainButton1);
|
|
|
|
w.Append(&MainButton2);
|
|
|
|
w.Append(&MainButton3);
|
|
|
|
w.Append(&MainButton4);
|
|
|
|
|
|
|
|
PageIndicatorBtn1.SetAlpha(255);
|
|
|
|
PageIndicatorBtn2.SetAlpha(50);
|
|
|
|
PageIndicatorBtn3.SetAlpha(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Creditsbutton change **/
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton4.SetImage(&MainButton4Img);
|
|
|
|
MainButton4.SetImageOver(&MainButton4ImgOver);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Disable ability to click through MainButtons */
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetClickable(false);
|
2010-09-19 01:16:05 +02:00
|
|
|
/** Default no scrollbar and reset position **/
|
2010-09-24 02:48:03 +02:00
|
|
|
// optionBrowser2.SetScrollbar(0);
|
|
|
|
optionBrowser2.SetOffset(0);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
|
|
|
MainButton1.SetEffectGrow();
|
|
|
|
MainButton2.SetEffectGrow();
|
|
|
|
MainButton3.SetEffectGrow();
|
|
|
|
MainButton4.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == FADE)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (pageToDisplay == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
/** Standard procedure made in all pages **/
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Custom Paths" ));
|
|
|
|
MainButton1Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Update" ));
|
|
|
|
MainButton2Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Default Settings" ));
|
|
|
|
MainButton3Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Credits" ));
|
|
|
|
MainButton4Txt.SetText(MainButtonText);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
w.RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&settingsbackground);
|
|
|
|
w.Append(&PageIndicatorBtn1);
|
|
|
|
w.Append(&PageIndicatorBtn2);
|
|
|
|
w.Append(&PageIndicatorBtn3);
|
|
|
|
w.Append(&titleTxt);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&homo);
|
|
|
|
w.Append(&GoRightBtn);
|
|
|
|
w.Append(&GoLeftBtn);
|
|
|
|
w.Append(&MainButton1);
|
|
|
|
w.Append(&MainButton2);
|
|
|
|
w.Append(&MainButton3);
|
|
|
|
w.Append(&MainButton4);
|
|
|
|
|
|
|
|
PageIndicatorBtn1.SetAlpha(50);
|
|
|
|
PageIndicatorBtn2.SetAlpha(255);
|
|
|
|
PageIndicatorBtn3.SetAlpha(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Creditsbutton change **/
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton4.SetImage(&creditsImg);
|
|
|
|
MainButton4.SetImageOver(&creditsImgOver);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Disable ability to click through MainButtons */
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetClickable(false);
|
2010-09-19 01:16:05 +02:00
|
|
|
/** Default no scrollbar and reset position **/
|
2010-09-24 02:48:03 +02:00
|
|
|
// optionBrowser2.SetScrollbar(0);
|
|
|
|
optionBrowser2.SetOffset(0);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
|
|
|
MainButton1.SetEffectGrow();
|
|
|
|
MainButton2.SetEffectGrow();
|
|
|
|
MainButton3.SetEffectGrow();
|
|
|
|
MainButton4.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == FADE)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (pageToDisplay == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
/** Standard procedure made in all pages **/
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 35);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Theme Downloader" ));
|
|
|
|
MainButton1Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( " " ));
|
|
|
|
MainButton2Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( " " ));
|
|
|
|
MainButton3Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( " " ));
|
|
|
|
MainButton4Txt.SetText(MainButtonText);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
w.RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&settingsbackground);
|
|
|
|
w.Append(&PageIndicatorBtn1);
|
|
|
|
w.Append(&PageIndicatorBtn2);
|
|
|
|
w.Append(&PageIndicatorBtn3);
|
|
|
|
w.Append(&titleTxt);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&homo);
|
|
|
|
w.Append(&GoRightBtn);
|
|
|
|
w.Append(&GoLeftBtn);
|
|
|
|
w.Append(&MainButton1);
|
|
|
|
|
|
|
|
PageIndicatorBtn1.SetAlpha(50);
|
|
|
|
PageIndicatorBtn2.SetAlpha(50);
|
|
|
|
PageIndicatorBtn3.SetAlpha(255);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Disable ability to click through MainButtons */
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetClickable(false);
|
2010-09-19 01:16:05 +02:00
|
|
|
/** Default no scrollbar and reset position **/
|
2010-09-24 02:48:03 +02:00
|
|
|
// optionBrowser2.SetScrollbar(0);
|
|
|
|
optionBrowser2.SetOffset(0);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
|
|
|
MainButton1.SetEffectGrow();
|
|
|
|
MainButton2.SetEffectGrow();
|
|
|
|
MainButton3.SetEffectGrow();
|
|
|
|
MainButton4.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (slidedirection == FADE)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == LEFT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (slidedirection == RIGHT)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton2.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
|
|
|
MainButton4.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_IN, 35);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (menu == MENU_NONE)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1) Sys_Reboot();
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (MainButton1.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
titleTxt.SetText(tr( "GUI Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
// optionBrowser2.SetScrollbar(1);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
int returnhere = 1;
|
|
|
|
char * languagefile;
|
2010-09-24 02:48:03 +02:00
|
|
|
languagefile = strrchr(Settings.language_path, '/') + 1;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
returnhere = 1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_Reboot();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (menu == MENU_DISCLIST)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
WindowCredits();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
int Idx = -1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "App Language" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
mainWindow->Remove(&w);
|
|
|
|
while (returnhere == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
returnhere = MenuLanguageSelect();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (returnhere == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
menu = MENU_SETTINGS;
|
|
|
|
pageToDisplay = 0;
|
|
|
|
exit = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
|
|
|
w.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "Language change:" ),
|
|
|
|
tr( "Console should be unlocked to modify it." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to use this option." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!strcmp("notset", Settings.language_path))
|
|
|
|
options2.SetValue(Idx, "%s", tr( "Default" ));
|
|
|
|
else options2.SetValue(Idx, "%s", languagefile);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Display" ));
|
|
|
|
if (ret == Idx && ++Settings.sinfo >= settings_sinfo_max) Settings.sinfo = 0;
|
|
|
|
static const char *opts[settings_sinfo_max] = { trNOOP( "Game ID" ),
|
|
|
|
trNOOP( "Game Region" ), trNOOP( "Both" ), trNOOP( "Neither" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.sinfo] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Clock" ));
|
|
|
|
if (ret == Idx && ++Settings.hddinfo >= settings_clock_max) Settings.hddinfo = 0; //CLOCK
|
|
|
|
if (Settings.hddinfo == hr12)
|
|
|
|
options2.SetValue(Idx, "12 %s", tr( "Hour" ));
|
|
|
|
else if (Settings.hddinfo == hr24)
|
|
|
|
options2.SetValue(Idx, "24 %s", tr( "Hour" ));
|
|
|
|
else if (Settings.hddinfo == Off) options2.SetValue(Idx, "%s", tr( "OFF" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Tooltips" ));
|
|
|
|
if (ret == Idx && ++Settings.tooltips >= settings_tooltips_max) Settings.tooltips = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.tooltips] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Flip-X" ));
|
|
|
|
if (ret == Idx && ++Settings.xflip >= settings_xflip_max) Settings.xflip = 0;
|
|
|
|
static const char *opts[settings_xflip_max][3] =
|
|
|
|
{ { trNOOP( "Right" ), "/", trNOOP( "Next" ) }, { trNOOP( "Left" ), "/",
|
|
|
|
trNOOP( "Prev" ) }, { trNOOP( "Like SysMenu" ), "", "" }, {
|
|
|
|
trNOOP( "Right" ), "/", trNOOP( "Prev" ) }, { trNOOP( "DiskFlip" ),
|
|
|
|
"", "" } };
|
|
|
|
options2.SetValue(Idx, "%s%s%s", tr( opts[Settings.xflip][0] ),
|
|
|
|
opts[Settings.xflip][1], tr( opts[Settings.xflip][2] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Prompts Buttons" ));
|
|
|
|
if (ret == Idx && ++Settings.wsprompt >= settings_off_on_max) Settings.wsprompt = 0;
|
|
|
|
static const char *opts[settings_off_on_max] = { trNOOP( "Normal" ),
|
|
|
|
trNOOP( "Widescreen Fix" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.wsprompt] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Keyboard" ));
|
|
|
|
if (ret == Idx && ++Settings.keyset >= settings_keyset_max) Settings.keyset = 0;
|
|
|
|
static const char *opts[settings_keyset_max] = { "QWERTY", "QWERTY 2", "DVORAK",
|
|
|
|
"QWERTZ", "AZERTY" };
|
|
|
|
options2.SetValue(Idx, "%s", opts[Settings.keyset]);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Disc Artwork Download" ));
|
|
|
|
if (ret == Idx && ++Settings.discart >= 4) Settings.discart = 0;
|
|
|
|
static const char *opts[4] = { trNOOP( "Only Original" ), trNOOP( "Only Customs" ),
|
|
|
|
trNOOP( "Original/Customs" ), trNOOP( "Customs/Original" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.discart] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Wiilight" ));
|
|
|
|
if (ret == Idx && ++Settings.wiilight >= settings_wiilight_max) Settings.wiilight = 0;
|
|
|
|
static const char *opts[settings_wiilight_max] = { trNOOP( "OFF" ), trNOOP( "ON" ),
|
|
|
|
trNOOP( "Only for Install" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.wiilight] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Rumble" ));
|
|
|
|
if (ret == Idx && ++Settings.rumble >= settings_rumble_max) Settings.rumble = 0; //RUMBLE
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.rumble] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "AutoInit Network" ));
|
|
|
|
if (ret == Idx && ++Settings.autonetwork >= settings_off_on_max) Settings.autonetwork
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.autonetwork] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "BETA revisions" ));
|
|
|
|
if (ret == Idx && ++Settings.beta_upgrades >= settings_off_on_max) Settings.beta_upgrades
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.beta_upgrades] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Titles from WiiTDB" ));
|
|
|
|
if (ret == Idx && ++Settings.titlesOverride >= settings_off_on_max) Settings.titlesOverride
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.titlesOverride] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Screensaver" ));
|
|
|
|
if (ret == Idx && ++Settings.screensaver >= settings_screensaver_max) Settings.screensaver
|
|
|
|
= 0; //RUMBLE
|
|
|
|
static const char *opts[settings_screensaver_max] = { trNOOP( "OFF" ),
|
|
|
|
trNOOP( "3 min" ), trNOOP( "5 min" ), trNOOP( "10 min" ), trNOOP( "20 min" ),
|
|
|
|
trNOOP( "30 min" ), trNOOP( "1 hour" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.screensaver] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Mark new games" ));
|
|
|
|
if (ret == Idx && ++Settings.marknewtitles >= settings_off_on_max) Settings.marknewtitles
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.marknewtitles] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
titleTxt.SetText(tr( "Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (returnhere != 2) pageToDisplay = 1;
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton1.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton2.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
titleTxt.SetText(tr( "Game Load" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_Reboot();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3) Sys_LoadMenu(); // Back to System Menu
|
|
|
|
if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
int Idx = -1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Video Mode" ));
|
|
|
|
if (ret == Idx && ++Settings.videomode >= settings_video_max) Settings.videomode = 0;
|
|
|
|
options2.SetValue(Idx, "%s%s", opts_videomode[Settings.videomode][0],
|
|
|
|
tr( opts_videomode[Settings.videomode][1] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "VIDTV Patch" ));
|
|
|
|
if (ret == Idx && ++Settings.videopatch >= settings_off_on_max) Settings.videopatch = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.videopatch] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Game Language" ));
|
|
|
|
if (ret == Idx && ++Settings.language >= settings_language_max) Settings.language = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_language[Settings.language] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Patch Country Strings" ));
|
|
|
|
if (ret == Idx && ++Settings.patchcountrystrings >= settings_off_on_max) Settings.patchcountrystrings
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.patchcountrystrings] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "Ocarina");
|
|
|
|
if (ret == Idx && ++Settings.ocarina >= settings_off_on_max) Settings.ocarina = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[Settings.ocarina] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Boot/Standard" ));
|
|
|
|
if (ret == Idx && Settings.godmode == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
switch (Settings.cios)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
case 222:
|
|
|
|
Settings.cios = 223;
|
|
|
|
break;
|
|
|
|
case 223:
|
|
|
|
Settings.cios = 224;
|
|
|
|
break;
|
|
|
|
case 224:
|
|
|
|
Settings.cios = 249;
|
|
|
|
break;
|
|
|
|
case 249:
|
|
|
|
Settings.cios = 250;
|
|
|
|
break;
|
|
|
|
case 250:
|
|
|
|
Settings.cios = 222;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
Settings.cios = 222;
|
|
|
|
break;
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 15:46:32 +02:00
|
|
|
if ((Settings.cios == 222 && NandTitles.VersionOf(0x1000000deULL) != 4)
|
|
|
|
|| (Settings.cios == 2 && NandTitles.VersionOf(0x1000000dfULL) != 4))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(
|
|
|
|
tr( "Hermes CIOS" ),
|
|
|
|
tr( "USB Loader GX will only run with Hermes CIOS rev 4! Please make sure you have revision 4 installed!" ),
|
|
|
|
tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode == 1)
|
|
|
|
options2.SetValue(Idx, "IOS %i", Settings.cios);
|
|
|
|
else options2.SetValue(Idx, "********");
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Partition" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
// Select the next valid partition, even if that's the same one
|
|
|
|
do
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
Settings.partition = Settings.partition + 1 == partitions.num ? 0
|
|
|
|
: Settings.partition + 1;
|
|
|
|
} while (!IsValidPartition(partitions.pinfo[Settings.partition].fs_type,
|
|
|
|
Settings.cios));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
PartInfo pInfo = partitions.pinfo[Settings.partition];
|
2010-09-24 02:48:03 +02:00
|
|
|
f32 partition_size = partitions.pentry[Settings.partition].size
|
|
|
|
* (partitions.sector_size / GB_SIZE);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
// Get the partition name and it's size in GB's
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s%d (%.2fGB)", pInfo.fs_type == FS_TYPE_FAT32 ? "FAT"
|
|
|
|
: pInfo.fs_type == FS_TYPE_NTFS ? "NTFS" : "WBFS", pInfo.index, partition_size);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "FAT: Use directories" ));
|
|
|
|
if (ret == Idx && ++Settings.FatInstallToDir >= settings_installdir_max) Settings.FatInstallToDir
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_installdir[Settings.FatInstallToDir] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Quick Boot" ));
|
|
|
|
if (ret == Idx && ++Settings.quickboot >= settings_off_on_max) Settings.quickboot = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_no_yes[Settings.quickboot] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Error 002 fix" ));
|
|
|
|
if (ret == Idx && ++Settings.error002 >= 3) Settings.error002 = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_error002[Settings.error002] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Install partitions" ));
|
|
|
|
if (ret == Idx && ++Settings.partitions_to_install >= settings_partitions_max) Settings.partitions_to_install
|
|
|
|
= 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_partitions[Settings.partitions_to_install] ));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ret == ++Idx || firstRun)
|
|
|
|
{
|
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Install 1:1 Copy" ));
|
|
|
|
if (ret == Idx)
|
|
|
|
{
|
|
|
|
Settings.fullcopy = Settings.fullcopy == 0 ? 1 : 0;
|
|
|
|
}
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_no_yes[Settings.fullcopy] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
|
|
|
{
|
|
|
|
char* name = NULL;
|
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Return To" ));
|
|
|
|
if (ret == Idx)
|
|
|
|
{
|
|
|
|
char tidChar[10];
|
|
|
|
bool getChannel = TitleSelector(tidChar);
|
|
|
|
if (getChannel)
|
|
|
|
{
|
|
|
|
snprintf(Settings.returnTo, sizeof(Settings.returnTo), "%s", tidChar);
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 15:46:32 +02:00
|
|
|
int haveTitle = NandTitles.FindU32(Settings.returnTo);
|
2010-09-24 02:48:03 +02:00
|
|
|
if (haveTitle >= 0)
|
|
|
|
{
|
2010-09-24 15:46:32 +02:00
|
|
|
name = (char*) NandTitles.NameFromIndex(haveTitle);
|
2010-10-01 02:26:16 +02:00
|
|
|
if( name && !strlen(name) ) name = NULL;
|
2010-09-24 02:48:03 +02:00
|
|
|
}
|
|
|
|
options2.SetValue(Idx, "%s", name ? name : tr( opts_off_on[ 0 ] ));
|
|
|
|
}
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
titleTxt.SetText(tr( "Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 1;
|
|
|
|
MainButton2.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton3.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton3.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
titleTxt.SetText(tr( "Parental Control" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_Reboot();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
int Idx = -1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Console" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!strcmp("", Settings.unlockCode) && Settings.Parental.enabled == 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.godmode = !Settings.godmode;
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (Settings.godmode == 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char entered[20];
|
2010-09-24 02:48:03 +02:00
|
|
|
memset(entered, 0, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
//password check to unlock Install,Delete and Format
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
|
|
|
int result = Settings.Parental.enabled == 0 ? OnScreenKeyboard(entered, 20, 0)
|
|
|
|
: OnScreenNumpad(entered, 5);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!strcmp(entered, Settings.unlockCode) || !memcmp(entered,
|
|
|
|
Settings.Parental.pin, 4)) //if password correct
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode == 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(
|
|
|
|
tr( "Correct Password" ),
|
|
|
|
tr( "All the features of USB Loader GX are unlocked." ),
|
|
|
|
tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
Settings.godmode = 1;
|
|
|
|
menu = MENU_DISCLIST;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "Wrong Password" ),
|
|
|
|
tr( "USB Loader GX is protected" ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice = WindowPrompt(tr( "Lock Console" ), tr( "Are you sure?" ),
|
|
|
|
tr( "Yes" ), tr( "No" ));
|
|
|
|
if (choice == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "Console Locked" ), tr( "USB Loader GX is protected" ),
|
|
|
|
tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
Settings.godmode = 0;
|
|
|
|
menu = MENU_DISCLIST;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
static const char *opts[] = { trNOOP( "Locked" ), trNOOP( "Unlocked" ) };
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts[Settings.godmode] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Password" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[20] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.unlockCode, sizeof(entered));
|
|
|
|
int result = OnScreenKeyboard(entered, 20, 0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(Settings.unlockCode, entered, sizeof(Settings.unlockCode));
|
|
|
|
WindowPrompt(tr( "Password Changed" ), tr( "Password has been changed" ),
|
|
|
|
tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "Password Changed" ),
|
|
|
|
tr( "Console should be unlocked to modify it." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode != 1)
|
|
|
|
options2.SetValue(Idx, "********");
|
|
|
|
else if (!strcmp("", Settings.unlockCode))
|
|
|
|
options2.SetValue(Idx, "%s", tr( "not set" ));
|
|
|
|
else options2.SetValue(Idx, Settings.unlockCode);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Controllevel" ));
|
|
|
|
if (ret == Idx && Settings.godmode == 1 && ++Settings.parentalcontrol >= 5) Settings.parentalcontrol
|
|
|
|
= 0;
|
|
|
|
if (Settings.godmode == 1)
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_parentalcontrol[Settings.parentalcontrol] ));
|
|
|
|
else options2.SetValue(Idx, "********");
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-28 20:58:56 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
|
|
|
{
|
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "GamesLevel" ));
|
|
|
|
if (ret == Idx && Settings.godmode == 1 && ++Settings.lockedgames >= 2) Settings.lockedgames
|
|
|
|
= 0;
|
|
|
|
if (Settings.godmode == 1)
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_lockedgames[Settings.lockedgames] ));
|
|
|
|
else options2.SetValue(Idx, "********");
|
|
|
|
}
|
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
titleTxt.SetText(tr( "Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 1;
|
|
|
|
MainButton3.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton4.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton4.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
titleTxt.SetText(tr( "Sound" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool returnhere = true;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_Reboot();
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
int Idx = -1;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Backgroundmusic" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
mainWindow->Remove(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
returnhere = MenuBackgroundMusic();
|
|
|
|
|
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
|
|
|
w.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to use this option." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
char * filename = strrchr(Settings.ogg_path, '/');
|
|
|
|
if (filename)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
filename += 1;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", filename);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else options2.SetValue(Idx, "%s", tr( "Standard" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Music Volume" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.volume += 10;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.volume > 100) Settings.volume = 0;
|
|
|
|
bgMusic->SetVolume(Settings.volume);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.volume > 0)
|
|
|
|
options2.SetValue(Idx, "%i", Settings.volume);
|
|
|
|
else options2.SetValue(Idx, "%s", tr( "OFF" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "SFX Volume" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.sfxvolume += 10;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.sfxvolume > 100) Settings.sfxvolume = 0;
|
|
|
|
btnSoundOver.SetVolume(Settings.sfxvolume);
|
|
|
|
btnClick2->SetVolume(Settings.sfxvolume);
|
|
|
|
btnClick1.SetVolume(Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.sfxvolume > 0)
|
|
|
|
options2.SetValue(Idx, "%i", Settings.sfxvolume);
|
|
|
|
else options2.SetValue(Idx, "%s", tr( "OFF" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Game Sound Mode" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.gamesound++;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.gamesound > 2) Settings.gamesound = 0;
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.gamesound == 1)
|
|
|
|
options2.SetValue(Idx, "%s", tr( "Sound+BGM" ));
|
|
|
|
else if (Settings.gamesound == 2)
|
|
|
|
options2.SetValue(Idx, "%s", tr( "Loop Sound" ));
|
|
|
|
else options2.SetValue(Idx, "%s", tr( "Sound+Quiet" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Game Sound Volume" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.gamesoundvolume += 10;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.gamesoundvolume > 100) Settings.gamesoundvolume = 0;
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.gamesoundvolume > 0)
|
|
|
|
options2.SetValue(Idx, "%i", Settings.gamesoundvolume);
|
|
|
|
else options2.SetValue(Idx, "%s", tr( "OFF" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Music Loop Mode" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
Settings.musicloopmode++;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.musicloopmode > 3) Settings.musicloopmode = 0;
|
|
|
|
bgMusic->SetLoop(Settings.musicloopmode);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.musicloopmode == ONCE)
|
|
|
|
options2.SetValue(Idx, tr( "Play Once" ));
|
|
|
|
else if (Settings.musicloopmode == LOOP)
|
|
|
|
options2.SetValue(Idx, tr( "Loop Music" ));
|
|
|
|
else if (Settings.musicloopmode == DIR_LOOP)
|
|
|
|
options2.SetValue(Idx, tr( "Loop Directory" ));
|
|
|
|
else if (Settings.musicloopmode == RANDOM_BGM) options2.SetValue(Idx,
|
|
|
|
tr( "Random Directory Music" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Reset BG Music" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int result =
|
|
|
|
WindowPrompt(tr( "Reset to standard BGM?" ), 0, tr( "Yes" ), tr( "No" ));
|
|
|
|
if (result)
|
2010-02-15 00:22:52 +01:00
|
|
|
{
|
|
|
|
bgMusic->LoadStandard();
|
|
|
|
bgMusic->Play();
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", tr( "Standard" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, tr( " " ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
titleTxt.SetText(tr( "Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 1;
|
|
|
|
MainButton4.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (pageToDisplay == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (MainButton1.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
// optionBrowser2.SetScrollbar(1);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.godmode)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_Reboot();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
int Idx = -1;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "3D Cover Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.covers_path, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "3D Cover Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.covers_path, entered, sizeof(Settings.covers_path));
|
|
|
|
WindowPrompt(tr( "Cover Path Changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.covers_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "2D Cover Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.covers2d_path, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "2D Cover Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.covers2d_path, entered, sizeof(Settings.covers2d_path));
|
|
|
|
WindowPrompt(tr( "Cover Path Changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.covers2d_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Disc Artwork Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.disc_path, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "Disc Artwork Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.disc_path, entered, sizeof(Settings.disc_path));
|
|
|
|
WindowPrompt(tr( "Disc Path Changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-02-15 00:22:52 +01:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.disc_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Theme Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
titleTxt.SetText(tr( "Theme Path" ));
|
|
|
|
strlcpy(entered, Settings.theme_path, sizeof(entered));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
|
|
|
w.RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.theme_path, entered, sizeof(Settings.theme_path));
|
|
|
|
WindowPrompt(tr( "Theme Path Changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice))
|
|
|
|
WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
|
|
|
else Settings.Save();
|
|
|
|
mainWindow->Remove(bgImg);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 19:58:56 +02:00
|
|
|
Theme.Load(Settings.theme_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
menu = MENU_SETTINGS;
|
2010-09-26 10:33:43 +02:00
|
|
|
if(pointer[0]) delete pointer[0];
|
|
|
|
if(pointer[1]) delete pointer[1];
|
|
|
|
if(pointer[2]) delete pointer[2];
|
|
|
|
if(pointer[3]) delete pointer[3];
|
|
|
|
pointer[0] = Resources::GetImageData("player1_point.png");
|
|
|
|
pointer[1] = Resources::GetImageData("player2_point.png");
|
|
|
|
pointer[2] = Resources::GetImageData("player3_point.png");
|
|
|
|
pointer[3] = Resources::GetImageData("player4_point.png");
|
|
|
|
if(background) delete background;
|
|
|
|
background = Resources::GetImageData(Settings.widescreen ? "wbackground.png" : "background.png");
|
|
|
|
if(bgImg) delete bgImg;
|
2010-09-24 02:48:03 +02:00
|
|
|
bgImg = new GuiImage(background);
|
|
|
|
mainWindow->Append(bgImg);
|
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&settingsbackground);
|
|
|
|
w.Append(&titleTxt);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&optionBrowser2);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.theme_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "WiiTDB Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
titleTxt.SetText(tr( "WiiTDB Path" ));
|
|
|
|
strlcpy(entered, Settings.titlestxt_path, sizeof(entered));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path));
|
|
|
|
WindowPrompt(tr( "WiiTDB Path changed." ), 0, tr( "OK" ));
|
|
|
|
if (isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Load();
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.titlestxt_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Update Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.update_path, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "Update Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.update_path, entered, sizeof(Settings.update_path));
|
|
|
|
WindowPrompt(tr( "Update Path changed." ), 0, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.update_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "GCT Cheatcodes Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.Cheatcodespath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "GCT Cheatcodes Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.Cheatcodespath, entered, sizeof(Settings.Cheatcodespath));
|
|
|
|
WindowPrompt(tr( "GCT Cheatcodes Path changed" ), 0, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.Cheatcodespath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "TXT Cheatcodes Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.TxtCheatcodespath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "TXT Cheatcodes Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.TxtCheatcodespath, entered,
|
|
|
|
sizeof(Settings.TxtCheatcodespath));
|
|
|
|
WindowPrompt(tr( "TXT Cheatcodes Path changed" ), 0, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.TxtCheatcodespath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "DOL Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.dolpath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "DOL Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.dolpath, entered, sizeof(Settings.dolpath));
|
|
|
|
WindowPrompt(tr( "DOL path changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.dolpath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Homebrew Apps Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.homebrewapps_path, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "Homebrew Apps Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.homebrewapps_path, entered,
|
|
|
|
sizeof(Settings.homebrewapps_path));
|
|
|
|
WindowPrompt(tr( "Homebrew Appspath changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.homebrewapps_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Theme Download Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.theme_downloadpath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "Theme Download Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.theme_downloadpath, entered,
|
|
|
|
sizeof(Settings.theme_downloadpath));
|
|
|
|
WindowPrompt(tr( "Theme Download Path changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.theme_downloadpath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "BCA Codes Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.BcaCodepath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "BCA Codes Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.BcaCodepath, entered, sizeof(Settings.BcaCodepath));
|
|
|
|
WindowPrompt(tr( "BCA Codes Path changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.BcaCodepath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "WIP Patches Path" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
char entered[100] = "";
|
2010-09-24 02:48:03 +02:00
|
|
|
strlcpy(entered, Settings.WipCodepath, sizeof(entered));
|
|
|
|
titleTxt.SetText(tr( "WIP Patches Path" ));
|
|
|
|
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
|
|
|
|
titleTxt.SetText(tr( "Custom Paths" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int len = (strlen(entered) - 1);
|
|
|
|
if (entered[len] != '/') strncat(entered, "/", 1);
|
|
|
|
strlcpy(Settings.WipCodepath, entered, sizeof(Settings.WipCodepath));
|
|
|
|
WindowPrompt(tr( "WIP Patches Path changed" ), 0, tr( "OK" ));
|
|
|
|
if (!isInserted(bootDevice)) WindowPrompt(tr( "No SD-Card inserted!" ),
|
|
|
|
tr( "Insert an SD-Card to save." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", Settings.WipCodepath);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/** If not godmode don't let him inside **/
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "Console Locked" ), tr( "Unlock console to use this option." ), tr( "OK" ));
|
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
titleTxt.SetText(tr( "Settings" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
MainButton1.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton2.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
if (isInserted(bootDevice) && Settings.godmode)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
int ret = ProgressUpdateWindow();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret < 0) WindowPrompt(tr( "Update failed" ), 0, tr( "OK" ));
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "Console Locked" ), tr( "Unlock console to use this option." ), tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
MainButton2.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton3.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton3.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
|
|
|
w.Remove(&backBtn);
|
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
if (Settings.godmode)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice = WindowPrompt(tr( "Are you sure?" ), 0, tr( "Yes" ), tr( "Cancel" ));
|
|
|
|
if (choice == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
gettextCleanUp();
|
|
|
|
HaltGui();
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Reset();
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
menu = MENU_SETTINGS;
|
|
|
|
pageToDisplay = 0;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else WindowPrompt(tr( "Console Locked" ), tr( "Unlock console to use this option." ), tr( "OK" ));
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&optionBrowser2);
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
MainButton3.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton4.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton4.GetEffect() > 0)
|
|
|
|
usleep(50);
|
|
|
|
w.Remove(&PageIndicatorBtn1);
|
|
|
|
w.Remove(&PageIndicatorBtn2);
|
|
|
|
w.Remove(&PageIndicatorBtn3);
|
|
|
|
w.Remove(&GoRightBtn);
|
|
|
|
w.Remove(&GoLeftBtn);
|
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
2010-09-19 01:16:05 +02:00
|
|
|
WindowCredits();
|
|
|
|
slidedirection = FADE;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
MainButton4.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (pageToDisplay == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (MainButton1.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (isInserted(bootDevice)) Settings.Save();
|
2010-09-19 01:16:05 +02:00
|
|
|
menu = MENU_THEMEDOWNLOADER;
|
|
|
|
pageToDisplay = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
//Add the procedure call to save the global configuration
|
2010-09-24 02:48:03 +02:00
|
|
|
if (isInserted(bootDevice)) Settings.Save();
|
2010-09-19 01:16:05 +02:00
|
|
|
menu = MENU_DISCLIST;
|
|
|
|
pageToDisplay = 0;
|
|
|
|
backBtn.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (GoLeftBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
pageToDisplay--;
|
|
|
|
/** Change direction of the flying buttons **/
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay < 1) pageToDisplay = 3;
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = LEFT;
|
|
|
|
GoLeftBtn.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (GoRightBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
pageToDisplay++;
|
|
|
|
/** Change direction of the flying buttons **/
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay > 3) pageToDisplay = 1;
|
2010-09-19 01:16:05 +02:00
|
|
|
slidedirection = RIGHT;
|
|
|
|
GoRightBtn.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (PageIndicatorBtn1.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay > 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
slidedirection = LEFT;
|
|
|
|
pageToDisplay = 1;
|
|
|
|
PageIndicatorBtn1.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
PageIndicatorBtn1.ResetState();
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (PageIndicatorBtn2.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay < 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
slidedirection = RIGHT;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
PageIndicatorBtn2.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (pageToDisplay > 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
slidedirection = LEFT;
|
|
|
|
pageToDisplay = 2;
|
|
|
|
PageIndicatorBtn2.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else PageIndicatorBtn2.ResetState();
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (PageIndicatorBtn3.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (pageToDisplay < 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
slidedirection = RIGHT;
|
|
|
|
pageToDisplay = 3;
|
|
|
|
PageIndicatorBtn3.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else PageIndicatorBtn3.ResetState();
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
w.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
// if partition has changed, Reinitialize it
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.partition != settingspartitionold)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
PartInfo pinfo = partitions.pinfo[Settings.partition];
|
|
|
|
partitionEntry pentry = partitions.pentry[Settings.partition];
|
2010-09-24 02:48:03 +02:00
|
|
|
WBFS_OpenPart(pinfo.part_fs, pinfo.index, pentry.sector, pentry.size, (char *) &game_partition);
|
2010-09-19 01:16:05 +02:00
|
|
|
load_from_fs = pinfo.part_fs;
|
|
|
|
}
|
|
|
|
|
|
|
|
// if language has changed, reload titles
|
|
|
|
char opt_langnew[100];
|
2010-09-24 02:48:03 +02:00
|
|
|
strcpy(opt_langnew, Settings.language_path);
|
2010-09-19 01:16:05 +02:00
|
|
|
int opt_overridenew = Settings.titlesOverride;
|
|
|
|
bool reloaddatabasefile = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (strcmp(opt_lang, opt_langnew) || (opt_override != opt_overridenew && Settings.titlesOverride == 1)
|
|
|
|
|| (Settings.partition != settingspartitionold))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (Settings.partition != settingspartitionold)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
reloaddatabasefile = true;
|
|
|
|
CloseXMLDatabase();
|
|
|
|
CFG_Cleanup();
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
OpenXMLDatabase(Settings.titlestxt_path, Settings.db_language, Settings.db_JPtoEN, reloaddatabasefile,
|
|
|
|
Settings.titlesOverride == 1 ? true : false, true); // open file, reload titles, keep in memory
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
// disable titles from database if setting has changed
|
2010-09-24 02:48:03 +02:00
|
|
|
if (opt_override != opt_overridenew && Settings.titlesOverride == 0) titles_default();
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(bgImg);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
return menu;
|
|
|
|
}
|
2010-05-29 09:38:54 +02:00
|
|
|
|
2009-10-01 01:10:58 +02:00
|
|
|
/********************************************************************************
|
2010-09-24 02:48:03 +02:00
|
|
|
*Game specific settings
|
|
|
|
*********************************************************************************/
|
2010-09-24 23:22:01 +02:00
|
|
|
int MenuGameSettings(struct discHdr * header)
|
2010-02-09 11:59:55 +01:00
|
|
|
{
|
2010-09-19 01:16:05 +02:00
|
|
|
int menu = MENU_NONE;
|
|
|
|
int ret;
|
|
|
|
int choice = 0;
|
|
|
|
bool exit = false;
|
|
|
|
|
|
|
|
int retVal = 0;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
// because destroy GuiSound must wait while sound playing is finished, we use a global sound
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!btnClick2) btnClick2 = new GuiSound(button_click2_pcm, button_click2_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
// GuiSound btnClick(button_click2_pcm, button_click2_pcm_size, Settings.sfxvolume);
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiSound btnClick1(button_click_pcm, button_click_pcm_size, Settings.sfxvolume);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData btnOutline(Resources::GetFile("button_dialogue_box.png"), Resources::GetFileSize("button_dialogue_box.png"));
|
|
|
|
GuiImageData settingsbg(Resources::GetFile("settings_background.png"), Resources::GetFileSize("settings_background.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData MainButtonImgData(Resources::GetFile("settings_title.png"), Resources::GetFileSize("settings_title.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiImageData MainButtonImgOverData(Resources::GetFile("settings_title_over.png"), Resources::GetFileSize("settings_title_over.png"));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
GuiTrigger trigA;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigHome;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
|
2010-09-19 01:16:05 +02:00
|
|
|
GuiTrigger trigB;
|
2010-09-24 02:48:03 +02:00
|
|
|
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
char gameName[31];
|
2010-09-24 02:48:03 +02:00
|
|
|
if (!mountMethod)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (strlen(get_title(header)) < (27 + 3))
|
|
|
|
sprintf(gameName, "%s", get_title(header));
|
2010-09-19 01:16:05 +02:00
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
strncpy(gameName, get_title(header), 27);
|
2010-09-19 01:16:05 +02:00
|
|
|
gameName[27] = '\0';
|
2010-09-24 02:48:03 +02:00
|
|
|
strncat(gameName, "...", 3);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else sprintf(gameName, "%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2], header->id[3], header->id[4],
|
|
|
|
header->id[5]);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiText titleTxt(!mountMethod ? get_title(header) : gameName, 28, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
titleTxt.SetPosition(12, 40);
|
|
|
|
titleTxt.SetMaxWidth(356, SCROLL_HORIZONTAL);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiImage settingsbackground(&settingsbg);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 19:58:56 +02:00
|
|
|
GuiText backBtnTxt(tr( "Back" ), 22, Theme.prompttext);
|
2010-09-24 02:48:03 +02:00
|
|
|
backBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30);
|
|
|
|
GuiImage backBtnImg(&btnOutline);
|
|
|
|
if (Settings.wsprompt == yes)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
backBtnTxt.SetWidescreen(Settings.widescreen);
|
|
|
|
backBtnImg.SetWidescreen(Settings.widescreen);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiButton backBtn(&backBtnImg, &backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, btnClick2, 1);
|
|
|
|
backBtn.SetLabel(&backBtnTxt);
|
|
|
|
backBtn.SetTrigger(&trigB);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiButton homo(1, 1);
|
|
|
|
homo.SetTrigger(&trigHome);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 19:58:56 +02:00
|
|
|
GuiText saveBtnTxt(tr( "Save" ), 22, Theme.prompttext);
|
2010-09-24 02:48:03 +02:00
|
|
|
saveBtnTxt.SetMaxWidth(btnOutline.GetWidth() - 30);
|
|
|
|
GuiImage saveBtnImg(&btnOutline);
|
|
|
|
if (Settings.wsprompt == yes)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
saveBtnTxt.SetWidescreen(Settings.widescreen);
|
|
|
|
saveBtnImg.SetWidescreen(Settings.widescreen);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiButton saveBtn(&saveBtnImg, &saveBtnImg, 2, 3, 180, 400, &trigA, &btnSoundOver, btnClick2, 1);
|
|
|
|
saveBtn.SetLabel(&saveBtnTxt);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
char MainButtonText[50];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", " ");
|
|
|
|
|
|
|
|
GuiImage MainButton1Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton1ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton1Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton1Txt.SetMaxWidth(MainButton1Img.GetWidth());
|
|
|
|
GuiButton MainButton1(MainButton1Img.GetWidth(), MainButton1Img.GetHeight());
|
|
|
|
MainButton1.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton1.SetPosition(0, 90);
|
|
|
|
MainButton1.SetImage(&MainButton1Img);
|
|
|
|
MainButton1.SetImageOver(&MainButton1ImgOver);
|
|
|
|
MainButton1.SetLabel(&MainButton1Txt);
|
|
|
|
MainButton1.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton1.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton1.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton2Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton2ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton2Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton2Txt.SetMaxWidth(MainButton2Img.GetWidth());
|
|
|
|
GuiButton MainButton2(MainButton2Img.GetWidth(), MainButton2Img.GetHeight());
|
|
|
|
MainButton2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton2.SetPosition(0, 160);
|
|
|
|
MainButton2.SetImage(&MainButton2Img);
|
|
|
|
MainButton2.SetImageOver(&MainButton2ImgOver);
|
|
|
|
MainButton2.SetLabel(&MainButton2Txt);
|
|
|
|
MainButton2.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton2.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton2.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton2.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton3Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton3ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton3Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton3Txt.SetMaxWidth(MainButton3Img.GetWidth());
|
|
|
|
GuiButton MainButton3(MainButton3Img.GetWidth(), MainButton3Img.GetHeight());
|
|
|
|
MainButton3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton3.SetPosition(0, 230);
|
|
|
|
MainButton3.SetImage(&MainButton3Img);
|
|
|
|
MainButton3.SetImageOver(&MainButton3ImgOver);
|
|
|
|
MainButton3.SetLabel(&MainButton3Txt);
|
|
|
|
MainButton3.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton3.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton3.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton3.SetTrigger(&trigA);
|
|
|
|
|
|
|
|
GuiImage MainButton4Img(&MainButtonImgData);
|
|
|
|
GuiImage MainButton4ImgOver(&MainButtonImgOverData);
|
|
|
|
GuiText MainButton4Txt(MainButtonText, 22, ( GXColor )
|
|
|
|
{ 0, 0, 0, 255});
|
|
|
|
MainButton4Txt.SetMaxWidth(MainButton4Img.GetWidth());
|
|
|
|
GuiButton MainButton4(MainButton4Img.GetWidth(), MainButton4Img.GetHeight());
|
|
|
|
MainButton4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
|
|
|
MainButton4.SetPosition(0, 300);
|
|
|
|
MainButton4.SetImage(&MainButton4Img);
|
|
|
|
MainButton4.SetImageOver(&MainButton4ImgOver);
|
|
|
|
MainButton4.SetLabel(&MainButton4Txt);
|
|
|
|
MainButton4.SetSoundOver(&btnSoundOver);
|
|
|
|
MainButton4.SetSoundClick(&btnClick1);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton4.SetEffectGrow();
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton4.SetTrigger(&trigA);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
customOptionList options2(MAXOPTIONS);
|
2010-09-26 10:33:43 +02:00
|
|
|
GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, "bg_options_settings.png", 0, 150);
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetPosition(0, 90);
|
|
|
|
optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
GuiWindow w(screenwidth, screenheight);
|
2010-09-24 23:22:01 +02:00
|
|
|
|
|
|
|
GameCFG game_cfg;
|
|
|
|
|
|
|
|
GameCFG* existCFG = GameSettings.GetGameCFG(header->id);
|
|
|
|
|
|
|
|
if (existCFG)
|
|
|
|
{
|
|
|
|
memcpy(&game_cfg, existCFG, sizeof(GameCFG));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
snprintf(game_cfg.id, sizeof(game_cfg.id), "%s", (char *) header->id);
|
|
|
|
game_cfg.video = Settings.videomode;
|
|
|
|
game_cfg.language = Settings.language;
|
|
|
|
game_cfg.ocarina = Settings.ocarina;
|
|
|
|
game_cfg.vipatch = Settings.videopatch;
|
|
|
|
game_cfg.ios = Settings.cios;
|
|
|
|
game_cfg.parentalcontrol = 0;
|
|
|
|
game_cfg.errorfix002 = Settings.error002;
|
|
|
|
game_cfg.patchcountrystrings = Settings.patchcountrystrings;
|
|
|
|
game_cfg.loadalternatedol = off;
|
|
|
|
game_cfg.alternatedolstart = 0;
|
|
|
|
game_cfg.iosreloadblock = off;
|
|
|
|
strcpy(game_cfg.alternatedolname, "");
|
|
|
|
game_cfg.returnTo = 1;
|
|
|
|
}
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
int pageToDisplay = 1;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (pageToDisplay > 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
menu = MENU_NONE;
|
|
|
|
|
|
|
|
/** Standard procedure made in all pages **/
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Game Load" ));
|
|
|
|
MainButton1Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "Ocarina");
|
|
|
|
MainButton2Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Uninstall Menu" ));
|
|
|
|
MainButton3Txt.SetText(MainButtonText);
|
|
|
|
snprintf(MainButtonText, sizeof(MainButtonText), "%s", tr( "Default Gamesettings" ));
|
|
|
|
MainButton4Txt.SetText(MainButtonText);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
w.RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&settingsbackground);
|
|
|
|
w.Append(&titleTxt);
|
|
|
|
w.Append(&backBtn);
|
|
|
|
w.Append(&homo);
|
|
|
|
w.Append(&MainButton1);
|
|
|
|
w.Append(&MainButton2);
|
|
|
|
w.Append(&MainButton3);
|
|
|
|
w.Append(&MainButton4);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/** Disable ability to click through MainButtons */
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetClickable(false);
|
2010-09-19 01:16:05 +02:00
|
|
|
/** Default no scrollbar and reset position **/
|
2010-09-24 02:48:03 +02:00
|
|
|
// optionBrowser2.SetScrollbar(0);
|
|
|
|
optionBrowser2.SetOffset(0);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
MainButton1.StopEffect();
|
|
|
|
MainButton2.StopEffect();
|
|
|
|
MainButton3.StopEffect();
|
|
|
|
MainButton4.StopEffect();
|
|
|
|
|
|
|
|
MainButton1.SetEffectGrow();
|
|
|
|
MainButton2.SetEffectGrow();
|
|
|
|
MainButton3.SetEffectGrow();
|
|
|
|
MainButton4.SetEffectGrow();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, 20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, 20);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(&w);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (menu == MENU_NONE)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1) Sys_Reboot();
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (MainButton1.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&saveBtn);
|
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton1.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
int returnhere = 1;
|
|
|
|
char * languagefile;
|
2010-09-24 02:48:03 +02:00
|
|
|
languagefile = strrchr(Settings.language_path, '/') + 1;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
bool firstRun = true;
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
returnhere = 1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1) Sys_Reboot();
|
|
|
|
if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (menu == MENU_DISCLIST)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&optionBrowser2);
|
|
|
|
w.Remove(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
WindowCredits();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
w.Append(&backBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (saveBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 10:51:44 +02:00
|
|
|
if (GameSettings.AddGame(game_cfg) && GameSettings.Save())
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
WindowPrompt(tr( "Successfully Saved" ), 0, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 23:22:01 +02:00
|
|
|
else
|
|
|
|
WindowPrompt(tr( "Save Failed. No device inserted?" ), 0, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
saveBtn.ResetState();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetFocus(1);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret >= 0 || firstRun == true)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
int Idx = -1;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Video Mode" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.video >= settings_video_max) game_cfg.video = 0;
|
|
|
|
options2.SetValue(Idx, "%s%s", opts_videomode[game_cfg.video][0],
|
|
|
|
tr( opts_videomode[game_cfg.video][1] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "VIDTV Patch" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.vipatch >= settings_off_on_max) game_cfg.vipatch = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[game_cfg.vipatch] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Game Language" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.language >= settings_language_max) game_cfg.language = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_language[game_cfg.language] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "Ocarina");
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.ocarina >= settings_off_on_max) game_cfg.ocarina = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[game_cfg.ocarina] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "IOS");
|
|
|
|
if (ret == Idx)
|
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
switch (game_cfg.ios)
|
2010-09-24 02:48:03 +02:00
|
|
|
{
|
|
|
|
case 222:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 223;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
case 223:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 224;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
case 224:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 249;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
case 249:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 250;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
case 250:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 222;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
default:
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.ios = 222;
|
2010-09-24 02:48:03 +02:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 23:22:01 +02:00
|
|
|
options2.SetValue(Idx, "IOS %i", game_cfg.ios);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Parental Control" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.parentalcontrol >= 5) game_cfg.parentalcontrol = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_parentalcontrol[game_cfg.parentalcontrol] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
|
|
|
{
|
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Error 002 fix" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.errorfix002 >= 3) game_cfg.errorfix002 = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_error002[game_cfg.errorfix002] ));
|
2010-09-24 02:48:03 +02:00
|
|
|
}
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
|
|
|
{
|
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Return To" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.returnTo >= settings_off_on_max) game_cfg.returnTo = 0;
|
2010-09-19 12:53:24 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
char text[IMET_MAX_NAME_LEN];
|
2010-09-24 15:46:32 +02:00
|
|
|
int channel = NandTitles.FindU32(Settings.returnTo);//is the channel set in the global settings actually installed?
|
2010-09-19 12:53:24 +02:00
|
|
|
|
2010-09-24 23:22:01 +02:00
|
|
|
if (!game_cfg.returnTo || channel < 0)//channel is not installed or the uer wants to not use it
|
2010-09-24 02:48:03 +02:00
|
|
|
sprintf(text, "%s", tr( opts_off_on[ 0 ] ));
|
2010-09-19 12:53:24 +02:00
|
|
|
|
2010-09-24 15:46:32 +02:00
|
|
|
else snprintf(text, sizeof(text), "%s", NandTitles.NameFromIndex(channel));
|
2010-09-19 12:53:24 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetValue(Idx, "%s", text);
|
|
|
|
}
|
2010-09-19 12:53:24 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Patch Country Strings" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.patchcountrystrings >= settings_off_on_max) game_cfg.patchcountrystrings = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[game_cfg.patchcountrystrings] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Alternate DOL" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
int last_alternatedol = game_cfg.loadalternatedol;
|
|
|
|
if (ret == Idx && (game_cfg.loadalternatedol = (game_cfg.loadalternatedol + 2) % 3) >= 3) // 0->2->1->0
|
|
|
|
game_cfg.loadalternatedol = 0;
|
2010-09-24 02:48:03 +02:00
|
|
|
static const char *opts[] = { trNOOP( "Default" ), trNOOP( "Load From SD/USB" ),
|
|
|
|
trNOOP( "Select a DOL" ) };
|
2010-09-24 23:22:01 +02:00
|
|
|
options2.SetValue(Idx, "%s", tr( opts[game_cfg.loadalternatedol] ));
|
2010-09-24 02:48:03 +02:00
|
|
|
if (last_alternatedol != 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
firstRun = true; // force re-init follow Entries
|
|
|
|
options2.SetLength(Idx + 1);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 23:22:01 +02:00
|
|
|
if (game_cfg.loadalternatedol == 2 && (ret == ++Idx || firstRun))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Selected DOL" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
if (game_cfg.loadalternatedol == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char filename[10];
|
2010-09-24 23:22:01 +02:00
|
|
|
snprintf(filename, 7, "%s", (char *) header->id);
|
2010-09-19 01:16:05 +02:00
|
|
|
int dolchoice = 0;
|
|
|
|
//alt dol menu for games that require more than a single alt dol
|
2010-09-24 02:48:03 +02:00
|
|
|
int autodol = autoSelectDolMenu(filename, false);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (autodol > 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.alternatedolstart = autodol;
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(alternatedname, sizeof(alternatedname), "%s <%i>", tr( "AUTO" ),
|
|
|
|
autodol);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (autodol == 0)
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.loadalternatedol = 0; // default was chosen
|
2010-09-19 01:16:05 +02:00
|
|
|
else
|
|
|
|
{
|
|
|
|
//check to see if we already know the offset of the correct dol
|
2010-09-24 02:48:03 +02:00
|
|
|
int autodol = autoSelectDol(filename, false);
|
2010-09-19 01:16:05 +02:00
|
|
|
//if we do know that offset ask if they want to use it
|
2010-09-24 02:48:03 +02:00
|
|
|
if (autodol > 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
dolchoice
|
|
|
|
= WindowPrompt(
|
|
|
|
0,
|
|
|
|
tr( "Do you want to use the alternate DOL that is known to be correct?" ),
|
|
|
|
tr( "Yes" ), tr( "Pick from a list" ), tr( "Cancel" ));
|
|
|
|
if (dolchoice == 0)
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.loadalternatedol = 0;
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (dolchoice == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.alternatedolstart = autodol;
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(alternatedname, sizeof(alternatedname), "%s <%i>",
|
|
|
|
tr( "AUTO" ), autodol);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (dolchoice == 2) //they want to search for the correct dol themselves
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int res = DiscBrowse(header);
|
|
|
|
if ((res >= 0) && (res != 696969)) //if res==696969 they pressed the back button
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.alternatedolstart = res;
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int res = DiscBrowse(header);
|
|
|
|
if ((res >= 0) && (res != 696969))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.alternatedolstart = res;
|
2010-09-19 01:16:05 +02:00
|
|
|
char tmp[170];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(
|
|
|
|
tmp,
|
|
|
|
sizeof(tmp),
|
|
|
|
"%s %s - %i",
|
|
|
|
tr( "It seems that you have some information that will be helpful to us. Please pass this information along to the DEV team." ),
|
2010-09-24 23:22:01 +02:00
|
|
|
filename, game_cfg.alternatedolstart);
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(0, tmp, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 23:22:01 +02:00
|
|
|
if (game_cfg.loadalternatedol == 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
firstRun = true; // force re-init follow Entries
|
|
|
|
options2.SetLength(Idx--); // remove this Entry
|
|
|
|
options2.SetValue(Idx, "%s", tr( "Default" )); // re-set prev Entry
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else options2.SetValue(Idx, alternatedname);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Block IOS Reload" ));
|
2010-09-24 23:22:01 +02:00
|
|
|
if (ret == Idx && ++game_cfg.iosreloadblock >= settings_off_on_max) game_cfg.iosreloadblock = 0;
|
|
|
|
options2.SetValue(Idx, "%s", tr( opts_off_on[game_cfg.iosreloadblock] ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton1.ResetState();
|
|
|
|
break;
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&saveBtn);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton2.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char ID[7];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(ID, sizeof(ID), "%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2], header->id[3],
|
|
|
|
header->id[4], header->id[5]);
|
|
|
|
CheatMenu(ID);
|
2010-09-19 01:16:05 +02:00
|
|
|
MainButton2.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton3.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
MainButton1.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton3.SetEffect(EFFECT_FADE, -20);
|
|
|
|
MainButton4.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (MainButton3.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
HaltGui();
|
2010-09-24 02:48:03 +02:00
|
|
|
w.Remove(&MainButton1);
|
|
|
|
w.Remove(&MainButton2);
|
|
|
|
w.Remove(&MainButton3);
|
|
|
|
w.Remove(&MainButton4);
|
2010-09-19 01:16:05 +02:00
|
|
|
exit = false;
|
2010-09-24 02:48:03 +02:00
|
|
|
options2.SetLength(0);
|
|
|
|
w.Append(&optionBrowser2);
|
|
|
|
optionBrowser2.SetClickable(true);
|
2010-09-19 01:16:05 +02:00
|
|
|
ResumeGui();
|
|
|
|
|
|
|
|
bool firstRun = true;
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, 20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
while (!exit)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
usleep(100);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (shutdown == 1) Sys_Shutdown();
|
|
|
|
if (reset == 1) Sys_Reboot();
|
|
|
|
if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
backBtn.ResetState();
|
|
|
|
exit = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ret = optionBrowser2.GetClickedOption();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun || ret >= 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
int Idx = -1;
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Uninstall Game" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Do you really want to delete:" ), gameName,
|
|
|
|
tr( "Yes" ), tr( "Cancel" ));
|
|
|
|
if (choice1 == 1 && !mountMethod)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
GameSettings.Remove(header->id);
|
2010-09-24 23:43:46 +02:00
|
|
|
GameSettings.Save();
|
2010-09-25 10:51:44 +02:00
|
|
|
GameStatistics.Remove(header->id);
|
|
|
|
GameStatistics.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
ret = WBFS_RemoveGame(header->id);
|
|
|
|
if (ret < 0)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "Can't delete:" ), gameName, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
WindowPrompt(tr( "Successfully deleted:" ), gameName, tr( "OK" ));
|
2010-09-19 01:16:05 +02:00
|
|
|
retVal = 1;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice1 == 0) optionBrowser2.SetFocus(1);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Reset Playcounter" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int result = WindowPrompt(tr( "Are you sure?" ), 0, tr( "Yes" ), tr( "Cancel" ));
|
|
|
|
if (result == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (isInserted(bootDevice))
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 10:51:44 +02:00
|
|
|
GameStatistics.SetPlayCount(header->id, 0);
|
|
|
|
GameStatistics.Save();
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Delete Cover Artwork" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char tmp[200];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s%c%c%c%c%c%c.png", Settings.covers_path, header->id[0],
|
|
|
|
header->id[1], header->id[2], header->id[3], header->id[4], header->id[5]);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Delete" ), tmp, tr( "Yes" ), tr( "No" ));
|
|
|
|
if (choice1 == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 08:54:27 +02:00
|
|
|
if (CheckFile(tmp)) remove(tmp);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Delete Disc Artwork" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char tmp[200];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s%c%c%c%c%c%c.png", Settings.disc_path, header->id[0],
|
|
|
|
header->id[1], header->id[2], header->id[3], header->id[4], header->id[5]);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Delete" ), tmp, tr( "Yes" ), tr( "No" ));
|
|
|
|
if (choice1 == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 08:54:27 +02:00
|
|
|
if (CheckFile(tmp)) remove(tmp);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Delete Cheat TXT" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char tmp[200];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s%c%c%c%c%c%c.txt", Settings.TxtCheatcodespath,
|
|
|
|
header->id[0], header->id[1], header->id[2], header->id[3], header->id[4],
|
|
|
|
header->id[5]);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Delete" ), tmp, tr( "Yes" ), tr( "No" ));
|
|
|
|
if (choice1 == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 08:54:27 +02:00
|
|
|
if (CheckFile(tmp)) remove(tmp);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (ret == ++Idx || firstRun)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
if (firstRun) options2.SetName(Idx, "%s", tr( "Delete Cheat GCT" ));
|
|
|
|
if (ret == Idx)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
char tmp[200];
|
2010-09-24 02:48:03 +02:00
|
|
|
snprintf(tmp, sizeof(tmp), "%s%c%c%c%c%c%c.gct", Settings.Cheatcodespath,
|
|
|
|
header->id[0], header->id[1], header->id[2], header->id[3], header->id[4],
|
|
|
|
header->id[5]);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Delete" ), tmp, tr( "Yes" ), tr( "No" ));
|
|
|
|
if (choice1 == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-25 08:54:27 +02:00
|
|
|
if (CheckFile(tmp)) remove(tmp);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
firstRun = false;
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (optionBrowser2.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
pageToDisplay = 1;
|
|
|
|
MainButton3.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (MainButton4.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
int choice1 = WindowPrompt(tr( "Are you sure?" ), 0, tr( "Yes" ), tr( "Cancel" ));
|
|
|
|
if (choice1 == 1)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-24 23:22:01 +02:00
|
|
|
game_cfg.video = Settings.videomode;
|
|
|
|
game_cfg.vipatch = Settings.videopatch;
|
|
|
|
game_cfg.language = Settings.language;
|
|
|
|
game_cfg.ocarina = Settings.ocarina;
|
|
|
|
game_cfg.errorfix002 = Settings.error002;
|
|
|
|
game_cfg.patchcountrystrings = Settings.patchcountrystrings;
|
|
|
|
game_cfg.loadalternatedol = off;
|
|
|
|
game_cfg.alternatedolstart = 0;
|
|
|
|
game_cfg.iosreloadblock = off;
|
|
|
|
game_cfg.ios = Settings.cios;
|
|
|
|
game_cfg.parentalcontrol = 0;
|
|
|
|
strcpy(game_cfg.alternatedolname, "");
|
|
|
|
game_cfg.returnTo = 1;
|
|
|
|
GameSettings.Remove(header->id);
|
2010-09-24 23:43:46 +02:00
|
|
|
GameSettings.Save();
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
pageToDisplay = 1;
|
|
|
|
MainButton4.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (backBtn.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
|
|
|
menu = MENU_DISCLIST;
|
|
|
|
pageToDisplay = 0;
|
|
|
|
backBtn.ResetState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (homo.GetState() == STATE_CLICKED)
|
2010-09-19 01:16:05 +02:00
|
|
|
{
|
2010-09-19 22:25:12 +02:00
|
|
|
Settings.Save();
|
2010-09-24 02:48:03 +02:00
|
|
|
optionBrowser2.SetState(STATE_DISABLED);
|
2010-09-19 01:16:05 +02:00
|
|
|
bgMusic->Pause();
|
|
|
|
choice = WindowExitPrompt();
|
|
|
|
bgMusic->Resume();
|
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
if (choice == 3)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_LoadMenu(); // Back to System Menu
|
2010-09-24 02:48:03 +02:00
|
|
|
else if (choice == 2)
|
2010-09-19 01:16:05 +02:00
|
|
|
Sys_BackToLoader();
|
2010-09-24 02:48:03 +02:00
|
|
|
else homo.ResetState();
|
|
|
|
optionBrowser2.SetState(STATE_DEFAULT);
|
2010-09-19 01:16:05 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-09-24 02:48:03 +02:00
|
|
|
w.SetEffect(EFFECT_FADE, -20);
|
|
|
|
while (w.GetEffect() > 0)
|
|
|
|
usleep(50);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
HaltGui();
|
|
|
|
|
|
|
|
mainWindow->RemoveAll();
|
2010-09-24 02:48:03 +02:00
|
|
|
mainWindow->Append(bgImg);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
ResumeGui();
|
|
|
|
return retVal;
|
2009-10-01 01:10:58 +02:00
|
|
|
}
|