feat(intro/outro): panel translúcid sota el rètol amb easing del text
This commit is contained in:
1 parent
0752df0f62
commit
8243e95ef1
4 files changed
+93
-11
No files matched your search
@@ -63,6 +63,19 @@ namespace RoomFsm {
|
||||
cfg.text_exit_curve = UiConfig::curveByName(n["exit_curve"].get_value<std::string>());
|
||||
}
|
||||
}
|
||||
if (yaml.contains("text_panel")) {
|
||||
const auto& n = yaml["text_panel"];
|
||||
if (n.contains("color") && n["color"].is_sequence() && n["color"].size() == 3) {
|
||||
const auto R = n["color"][0].get_value<std::uint32_t>() & 0xFFU;
|
||||
const auto G = n["color"][1].get_value<std::uint32_t>() & 0xFFU;
|
||||
const auto B = n["color"][2].get_value<std::uint32_t>() & 0xFFU;
|
||||
cfg.text_panel_color = (R << 16) | (G << 8) | B;
|
||||
}
|
||||
if (n.contains("alpha")) {
|
||||
cfg.text_panel_alpha = static_cast<std::uint8_t>(n["alpha"].get_value<std::uint32_t>() & 0xFFU);
|
||||
}
|
||||
cfg.text_panel_height_px = readChildInt(n, "height_px", cfg.text_panel_height_px);
|
||||
}
|
||||
|
||||
std::cout << "RoomFsm: timings carregats des de " << yaml_path
|
||||
<< " (intro fade " << cfg.intro_fade_in_ms
|
||||
|
||||
Reference in new issue
Block a user