refactor(core/rendering): desacoplar RenderInfo d'Options i UiColor (COUP-01b)
core/rendering/render_info ja no inclou game/options.hpp ni
game/ui/ui_palette.hpp. S'introdueix RenderInfo::Frame amb tot l'estat
extern (posició, show_time, shader_enabled, shader_name, shader_preset,
colors) que el caller injecta a cada init()/update(). La lògica de
persistència (cyclePosition/toggleShowTime) surt de RenderInfo i passa
a global_inputs.cpp, que muta Options i crida saveToFile() directament.
Options::buildRenderInfoFrame(text_color, shadow_color) centralitza la
construcció del Frame seguint el mateix patró que buildScreenConfig /
buildPostFXParams. Director i GameScene criden aquest builder quan
necessiten un Frame (amb UiColor::RENDER_INFO_{TEXT,SHADOW} com a
colors actius).
Amb aquest canvi queda tancada COUP-01: core/rendering/ no té cap
include de game/*.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9434e4e87d
commit
9395520a23
8 files changed
+77
-59
No files matched your search
@@ -139,11 +139,14 @@ namespace GlobalInputs {
|
||||
}
|
||||
|
||||
void onCycleRenderInfo() {
|
||||
RenderInfo::cyclePosition();
|
||||
const int NEXT = (static_cast<int>(Options::video.render_info_position) + 1) % 3;
|
||||
Options::video.render_info_position = static_cast<Defaults::RenderInfoPosition>(NEXT);
|
||||
Options::saveToFile();
|
||||
}
|
||||
|
||||
void onToggleRenderTime() {
|
||||
RenderInfo::toggleShowTime();
|
||||
Options::video.render_info_show_time = !Options::video.render_info_show_time;
|
||||
Options::saveToFile();
|
||||
}
|
||||
|
||||
void onExit() {
|
||||
|
||||
Reference in new issue
Block a user