aboutsummaryrefslogtreecommitdiff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-06-12 15:00:52 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:57:02 +0200
commit5d00b67cace42eb87ba7f818fb5fccc30e9fd667 (patch)
tree83ddd78169f87050f7e46e2b1e74ebf10bdc5132 /src/game/game.cpp
parent2607f946da1b56bcb5bf9534e0122c8fe05c4469 (diff)
refactor: move set section lengths to game
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp18
1 files changed, 18 insertions, 0 deletions
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<IStatusLine> 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);