check if highlighted position is visible
This commit is contained in:
@@ -265,6 +265,8 @@ template <class T> void Menu<T>::Refresh()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight;
|
int MaxBeginning = itsOptions.size() < itsHeight ? 0 : itsOptions.size()-itsHeight;
|
||||||
|
if (itsHighlight > itsBeginning+itsHeight-1)
|
||||||
|
itsBeginning = itsHighlight-itsHeight+1;
|
||||||
if (itsBeginning < 0)
|
if (itsBeginning < 0)
|
||||||
itsBeginning = 0;
|
itsBeginning = 0;
|
||||||
else if (itsBeginning > MaxBeginning)
|
else if (itsBeginning > MaxBeginning)
|
||||||
|
|||||||
Reference in New Issue
Block a user