diff --git a/include/ftxui/component/screen_interactive.hpp b/include/ftxui/component/screen_interactive.hpp index 6c79913..9238e26 100644 --- a/include/ftxui/component/screen_interactive.hpp +++ b/include/ftxui/component/screen_interactive.hpp @@ -39,6 +39,8 @@ class ScreenInteractive : public Screen { // Options. Must be called before Loop(). void TrackMouse(bool enable = true); + void SetCursorReset(Screen::Cursor::Shape shape); + // Return the currently active screen, nullptr if none. static ScreenInteractive* Active(); diff --git a/src/ftxui/component/screen_interactive.cpp b/src/ftxui/component/screen_interactive.cpp index 45a4fff..b5f4d68 100644 --- a/src/ftxui/component/screen_interactive.cpp +++ b/src/ftxui/component/screen_interactive.cpp @@ -441,6 +441,11 @@ void ScreenInteractive::TrackMouse(bool enable) { track_mouse_ = enable; } +/// @brief Set cursor shape on exit of main loop +void ScreenInteractive::SetCursorReset(Screen::Cursor::Shape shape) { + cursor_reset_shape_ = shape; +} + /// @brief Add a task to the main loop. /// It will be executed later, after every other scheduled tasks. /// @ingroup component