fix highlighting position
This commit is contained in:
@@ -241,6 +241,7 @@ void Menu::DeleteOption(int no)
|
|||||||
|
|
||||||
void Menu::redraw_screen()
|
void Menu::redraw_screen()
|
||||||
{
|
{
|
||||||
|
NeedsRedraw.clear();
|
||||||
vector<Option *>::const_iterator it = itsOptions.begin()+itsBeginning;
|
vector<Option *>::const_iterator it = itsOptions.begin()+itsBeginning;
|
||||||
NeedsRedraw.reserve(itsHeight);
|
NeedsRedraw.reserve(itsHeight);
|
||||||
for (int i = itsBeginning; i < itsBeginning+itsHeight && it != itsOptions.end(); i++, it++)
|
for (int i = itsBeginning; i < itsBeginning+itsHeight && it != itsOptions.end(); i++, it++)
|
||||||
@@ -511,11 +512,7 @@ void Menu::Go(WHERE where)
|
|||||||
void Menu::Highlight(int which)
|
void Menu::Highlight(int which)
|
||||||
{
|
{
|
||||||
if (which <= itsOptions.size())
|
if (which <= itsOptions.size())
|
||||||
{
|
|
||||||
NeedsRedraw.push_back(itsHighlight);
|
|
||||||
itsHighlight = which-1;
|
itsHighlight = which-1;
|
||||||
NeedsRedraw.push_back(itsHighlight);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -523,6 +520,8 @@ void Menu::Highlight(int which)
|
|||||||
itsBeginning = itsHighlight-itsHeight/2;
|
itsBeginning = itsHighlight-itsHeight/2;
|
||||||
else
|
else
|
||||||
itsBeginning = 0;
|
itsBeginning = 0;
|
||||||
|
|
||||||
|
redraw_screen();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::Reset()
|
void Menu::Reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user