From 5d00b67cace42eb87ba7f818fb5fccc30e9fd667 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sun, 12 Jun 2022 15:00:52 +0200 Subject: refactor: move set section lengths to game --- src/game/game.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/game/game.cpp') diff --git a/src/game/game.cpp b/src/game/game.cpp index 4b63c5a..ad95bd4 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -49,6 +49,24 @@ void Game::on_start() noexcept std::shared_ptr statusline = _statusline_factory(Bounds({.width = scene_size.get_width(), .height = 1})); + const auto statusline_section_a_length = 5; + const auto statusline_section_b_length = 15; + const auto statusline_section_c_length = 15; + const auto statusline_section_d_length = 20; + const auto statusline_section_e_length = 25; + const auto statusline_section_f_length = 30; + const auto statusline_section_g_length = 30; + const auto statusline_section_h_length = 20; + + statusline->set_section_length(StatusLineSection::A, statusline_section_a_length); + statusline->set_section_length(StatusLineSection::B, statusline_section_b_length); + statusline->set_section_length(StatusLineSection::C, statusline_section_c_length); + statusline->set_section_length(StatusLineSection::D, statusline_section_d_length); + statusline->set_section_length(StatusLineSection::E, statusline_section_e_length); + statusline->set_section_length(StatusLineSection::F, statusline_section_f_length); + statusline->set_section_length(StatusLineSection::G, statusline_section_g_length); + statusline->set_section_length(StatusLineSection::H, statusline_section_h_length); + _scene->register_component(statusline, Vector2({.x = 0, .y = 1})); _status_manager->bind(statusline); -- cgit v1.2.3-18-g5258