diff --git a/src/cata_imgui.cpp b/src/cata_imgui.cpp index 42228fbf5f8cd..e7ab38cd94f1b 100644 --- a/src/cata_imgui.cpp +++ b/src/cata_imgui.cpp @@ -453,7 +453,7 @@ class cataimgui::window_impl ImVec2 imsize = ImGui::GetWindowSize(); imvec2_to_point( &impos, &catapos ); imvec2_to_point( &imsize, &catasize ); - window_adaptor->position_absolute( catapos, catasize ); + window_adaptor->position( catapos, catasize ); } ); window_adaptor->on_screen_resize( [this]( ui_adaptor & ) { is_resized = true; diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 461c2e20e4587..2f6a4802c6aa1 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -3832,6 +3832,11 @@ input_event input_manager::get_input_event( const keyboard_mode preferred_keyboa // we can skip screen update if `needupdate` is false to improve performance during mouse // move events. wnoutrefresh( catacurses::stdscr ); + // This statement is required when the screen is made very small + if( ui_adaptor::has_imgui() ) { + needupdate = true; + } + if( needupdate ) { refresh_display(); } diff --git a/src/ui_manager.cpp b/src/ui_manager.cpp index d5b0ed7eea1e8..ec7cea68e0dab 100644 --- a/src/ui_manager.cpp +++ b/src/ui_manager.cpp @@ -131,15 +131,6 @@ void ui_adaptor::position( const point &topleft, const point &size ) ui_manager::invalidate( old_dimensions, false ); } -void ui_adaptor::position_absolute( const point &topleft, const point &size ) -{ - const rectangle old_dimensions = dimensions; - // ensure position is updated before calling invalidate - dimensions = rectangle( topleft, topleft + size ); - invalidated = true; - ui_manager::invalidate( old_dimensions, false ); -} - void ui_adaptor::on_redraw( const redraw_callback_t &fun ) { redraw_cb = fun; diff --git a/src/ui_manager.h b/src/ui_manager.h index 1c117fe937bca..48a1d2110c868 100644 --- a/src/ui_manager.h +++ b/src/ui_manager.h @@ -127,11 +127,6 @@ class ui_adaptor * and curses builds. **/ void position( const point &topleft, const point &size ); - /** - * like 'position', except topleft and size are given as - * pixels in tiled builds and console cells on curses builds - **/ - void position_absolute( const point &topleft, const point &size ); /** * Set redraw and resize callbacks. The resize callback should * call `position` or `position_from_window` to set the size of the UI,