diff options
author | HampusM <hampus@hampusmat.com> | 2022-06-23 17:05:43 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-23 18:24:48 +0200 |
commit | a570e494bca43c30d7ec91d293051c0c818509b5 (patch) | |
tree | 4eea8c16d1434893ca51b721c5498ece65c836aa /src/game/status_manager.cpp | |
parent | ec5c7cbccc533bacab661e991e7011584d3bb47f (diff) |
feat: add statusline mode styling
Diffstat (limited to 'src/game/status_manager.cpp')
-rw-r--r-- | src/game/status_manager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/status_manager.cpp b/src/game/status_manager.cpp index 36add4c..e4838cc 100644 --- a/src/game/status_manager.cpp +++ b/src/game/status_manager.cpp @@ -13,23 +13,23 @@ void StatusManager::set_section_title( const StatusLineSection §ion, const std::string_view &title) noexcept { - if (_title_lengths.contains(section)) + if (_section_title_lengths.contains(section)) { fmt::print(stderr, "Error: can't set statusbar section title more than once"); return; } - _statusline->set_status(section, title); + _statusline->set_section_status(section, title); - _title_lengths[section] = static_cast<int>(title.length()); + _section_title_lengths[section] = static_cast<int>(title.length()); } void StatusManager::set_section_body( const StatusLineSection §ion, const std::string_view &body) noexcept { - auto section_title_length = _title_lengths[section]; + auto section_title_length = _section_title_lengths[section]; - _statusline->set_status(section, body, section_title_length + 1); + _statusline->set_section_status(section, body, section_title_length + 1); } |