hotkey: F11 mostra notificacio blava amb 'AppName vX.Y.Z (githash)'

This commit is contained in:
2026-05-19 20:04:12 +02:00
parent 66ad34b667
commit 984d1fca50
3 changed files with 21 additions and 5 deletions
+12
View File
@@ -7,6 +7,8 @@
#include "core/rendering/notifications.hpp"
#include "core/rendering/screen.h"
#include "game/options.hpp"
#include "utils/defines.hpp"
#include "version.h"
namespace GlobalInputs {
@@ -54,6 +56,12 @@ namespace GlobalInputs {
Notifications::show(MSG, Notifications::Palette::SUCCESS, Notifications::STANDARD_MS);
}
void notifyVersion() {
// Format: "<APP_NAME> v<VERSION> (<GIT_HASH>)"
const std::string MSG = std::string(Version::APP_NAME) + " v" + Texts::VERSION + " (" + Version::GIT_HASH + ")";
Notifications::show(MSG, Notifications::Palette::TOGGLE, Notifications::LONG_MS);
}
void onExit() {
const Uint32 NOW = SDL_GetTicks();
if (NOW < exit_window_until_ticks) {
@@ -94,6 +102,10 @@ namespace GlobalInputs {
notifyShaderEnabled();
return true;
}
if (Input::get()->checkInput(Input::Action::SHOW_VERSION, Input::Repeat::OFF)) {
notifyVersion();
return true;
}
// F5/F6 només actuen quan el post-procesado està actiu.
if (Screen::isShaderEnabled()) {
if (Input::get()->checkInput(Input::Action::TOGGLE_SHADER_TYPE, Input::Repeat::OFF)) {