eliminades locales no utilitzades

modificats textos de ui a case tipo frase
notificacions llargues pasen a multilinea
This commit is contained in:
2026-04-17 10:11:31 +02:00
parent 5eb178b039
commit 8a44ab15e7
4 changed files with 118 additions and 184 deletions

View File

@@ -211,10 +211,10 @@ void Game::handleEvents() {
if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == KeyConfig::get()->key("EDITOR", "toggle") && static_cast<int>(event.key.repeat) == 0) {
if (MapEditor::get()->isActive()) {
GameControl::exit_editor();
Notifier::get()->show({Locale::get()->get("game.editor_disabled")});
Notifier::get()->show({Locale::get()->get("ui.editor_disabled")});
} else {
GameControl::enter_editor();
Notifier::get()->show({Locale::get()->get("game.editor_enabled")});
Notifier::get()->show({Locale::get()->get("ui.editor_enabled")});
}
} else if (event.type == SDL_EVENT_KEY_DOWN && event.key.key == KeyConfig::get()->key("EDITOR", "grid") && static_cast<int>(event.key.repeat) == 0 && MapEditor::get()->isActive()) {
MapEditor::get()->showGrid(!MapEditor::get()->isGridEnabled());
@@ -236,7 +236,7 @@ void Game::handleInput() {
if (Input::get()->checkAction(InputAction::TOGGLE_IN_GAME_MUSIC, Input::DO_NOT_ALLOW_REPEAT)) {
scoreboard_data_->music = !scoreboard_data_->music;
scoreboard_data_->music ? Audio::get()->resumeMusic() : Audio::get()->pauseMusic();
Notifier::get()->show({scoreboard_data_->music ? Locale::get()->get("game.music_enabled") : Locale::get()->get("game.music_disabled")});
Notifier::get()->show({scoreboard_data_->music ? Locale::get()->get("ui.music_enabled") : Locale::get()->get("ui.music_disabled")});
}
// Si la consola está activa, no procesar inputs del juego
@@ -262,7 +262,7 @@ void Game::handleInput() {
// Input de pausa solo en estado PLAYING
if (Input::get()->checkAction(InputAction::PAUSE, Input::DO_NOT_ALLOW_REPEAT)) {
togglePause();
Notifier::get()->show({paused_ ? Locale::get()->get("game.paused") : Locale::get()->get("game.running")});
Notifier::get()->show({paused_ ? Locale::get()->get("ui.paused") : Locale::get()->get("ui.running")});
}
GlobalInputs::handle();
@@ -612,7 +612,7 @@ void Game::renderPostFadeEnding() {
static void toggleCheat(Options::Cheat::State& cheat, const std::string& label) {
cheat = (cheat == Options::Cheat::State::ENABLED) ? Options::Cheat::State::DISABLED : Options::Cheat::State::ENABLED;
const bool ENABLED = (cheat == Options::Cheat::State::ENABLED);
Notifier::get()->show({label + (ENABLED ? Locale::get()->get("game.enabled") : Locale::get()->get("game.disabled"))}, Notifier::Style::DEFAULT, -1, true);
Notifier::get()->show({label + (ENABLED ? Locale::get()->get("ui.enabled") : Locale::get()->get("ui.disabled"))}, Notifier::Style::DEFAULT, -1, true);
}
// Pone la información de debug en pantalla
@@ -655,9 +655,9 @@ void Game::handleDebugEvents(const SDL_Event& event) {
} else if (KEY == kc->key("DEBUG", "nav_right")) {
changeRoom(room_->getRoom(Room::Border::RIGHT));
} else if (KEY == kc->key("DEBUG", "infinite_lives")) {
toggleCheat(Options::cheats.infinite_lives, Locale::get()->get("game.cheat_infinite_lives"));
toggleCheat(Options::cheats.infinite_lives, Locale::get()->get("ui.cheat_infinite_lives"));
} else if (KEY == kc->key("DEBUG", "invincibility")) {
toggleCheat(Options::cheats.invincible, Locale::get()->get("game.cheat_invincible"));
toggleCheat(Options::cheats.invincible, Locale::get()->get("ui.cheat_invincible"));
} else if (KEY == kc->key("DEBUG", "test_cheevo")) {
Notifier::get()->show({Locale::get()->get("achievements.header"), Locale::get()->get("achievements.c11")}, Notifier::Style::CHEEVO, -1, false, "F7");
} else if (KEY == kc->key("DEBUG", "debug_mode")) {
@@ -666,7 +666,7 @@ void Game::handleDebugEvents(const SDL_Event& event) {
invincible_before_debug_ = (Options::cheats.invincible == Options::Cheat::State::ENABLED);
}
Debug::get()->toggleEnabled();
Notifier::get()->show({Debug::get()->isEnabled() ? Locale::get()->get("game.debug_enabled") : Locale::get()->get("game.debug_disabled")});
Notifier::get()->show({Debug::get()->isEnabled() ? Locale::get()->get("ui.debug_enabled") : Locale::get()->get("ui.debug_disabled")});
room_->redrawMap();
if (Debug::get()->isEnabled()) {
Options::cheats.invincible = Options::Cheat::State::ENABLED;