feat(intro): colors del rètol independents + restitueix line_gap_px
Dues claus noves a data/ui.yaml > colors: room_text (relleno, default 232) room_text_outline (contorn, default 255) Abans el relleno reciclava notification_text (compartit amb les notificacions del HUD) i el contorn estava hardcodejat a 255 dins renderRoomText. Ara són canals separats: tocar el rètol no afecta les notificacions i tot viu al YAML. UiConfig guanya roomText() / roomTextOutline(); Defaults::UI hi posa els fallbacks; renderRoomText els consumeix. Drive-by: torna a posar la clau room_intro.line_gap_px: 8 al data/scenes/game.yaml — s'havia perdut en una edició manual del fitxer per afinar timings.
This commit is contained in:
1 parent
00594d9eb2
commit
3b05704e97
6 files changed
+33
-6
No files matched your search
@@ -649,8 +649,13 @@ void GameScene::renderRoomText() {
|
||||
if (!room_text_font_) { return; }
|
||||
|
||||
constexpr int KERNING = 0;
|
||||
constexpr Uint8 OUTLINE_WHITE = 255;
|
||||
constexpr Uint8 STROKE_DIST = 1;
|
||||
// Colors del rètol via UiConfig — abans el contorn estava
|
||||
// hardcodejat a 255. Ara `data/ui.yaml > colors.room_text` i
|
||||
// `room_text_outline` controlen relleno i contorn sense afectar
|
||||
// les notificacions del HUD.
|
||||
const Uint8 FILL_COLOR = UiConfig::get().roomText();
|
||||
const Uint8 OUTLINE_COLOR = UiConfig::get().roomTextOutline();
|
||||
|
||||
// Calcula la X animada d'una línia: entra des de fora de pantalla,
|
||||
// s'atura al CENTER_X durant el hold i surt pel costat oposat.
|
||||
@@ -686,9 +691,9 @@ void GameScene::renderRoomText() {
|
||||
y,
|
||||
text,
|
||||
KERNING,
|
||||
UiConfig::get().notificationText(),
|
||||
FILL_COLOR,
|
||||
STROKE_DIST,
|
||||
OUTLINE_WHITE);
|
||||
OUTLINE_COLOR);
|
||||
};
|
||||
|
||||
if (state_ == RoomFsm::State::ROOM_INTRO && transition_.phase >= 2 && transition_.phase <= 4) {
|
||||
|
||||
Reference in new issue
Block a user