check if highlighted position is visible

master
Andrzej Rybczak 17 years ago
parent 65e5006a6e
commit aac3ce17ee
  1. 2
      src/menu.h

@ -265,6 +265,8 @@ template <class T> void Menu<T>::Refresh()
return;
}
int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight;
if (itsHighlight > itsBeginning+itsHeight-1)
itsBeginning = itsHighlight-itsHeight+1;
if (itsBeginning < 0)
itsBeginning = 0;
else if (itsBeginning > MaxBeginning)

Loading…
Cancel
Save