Change the Atrac3+ download buttons slightly to avoid confusion. It's fine to always show the button, but change it when we have it downloaded already.

This commit is contained in:
The Dax 2013-08-09 06:57:03 -04:00
parent 1a1f142ea5
commit 19001edd4d
2 changed files with 9 additions and 2 deletions

View File

@ -32,6 +32,7 @@
#include "base/colorutil.h"
#include "base/timeutil.h"
#include "math/curves.h"
#include "Core/HW/atrac3plus.h"
#ifdef _WIN32
namespace MainWindow {
@ -251,7 +252,11 @@ void GameSettingsScreen::CreateViews() {
ViewGroup *audioSettings = new LinearLayout(ORIENT_VERTICAL);
audioSettingsScroll->Add(audioSettings);
tabHolder->AddTab("Audio", audioSettingsScroll);
audioSettings->Add(new Choice(a->T("Download Atrac3+ plugin")))->OnClick.Handle(this, &GameSettingsScreen::OnDownloadPlugin);
std::string atracString;
atracString.assign(Atrac3plus_Decoder::IsInstalled() ? "Redownload Atrac3+ plugin" : "Download Atrac3+ plugin");
audioSettings->Add(new Choice(a->T(atracString.c_str())))->OnClick.Handle(this, &GameSettingsScreen::OnDownloadPlugin);
audioSettings->Add(new CheckBox(&g_Config.bEnableSound, a->T("Enable Sound")));
audioSettings->Add(new CheckBox(&g_Config.bEnableAtrac3plus, a->T("Enable Atrac3+")));
audioSettings->Add(new PopupSliderChoice(&g_Config.iSEVolume, 0, 8, a->T("FX volume"), screenManager()));

View File

@ -865,7 +865,9 @@ void AudioScreen::render() {
// Show the download button even if not installed - might want to upgrade.
VLinear vlinear(30, 400, 20);
if (UIButton(GEN_ID, vlinear, 400, 0, a->T("Download Atrac3+ plugin"), ALIGN_LEFT)) {
std::string atracString;
atracString.assign(Atrac3plus_Decoder::IsInstalled() ? "Redownload Atrac3+ plugin" : "Download Atrac3+ plugin");
if (UIButton(GEN_ID, vlinear, 400, 0, a->T(atracString.c_str()), ALIGN_LEFT)) {
screenManager()->push(new PluginScreen());
}