diff --git a/src/game.cpp b/src/game.cpp index cd5a6a50c6080..cd0cccfb962c1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -7119,11 +7119,11 @@ game::vmenu_ret game::list_items( const std::vector &item_list ) ui.on_redraw( [&]( const ui_adaptor & ) { reset_item_list_state( w_items_border, iInfoHeight, sort_radius ); + int iStartPos = 0; if( ground_items.empty() ) { wnoutrefresh( w_items_border ); mvwprintz( w_items, point( 2, 10 ), c_white, _( "You don't see any items around you!" ) ); } else { - int iStartPos = 0; werase( w_items ); calcStartPos( iStartPos, iActive, iMaxRows, iItemNum ); int iNum = 0; @@ -7167,15 +7167,15 @@ game::vmenu_ret game::list_items( const std::vector &item_list ) sText += string_format( "[%d]", iter->vIG[iThisPage].count ); } - nc_color col = c_light_green; - if( iNum != iActive ) { - if( high ) { - col = c_yellow; - } else if( low ) { - col = c_red; - } else { - col = iter->example->color_in_inventory(); - } + nc_color col = c_light_gray; + if( iNum == iActive ) { + col = hilite( c_white ); + } else if( high ) { + col = c_yellow; + } else if( low ) { + col = c_red; + } else { + col = iter->example->color_in_inventory(); } trim_and_print( w_items, point( 1, iNum - iStartPos ), width - 9, col, sText ); const int numw = iItemNum > 9 ? 2 : 1; @@ -7227,6 +7227,8 @@ game::vmenu_ret game::list_items( const std::vector &item_list ) activeItem->vIG[page_num].it->color_in_inventory(), activeItem->vIG[page_num].it->display_name() ); wprintw( w_item_info, " >" ); + // move the cursor to the selected item (for screen readers) + wmove( w_items, point( 1, iActive - iStartPos ) ); } wnoutrefresh( w_items );