feat(title): cosmètics i posicions a YAML, font Tiny5 al copyright
This commit is contained in:
1 parent
233fcb8226
commit
fceeb11cdd
12 files changed
+211
-163
No files matched your search
@@ -200,7 +200,7 @@ Director::Director() {
|
||||
placeholder_text->setDefaultKerning(UiConfig::get().placeholderFont().kerning);
|
||||
placeholder_text_ = placeholder_text;
|
||||
|
||||
// Font del copyright de la TITLE (PixeloidSans-Bold). Pixel-art
|
||||
// Font del copyright de la TITLE (Tiny5-Regular size 8). Pixel-art
|
||||
// estricte; va amb la paleta UI per compartir índex de color amb la
|
||||
// resta de textos placeholder.
|
||||
const std::string COPYRIGHT_FONT_GIF_KEY = UiConfig::get().copyrightFont().name + ".gif";
|
||||
|
||||
@@ -100,6 +100,11 @@ UiConfig::UiConfig()
|
||||
title_bg_color_(Defaults::UI::Title::BG_COLOR),
|
||||
title_text_color_(Defaults::UI::Title::TEXT_COLOR),
|
||||
title_copyright_color_(Defaults::UI::Title::COPYRIGHT_COLOR),
|
||||
title_press_start_outline_color_(Defaults::UI::Title::PRESS_START_OUTLINE_COLOR),
|
||||
title_logo_y_percent_(Defaults::UI::Title::LOGO_Y_PERCENT),
|
||||
title_prompt_y_percent_(Defaults::UI::Title::PROMPT_Y_PERCENT),
|
||||
title_copyright_y_percent_(Defaults::UI::Title::COPYRIGHT_Y_PERCENT),
|
||||
title_mini_logo_gap_px_(Defaults::UI::Title::MINI_LOGO_GAP_PX),
|
||||
title_blink_visible_ms_(Defaults::UI::Title::BLINK_VISIBLE_MS),
|
||||
title_blink_hidden_ms_(Defaults::UI::Title::BLINK_HIDDEN_MS),
|
||||
title_starting_ms_(Defaults::UI::Title::STARTING_MS),
|
||||
@@ -233,6 +238,11 @@ void UiConfig::load(const std::string& file_path) {
|
||||
readColorIndex(t, "bg_color", title_bg_color_);
|
||||
readColorIndex(t, "text_color", title_text_color_);
|
||||
readColorIndex(t, "copyright_color", title_copyright_color_);
|
||||
readColorIndex(t, "press_start_outline_color", title_press_start_outline_color_);
|
||||
readField(t, "logo_y_percent", title_logo_y_percent_);
|
||||
readField(t, "prompt_y_percent", title_prompt_y_percent_);
|
||||
readField(t, "copyright_y_percent", title_copyright_y_percent_);
|
||||
readField(t, "mini_logo_gap_px", title_mini_logo_gap_px_);
|
||||
readField(t, "blink_visible_ms", title_blink_visible_ms_);
|
||||
readField(t, "blink_hidden_ms", title_blink_hidden_ms_);
|
||||
readField(t, "starting_ms", title_starting_ms_);
|
||||
|
||||
@@ -93,6 +93,11 @@ class UiConfig {
|
||||
[[nodiscard]] auto titleBgColor() const -> Uint8 { return title_bg_color_; }
|
||||
[[nodiscard]] auto titleTextColor() const -> Uint8 { return title_text_color_; }
|
||||
[[nodiscard]] auto titleCopyrightColor() const -> Uint8 { return title_copyright_color_; }
|
||||
[[nodiscard]] auto titlePressStartOutlineColor() const -> Uint8 { return title_press_start_outline_color_; }
|
||||
[[nodiscard]] auto titleLogoYPercent() const -> int { return title_logo_y_percent_; }
|
||||
[[nodiscard]] auto titlePromptYPercent() const -> int { return title_prompt_y_percent_; }
|
||||
[[nodiscard]] auto titleCopyrightYPercent() const -> int { return title_copyright_y_percent_; }
|
||||
[[nodiscard]] auto titleMiniLogoGapPx() const -> int { return title_mini_logo_gap_px_; }
|
||||
[[nodiscard]] auto titleBlinkVisibleMs() const -> int { return title_blink_visible_ms_; }
|
||||
[[nodiscard]] auto titleBlinkHiddenMs() const -> int { return title_blink_hidden_ms_; }
|
||||
[[nodiscard]] auto titleStartingMs() const -> int { return title_starting_ms_; }
|
||||
@@ -174,6 +179,11 @@ class UiConfig {
|
||||
Uint8 title_bg_color_;
|
||||
Uint8 title_text_color_;
|
||||
Uint8 title_copyright_color_;
|
||||
Uint8 title_press_start_outline_color_;
|
||||
int title_logo_y_percent_;
|
||||
int title_prompt_y_percent_;
|
||||
int title_copyright_y_percent_;
|
||||
int title_mini_logo_gap_px_;
|
||||
int title_blink_visible_ms_;
|
||||
int title_blink_hidden_ms_;
|
||||
int title_starting_ms_;
|
||||
|
||||
Reference in new issue
Block a user