refactor(core/rendering): desacoplar Notifier de game/ui (COUP-01a)

core/rendering/notifier.hpp ja no inclou game/ui/notification_presets.hpp,
i Notifier només exposa l'API crua notify(text, text_color, bg_color,
time_ms). El helper de conveniència basat en Preset es trasllada com a
funció lliure Notification::notify() a game/ui/notification_presets.hpp
(direcció game → core, correcta). Els callers de global_inputs.cpp
passen a usar el helper i afegeixen l'include explícit.

Sota l'auditoria de core/rendering (docs/audit-core-rendering.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
JailDesignerandClaude Opus 4.7 committed 2026-04-20 09:06:40 +02:00
1 parent 9243db1b9f
commit 9434e4e87d
5 files changed
+27 -29

No files matched your search

+7 -6
View File
@@ -12,6 +12,7 @@
#include "core/rendering/screen.hpp"
#include "core/system/event_buffer.hpp"
#include "game/options.hpp"
#include "game/ui/notification_presets.hpp"
#include "utils/defaults.hpp"
namespace GlobalInputs {
@@ -37,7 +38,7 @@ namespace GlobalInputs {
}
void notifyLocale(const std::string& key) {
Notifier::get().notify(Locale::get().text(key));
Notification::notify(Locale::get().text(key));
}
void onDecZoom() {
@@ -46,7 +47,7 @@ namespace GlobalInputs {
Options::window.zoom--;
Screen::get().setWindowZoom(Options::window.zoom);
Options::saveToFile();
Notifier::get().notify(Locale::get().text("input.zoom") + " x" + std::to_string(Options::window.zoom));
Notification::notify(Locale::get().text("input.zoom") + " x" + std::to_string(Options::window.zoom));
}
void onIncZoom() {
@@ -55,7 +56,7 @@ namespace GlobalInputs {
Options::window.zoom++;
Screen::get().setWindowZoom(Options::window.zoom);
Options::saveToFile();
Notifier::get().notify(Locale::get().text("input.zoom") + " x" + std::to_string(Options::window.zoom));
Notification::notify(Locale::get().text("input.zoom") + " x" + std::to_string(Options::window.zoom));
}
void onFullscreen() {
@@ -83,7 +84,7 @@ namespace GlobalInputs {
Options::video.shader.current_shader = (Options::video.shader.current_shader == "crtpi") ? "postfx" : "crtpi";
reapplyShader();
Options::saveToFile();
Notifier::get().notify(Locale::get().text("input.shader") + ": " + Options::video.shader.current_shader);
Notification::notify(Locale::get().text("input.shader") + ": " + Options::video.shader.current_shader);
}
// Busca l'entrada actual al vector de presets i passa a la següent
@@ -108,7 +109,7 @@ namespace GlobalInputs {
reapplyShader();
Options::saveToFile();
const std::string& name = IS_CRTPI ? Options::video.shader.current_crtpi_preset : Options::video.shader.current_postfx_preset;
Notifier::get().notify(Locale::get().text("input.preset") + ": " + name);
Notification::notify(Locale::get().text("input.preset") + ": " + name);
}
void onNextScalingMode() {
@@ -151,7 +152,7 @@ namespace GlobalInputs {
return;
}
exit_window_s = EXIT_WINDOW_S;
Notifier::get().notify(Locale::get().text("input.press_again_exit"), Notification::EXIT);
Notification::notify(Locale::get().text("input.press_again_exit"), Notification::EXIT);
}
} // namespace