Skip to content

Commit

Permalink
Better translations
Browse files Browse the repository at this point in the history
  • Loading branch information
netonjm committed Nov 15, 2021
1 parent 5f00899 commit 72ce9b3
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions es-app/src/guis/GuiMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ GuiMenu::GuiMenu(Window *window, bool animate) : GuiComponent(window), mMenu(win
else
{
addEntry(_("CONFIGURACION").c_str(), true, [this] { openNetplayFilteredSettings(); }, "iconGames");
addEntry(_("MANDOS").c_str(), true, [this] { openControllersSettings_batocera(); }, "iconControllers");
addEntry(_("CONTROLES").c_str(), true, [this] { openControllersSettings_batocera(); }, "iconControllers");

//addEntry(_("INFORMATIONS").c_str(), true, [this] { openSystemInformations_batocera(); }, "iconSystem");
//addEntry(_("UNLOCK UI MODE").c_str(), true, [this] { exitKidMode(); }, "iconAdvanced");
Expand Down Expand Up @@ -1978,12 +1978,22 @@ void GuiMenu::openNetplayFilteredSettings()
s->addSaveFunc([this, videoModeOptionList] { SystemConf::getInstance()->set("global.videomode", videoModeOptionList->getSelected()); });
}

s->addGroup(_("MUSIC"));
s->addGroup(_("SONIDO"));

if (VolumeControl::getInstance()->isAvailable())
{
// Music Volume
auto musicVolume = std::make_shared<SliderComponent>(mWindow, 0.f, 100.f, 1.f, "%");
musicVolume->setValue(Settings::getInstance()->getInt("MusicVolume"));
musicVolume->setOnValueChanged([](const float &newVal) { Settings::getInstance()->setInt("MusicVolume", (int)round(newVal)); });
s->addWithLabel(_("VOLÚMEN DE MÚSICA"), musicVolume);
//s->addSaveFunc([this, musicVolume] { Settings::getInstance()->setInt("MusicVolume", (int)round(musicVolume->getValue())); });
}

// disable sounds
auto music_enabled = std::make_shared<SwitchComponent>(mWindow);
music_enabled->setState(Settings::getInstance()->getBool("audio.bgmusic"));
s->addWithLabel(_("HABILITAR MUSICA DE NAVEGACION"), music_enabled);
s->addWithLabel(_("HABILITAR MUSICA DE NAVEGACIÓN"), music_enabled);
s->addSaveFunc([music_enabled]
{
if (Settings::getInstance()->setBool("audio.bgmusic", music_enabled->getState()))
Expand All @@ -1995,16 +2005,6 @@ void GuiMenu::openNetplayFilteredSettings()
}
});

if (VolumeControl::getInstance()->isAvailable())
{
// Music Volume
auto musicVolume = std::make_shared<SliderComponent>(mWindow, 0.f, 100.f, 1.f, "%");
musicVolume->setValue(Settings::getInstance()->getInt("MusicVolume"));
musicVolume->setOnValueChanged([](const float &newVal) { Settings::getInstance()->setInt("MusicVolume", (int)round(newVal)); });
s->addWithLabel(_("VOLÚMEN DE MÚSICA"), musicVolume);
//s->addSaveFunc([this, musicVolume] { Settings::getInstance()->setInt("MusicVolume", (int)round(musicVolume->getValue())); });
}

// disable sounds
auto sounds_enabled = std::make_shared<SwitchComponent>(mWindow);
sounds_enabled->setState(Settings::getInstance()->getBool("EnableSounds"));
Expand Down Expand Up @@ -2060,7 +2060,7 @@ void GuiMenu::openNetplayFilteredSettings()

auto launchAsServerSwitch = std::make_shared<SwitchComponent>(mWindow);
launchAsServerSwitch->setState(Settings::getInstance()->getBool("LaunchAsServer"));
s->addWithLabel(_("LANZAR SIEMPRE JUEGO ONLINE"), launchAsServerSwitch);
s->addWithLabel(_("LANZAR SIEMPRE JUEGOS EN MODO ONLINE"), launchAsServerSwitch);
s->addSaveFunc([launchAsServerSwitch] { Settings::getInstance()->setBool("LaunchAsServer", launchAsServerSwitch->getState()); });

mWindow->pushGui(s);
Expand Down Expand Up @@ -2733,6 +2733,14 @@ void GuiMenu::openControllersSettings_batocera(int autoSel)
s->addSaveFunc([battery] { Settings::getInstance()->setBool("ShowControllerBattery", battery->getState()); });
}

auto invertJoy = std::make_shared<SwitchComponent>(mWindow);
invertJoy->setState(Settings::getInstance()->getBool("input.switch-ab"));
s->addWithLabel(_("INVERTIR MANDOS 1/2 (IN-GAME)"), invertJoy);
s->addSaveFunc([this, s, invertJoy]
{
Settings::getInstance()->setBool("input.switch-ab", invertJoy->getState());
});

auto currentKeyBoardPlayerId = Settings::getInstance()->getString("keyboard.player"); //"xaudio";
auto players_sources = std::make_shared<OptionListComponent<std::string> >(mWindow, _("JUGADOR CON TECLADO [PLAYER]"), false);
players_sources->add(_("AUTO"), "0", currentKeyBoardPlayerId == "0");
Expand All @@ -2752,14 +2760,6 @@ void GuiMenu::openControllersSettings_batocera(int autoSel)
SystemConf::getInstance()->set("keyboard.player", value);
});

auto invertJoy = std::make_shared<SwitchComponent>(mWindow);
invertJoy->setState(Settings::getInstance()->getBool("input.switch-ab"));
s->addWithLabel(_("INVERTIR MANDOS 1/2 (IN-GAME)"), invertJoy);
s->addSaveFunc([this, s, invertJoy]
{
Settings::getInstance()->setBool("input.switch-ab", invertJoy->getState());
});

window->pushGui(s);
}

Expand Down

0 comments on commit 72ce9b3

Please sign in to comment.