diff options
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index 3f76b05..95bedb9 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -36,6 +36,8 @@ Game::Game( _cell_helper(std::move(cell_helper)), _rle_reader(std::move(rle_reader)), _current_mode(Mode::NORMAL), + _normal_mode_cursor_style(CursorStyle::BlinkingBlock), + _command_mode_cursor_style(CursorStyle::SteadyBar), _minimum_cursor_pos_y(0) { } @@ -87,6 +89,8 @@ void Game::on_start() noexcept StatusLineSection::G, fmt::format("{}x{}", scene_size.get_width(), scene_size.get_height())); + _cursor_controller->set_cursor_style(_normal_mode_cursor_style); + _commands["open"] = CommandInfo( {.option_cnt = 1U, .function = [this](CommandInfo::Options options) @@ -237,7 +241,7 @@ void Game::_on_normal_mode_update() noexcept _cursor_controller->update_position( _cursor_controller->where() + Vector2::right()); - _cursor_controller->set_cursor_style(CursorStyle::BlinkingBar); + _cursor_controller->set_cursor_style(_command_mode_cursor_style); _command_mode_input = ""; @@ -496,7 +500,7 @@ void Game::_return_to_normal_mode() noexcept _cursor_controller->move_to(_last_pos_before_command_mode.value_or( Vector2({.x = CURSOR_FALLBACK_POS_X, .y = CURSOR_FALLBACK_POS_Y}))); - _cursor_controller->set_cursor_style(CursorStyle::BlinkingBlock); + _cursor_controller->set_cursor_style(_normal_mode_cursor_style); _current_mode = Mode::NORMAL; } |