Skip to content

Commit

Permalink
Position the cursor on the selected item in the item list
Browse files Browse the repository at this point in the history
  • Loading branch information
eltank committed Sep 7, 2021
1 parent 2f686d8 commit 63f3dd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7177,6 +7177,9 @@ game::vmenu_ret game::list_items( const std::vector<map_item_stack> &item_list )
col = iter->example->color_in_inventory();
}
trim_and_print( w_items, point( 1, iNum - iStartPos ), width - 9, col, sText );
if( iNum == iActive ) {
wmove( w_items, point( 1, iActive - iStartPos ) );
}
const int numw = iItemNum > 9 ? 2 : 1;
const point p( iter->vIG[iThisPage].pos.xy() );
mvwprintz( w_items, point( width - 6 - numw, iNum - iStartPos ),
Expand Down

0 comments on commit 63f3dd6

Please sign in to comment.