arreglos en service menu per a emscripten

This commit is contained in:
2026-04-14 19:08:45 +02:00
parent 8706b2c7fb
commit 25a36d5064
5 changed files with 58 additions and 17 deletions

View File

@@ -642,6 +642,21 @@ void ServiceMenu::setHiddenOptions() {
}
}
#ifdef __EMSCRIPTEN__
// En la versión web no tiene sentido exponer: shaders (build sin shaders),
// permitir apagar el sistema (no aplica al navegador) ni salir del juego
// (lo gestiona el navegador).
for (const auto& caption : {
Lang::getText("[SERVICE_MENU] SHADER"),
Lang::getText("[SERVICE_MENU] ENABLE_SHUTDOWN"),
Lang::getText("[SERVICE_MENU] QUIT")}) {
auto* option = getOptionByCaption(caption);
if (option != nullptr) {
option->setHidden(true);
}
}
#endif
updateMenu(); // El menú debe refrescarse si algo se oculta
}