CustomPathsSM::CustomPathsSM()
	: SettingsMenu(tr("Custom Paths"), &GuiOptions, MENU_NONE)
{
	int Idx = 0;
	Options->SetName(Idx++, tr("3D Cover Path"));
	Options->SetName(Idx++, tr("2D Cover Path"));
	Options->SetName(Idx++, tr("Full Cover Path"));
	Options->SetName(Idx++, tr("Disc Artwork Path"));
	Options->SetName(Idx++, tr("Theme Path"));
	Options->SetName(Idx++, tr("Titles Path"));
	Options->SetName(Idx++, tr("Update Path"));
	Options->SetName(Idx++, tr("GCT Cheatcodes Path"));
	Options->SetName(Idx++, tr("TXT Cheatcodes Path"));
	Options->SetName(Idx++, tr("DOL Path"));
	Options->SetName(Idx++, tr("Homebrew Apps Path"));
	Options->SetName(Idx++, tr("BCA Codes Path"));
	Options->SetName(Idx++, tr("WIP Patches Path"));
	Options->SetName(Idx++, tr("Languagefiles Path"));
	Options->SetName(Idx++, tr("WDM Files Path"));
	Options->SetName(Idx++, tr("Wiinnertag Path"));
	Options->SetName(Idx++, tr("Nand Emu Path"));
	Options->SetName(Idx++, tr("Nand Emu Channel Path"));
	Options->SetName(Idx++, tr("Main GameCube Path"));
	Options->SetName(Idx++, tr("SD GameCube Path"));
	Options->SetName(Idx++, tr("Devolution Loader Path"));
	Options->SetName(Idx++, tr("Nintendont Loader Path"));
	Options->SetName(Idx++, tr("Cache BNR Files Path"));

	SetOptionValues();
}
void ImageSettingsMenu::SetupOptions()
{
	int i = 0;

	options.SetName(i++, tr("Slideshow Delay"));
	options.SetName(i++, tr("Screenshot Format"));
	options.SetName(i++, tr("Fade Speed"));

	SetOptionValues();
}
Ejemplo n.º 3
0
void NFSSettingsMenu::SetupOptions()
{
	int i = 0;

	options.SetName(i++, tr("Share:"));
	options.SetName(i++, tr("Host:"));
	options.SetName(i++, tr("Mountpoint:"));
	options.SetName(i++, tr("Reconnect NFS"));
	options.SetName(i++, tr("Disconnect NFS"));

	SetOptionValues();
}
UpdateSettingsMenu::UpdateSettingsMenu()
    : SettingsMenu(tr("Update Settings"), &GuiOptions, MENU_NONE)
{
    int Idx = 0;
    Options->SetName(Idx++, "%s", tr( "Auto Update" ));
    Options->SetName(Idx++, "%s", tr( "Meta Update" ));
    Options->SetName(Idx++, "%s", tr( "Icon Update" ));
    Options->SetName(Idx++, "%s", tr( "WiiTDB Update" ));
    Options->SetName(Idx++, "%s", tr( "Update" ));
    
	SetOptionValues();
}
void SoundSettingsMenu::SetupOptions()
{
	int i = 0;

	options.SetName(i++, tr("Music Volume"));
	options.SetName(i++, tr("Music Loop Mode"));
	options.SetName(i++, tr("Resample to 48 kHz"));
	options.SetName(i++, tr("Load Music to Memory"));
	options.SetName(i++, tr("Soundblocks"));
	options.SetName(i++, tr("Soundblock Size"));

	SetOptionValues();
}
SoundSettingsMenu::SoundSettingsMenu()
    : SettingsMenu(tr("Audio Settings"), &GuiOptions, MENU_NONE)
{
    int Idx = 0;
    Options->SetName(Idx++, "%s", tr( "Music Volume" ));
    Options->SetName(Idx++, "%s", tr( "Credits Volume" ));
    Options->SetName(Idx++, "%s", tr( "SFX Volume" ));
    Options->SetName(Idx++, "%s", tr( "BgMusic Path" ));
    Options->SetName(Idx++, "%s", tr( "BgMusic Loop" ));
    Options->SetName(Idx++, "%s", tr( "Reset BgMusic" ));
    
	SetOptionValues();
}
Ejemplo n.º 7
0
CustomPathsSM::CustomPathsSM()
	: SettingsMenu(tr("Custom Paths"), &GuiOptions, MENU_NONE)
{
	int Idx = 0;
	
	Options->SetName(Idx++, tr("Saves Path"));
	Options->SetName(Idx++, tr("Data.bin Path"));
	Options->SetName(Idx++, tr("Miis Path"));
	Options->SetName(Idx++, tr("Update Path"));
	Options->SetName(Idx++, tr("Homebrew Path"));
	Options->SetName(Idx++, tr("GameTDB Path"));
	Options->SetName(Idx++, tr("Screenshot Path"));
	if(!Settings.Sneek) Options->SetName(Idx++, tr("Emu Nand Path"));
	
	SetOptionValues();
}
void FTPClientSettingsMenu::SetupOptions()
{
	int i = 0;

	options.SetName(i++, tr("Client:"));
	options.SetName(i++, tr("Host:"));
	options.SetName(i++, tr("Username:"******"Password:"******"FTP Port:"));
	options.SetName(i++, tr("FTP Path:"));
	options.SetName(i++, tr("Passive Mode:"));
	options.SetName(i++, tr("Reconnect FTP"));
	options.SetName(i++, tr("Disconnect Client"));

	SetOptionValues();
}
void GeneralSettingsMenu::SetupOptions()
{
	int i = 0;

	options.SetName(i++, tr("Language"));
	options.SetName(i++, tr("Clock Mode"));
	options.SetName(i++, tr("PDF Processing Zoom"));
	options.SetName(i++, tr("Keyboard Delete Delay"));
	options.SetName(i++, tr("Rumble"));
	options.SetName(i++, tr("Scrolling Speed"));
	options.SetName(i++, tr("Tooltip Delay"));
	options.SetName(i++, tr("Zip Compression Mode"));
	options.SetName(i++, tr("Copy Thread Priority"));
	options.SetName(i++, tr("Copy Thread Background Priority"));
	options.SetName(i++, tr("Show Partition Formatter"));
	options.SetName(i++, tr("Use Both USB Ports"));
	options.SetName(i++, tr("Override Priiloader"));

	SetOptionValues();
}
Ejemplo n.º 10
0
int CustomPathsSM::GetMenuInternal()
{
	int ret = optionBrowser->GetClickedOption();
	
	if (ret < 0)
		return MENU_NONE;
	
	int Idx = -1;
	
	//! Settings: Saves Path
	if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Save Path" ));
		showSelectBrowser(Settings.SaveGamePath, SAVEPATHBROWSER);
	}
	
	//! Settings: Saves Path
	if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Data.bin Path" ));
		showSelectBrowser(Settings.DataBinPath, DATABINPATHBROWSER);
	}
	
	//! Settings: Miis Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Miis Path" ));
		showSelectBrowser(Settings.SaveMiisPath, MIIPATHBROWSER);
	}
	
	//! Settings: Update Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Update Path" ));
		showSelectBrowser(Settings.UpdatePath, UPDATEPATHBROWSER);
	}
	
	//! Settings: Homebrew Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Homebrew Path" ));
		showSelectBrowser(Settings.HomebrewPath, HOMEBREWPATHBROWSER);
	}
	
	//! Settings: GameTDB Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "GameTDB Path" ));
		showSelectBrowser(Settings.GameTDBPath, GAMETDBPATHBROWSER);
	}
	
	//! Settings: Screenshot Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Screenshot Path" ));
		showSelectBrowser(Settings.ScreenshotPath, SCREENSHOTPATHBROWSER);
	}
	
	//! Settings: Emu Nand Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Emu Nand Path" ));
		showSelectBrowser(Settings.EmuNandPath, EMUNANDPATHBROWSER);
	}
	
	//! Global set back of the titleTxt after a change
	titleTxt->SetText(tr( "Custom Paths" ));
	SetOptionValues();
	
	return MENU_NONE;
}
int SoundSettingsMenu::GetMenuInternal()
{
    int ret = optionBrowser->GetClickedOption();

    if (ret < 0)
        return MENU_NONE;

    int Idx = -1;

    //! Settings: Music Volume
    if (ret == ++Idx)
    {
        cfg.MusicVolume += 10;
        if (cfg.MusicVolume > 100) cfg.MusicVolume = 0;
        bgMusic->SetVolume(cfg.MusicVolume);
    }

    //! Settings: Credits Volume
    else if (ret == ++Idx)
    {
        cfg.CreditsVolume += 10;
        if (cfg.CreditsVolume > 100) cfg.CreditsVolume = 0;
    }

    //! Settings: SFX Volume
    else if (ret == ++Idx)
    {
        cfg.SFXVolume += 10;
        if (cfg.SFXVolume > 100) cfg.SFXVolume = 0;
    }

    //! Settings: BgMusic Path
	else if (ret == ++Idx)
    {
		MainWindow::Instance()->SetState(STATE_DISABLED);

		char entered[MAXPATHLEN];
		int ret = MenuBackgroundMusic(entered);
		if(ret == 1)
		{
			if (!bgMusic->Load(entered))
			{
				WindowPrompt(tr("Not supported format!"), tr("Loading standard music."), tr("OK"));
			}
			else
			{
				bgMusic->SetLoop(cfg.BgMusicLoop);
				bgMusic->SetVolume(cfg.MusicVolume);
				bgMusic->Play();
			}
		}
		else if(ret == 2)
		{
			bgMusic->PlayPrevious();
		}
		else if(ret == 3)
		{
			bgMusic->PlayNext();
		}
		
		MainWindow::Instance()->SetState(STATE_DEFAULT);
	}
	
	//! Settings: BgMusic Loop
    else if (ret == ++Idx)
    {
        if (++cfg.BgMusicLoop > 3) cfg.BgMusicLoop = 0;
		bgMusic->SetLoop(cfg.BgMusicLoop);
		bgMusic->Play();
    }

    //! Button: Reset BgMusic
    else if (ret == ++Idx)
    {
        strcpy(cfg.BgMusicPath, "");
		cfg.BgMusicLoop = LOOP;
		bgMusic->Load(cfg.BgMusicPath);
		bgMusic->SetLoop(cfg.BgMusicLoop);
		bgMusic->SetVolume(cfg.MusicVolume);
		bgMusic->Play();
    }

    SetOptionValues();

    return MENU_NONE;
}
Ejemplo n.º 12
0
int CustomPathsSM::GetMenuInternal()
{
	int ret = optionBrowser->GetClickedOption();

	if (ret < 0)
		return MENU_NONE;

	int Idx = -1;

	//! Settings: 3D Cover Path
	if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "3D Cover Path" ));
		ChangePath(Settings.covers_path, sizeof(Settings.covers_path));
	}

	//! Settings: 2D Cover Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "2D Cover Path" ));
		ChangePath(Settings.covers2d_path, sizeof(Settings.covers2d_path));
	}

	//! Settings: Full Cover Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Full Cover Path" ));
		ChangePath(Settings.coversFull_path, sizeof(Settings.coversFull_path));
	}

	//! Settings: Disc Artwork Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Disc Artwork Path" ));
		ChangePath(Settings.disc_path, sizeof(Settings.disc_path));
	}

	//! Settings: Theme Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Theme Path" ));
		ChangePath(Settings.theme_path, sizeof(Settings.theme_path));
	}

	//! Settings: Titles Path
	else if (ret == ++Idx)
	{
		char oldPath[100];
		strncpy(oldPath, Settings.titlestxt_path, sizeof(Settings.titlestxt_path));

		titleTxt->SetText(tr("Titles Path"));
		if (ChangePath(Settings.titlestxt_path, sizeof(Settings.titlestxt_path)))
		{
			if(strlen(oldPath) != strlen(Settings.titlestxt_path) || strcmp(oldPath, Settings.titlestxt_path) != 0)
			{
				if (WindowPrompt(tr("Move File"), tr("Do you want to move the file(s)? Any existing ones will be deleted!"), tr("Yes"), tr("Cancel")) == 1)
				{
					MoveDbFile(oldPath, Settings.titlestxt_path, "wiitdb.xml");
					MoveDbFile(oldPath, Settings.titlestxt_path, "TitlesCache.bin");
					MoveDbFile(oldPath, Settings.titlestxt_path, "wiitdb_offsets.bin");
					MoveDbFile(oldPath, Settings.titlestxt_path, "GameTimestamps.txt");
				
					WindowPrompt(tr("Process finished."), 0, tr("OK"));
				}
			}
		}
	}

	//! Settings: Update Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Update Path" ));
		ChangePath(Settings.update_path, sizeof(Settings.update_path));
	}

	//! Settings: GCT Cheatcodes Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "GCT Cheatcodes Path" ));
		ChangePath(Settings.Cheatcodespath, sizeof(Settings.Cheatcodespath));
	}

	//! Settings: TXT Cheatcodes Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "TXT Cheatcodes Path" ));
		ChangePath(Settings.TxtCheatcodespath, sizeof(Settings.TxtCheatcodespath));
	}

	//! Settings: DOL Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "DOL Path" ));
		ChangePath(Settings.dolpath, sizeof(Settings.dolpath));
	}

	//! Settings: Homebrew Apps Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Homebrew Apps Path" ));
		ChangePath(Settings.homebrewapps_path, sizeof(Settings.homebrewapps_path));
	}

	//! Settings: BCA Codes Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "BCA Codes Path" ));
		ChangePath(Settings.BcaCodepath, sizeof(Settings.BcaCodepath));
	}

	//! Settings: WIP Patches Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "WIP Patches Path" ));
		ChangePath(Settings.WipCodepath, sizeof(Settings.WipCodepath));
	}

	//! Settings: Languagefiles Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Languagefiles Path" ));
		ChangePath(Settings.languagefiles_path, sizeof(Settings.languagefiles_path));
	}

	//! Settings: WDM Files Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "WDM Files Path" ));
		ChangePath(Settings.WDMpath, sizeof(Settings.WDMpath));
	}

	//! Settings: Wiinnertag Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Wiinnertag Path" ));
		ChangePath(Settings.WiinnertagPath, sizeof(Settings.WiinnertagPath));
	}

	//! Settings: Nand Emu Path
	else if (ret == ++Idx)
	{
		char oldPath[sizeof(Settings.NandEmuPath)];
		snprintf(oldPath, sizeof(oldPath), Settings.NandEmuPath);

		titleTxt->SetText(tr( "Nand Emu Path" ));
		ChangePath(Settings.NandEmuPath, sizeof(Settings.NandEmuPath));
		if(strncasecmp(DeviceHandler::PathToFSName(Settings.NandEmuPath), "FAT", 3) != 0)
		{
			snprintf(Settings.NandEmuPath, sizeof(Settings.NandEmuPath), oldPath);
			WindowPrompt(tr("Error:"), tr("Nand Emulation only works on FAT/FAT32 partitions!"), tr("OK"));
		}
	}

	//! Settings: Nand Emu Channel Path
	else if (ret == ++Idx)
	{
		char oldPath[sizeof(Settings.NandEmuChanPath)];
		snprintf(oldPath, sizeof(oldPath), Settings.NandEmuChanPath);

		titleTxt->SetText(tr( "Nand Emu Channel Path" ));
		int result = ChangePath(Settings.NandEmuChanPath, sizeof(Settings.NandEmuChanPath));
		if(strncasecmp(DeviceHandler::PathToFSName(Settings.NandEmuChanPath), "FAT", 3) != 0)
		{
			snprintf(Settings.NandEmuChanPath, sizeof(Settings.NandEmuChanPath), oldPath);
			WindowPrompt(tr("Error:"), tr("Nand Emulation only works on FAT/FAT32 partitions!"), tr("OK"));
		}
		else if(result == 1)
		{
			Channels::Instance()->GetEmuChannelList();
		}
	}

	//! Settings: GameCube Games Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Main GameCube Games Path" ));
		if(ChangePath(Settings.GameCubePath, sizeof(Settings.GameCubePath)))
		{
			GCGames::Instance()->LoadAllGames();
		}
	}

	//! Settings: SD GameCube Games Path
	else if (ret == ++Idx)
	{
		char tmp_path[sizeof(Settings.GameCubeSDPath)];
		snprintf(tmp_path, sizeof(tmp_path), "%s", Settings.GameCubeSDPath);

		titleTxt->SetText(tr( "SD GameCube Games Path" ));
		if(ChangePath(tmp_path, sizeof(tmp_path)))
		{
			if(strncmp(tmp_path, "sd", 2) != 0)
			{
				WindowPrompt(tr("Error:"), tr("This path must be on SD!"), tr("OK"));
			}
			else
			{
				snprintf(Settings.GameCubeSDPath, sizeof(Settings.GameCubeSDPath), "%s", tmp_path);
				GCGames::Instance()->LoadAllGames();
			}
		}
	}

	//! Settings: GameCube Devolution loader.bin path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Devolution Loader Path" ));
		ChangePath(Settings.DEVOLoaderPath, sizeof(Settings.DEVOLoaderPath));
	}

	//! Settings: GameCube Nintendont boot.dol path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Nintendont Loader Path" ));
		ChangePath(Settings.NINLoaderPath, sizeof(Settings.NINLoaderPath));
	}

	//! Settings: Cache BNR Files Path
	else if (ret == ++Idx)
	{
		titleTxt->SetText(tr( "Cache BNR Files Path" ));
		ChangePath(Settings.BNRCachePath, sizeof(Settings.BNRCachePath));
	}

	//! Global set back of the titleTxt after a change
	titleTxt->SetText(tr( "Custom Paths" ));
	SetOptionValues();

	return MENU_NONE;
}
int UpdateSettingsMenu::GetMenuInternal()
{
    int ret = optionBrowser->GetClickedOption();

    if (ret < 0)
        return MENU_NONE;

    int Idx = -1;

    //! Settings: Auto Update
    if (ret == ++Idx)
    {
        if (++cfg.AutoConnect > 1) cfg.AutoConnect = 0;
    }

    //! Settings: Meta Update
    else if (ret == ++Idx)
    {
        if (++cfg.UpdateMeta > 1) cfg.UpdateMeta = 0;
    }

    //! Settings: Icon Update
    else if (ret == ++Idx)
    {
        if (++cfg.UpdateIcon > 2) cfg.UpdateIcon = 0;
		
		if(cfg.UpdateIcon > 0)
		{
			char text[20];
			if(cfg.UpdateIcon == 1)
				strcpy(text, tr("Standard Icon"));
			else if(cfg.UpdateIcon == 2)
				strcpy(text, tr("Black.Pearl Icon"));
			
			MainWindow::Instance()->SetState(STATE_DISABLED);
			if(WindowPrompt(text, tr("Do you want to download now?"), tr("Yes"), tr("Cancel"), 0, 0, false) == 1)
			{
				UpdateIconPNG();
				WindowPrompt(tr("Icon successfully downloaded."), 0, tr("OK"), 0, 0, 0, false);
			}
			MainWindow::Instance()->SetState(STATE_DEFAULT);
		}
    }

    //! Settings: WiiTDB Update
    else if (ret == ++Idx)
    {
        if (++cfg.UpdateWiiTdb > 1) cfg.UpdateWiiTdb = 0;
    }

    //! Button: Update
    else if (ret == ++Idx)
    {
        int res = CheckForUpdate();
		if(res == 0)
		{
			MainWindow::Instance()->SetState(STATE_DISABLED);
			
			int choice = WindowPrompt(tr("No new updates available"), 0, tr("OK"), tr("Show Changelog"), 0, 0, false);
			if(choice == 0)
			{
				ChangeLog Changelog;
				if(!Changelog.Show())
					WindowPrompt(tr("Failed to get the Changelog."), 0, tr("OK"), 0, 0, 0, false);
			}
			
			MainWindow::Instance()->SetState(STATE_DEFAULT);
		}
    }

    SetOptionValues();

    return MainWindow::Instance()->GetBootHomebrew() ? MENU_EXIT : MENU_NONE;
}