small fix

This commit is contained in:
dborth 2009-11-05 06:49:30 +00:00
parent badb7747c9
commit 8022c018e6

View File

@ -414,6 +414,8 @@ void GuiFileBrowser::Update(GuiTrigger * t)
} }
// update the location of the scroll box based on the position in the file list // update the location of the scroll box based on the position in the file list
if(positionWiimote > 0 || listChanged || numEntries != browser.numEntries)
{
if(positionWiimote > 0) if(positionWiimote > 0)
{ {
position = positionWiimote; // follow wiimote cursor position = positionWiimote; // follow wiimote cursor
@ -427,8 +429,8 @@ void GuiFileBrowser::Update(GuiTrigger * t)
else if((browser.pageIndex+FILE_PAGESIZE)/(FILE_PAGESIZE*1.0) >= (browser.numEntries)/(FILE_PAGESIZE*1.0)) else if((browser.pageIndex+FILE_PAGESIZE)/(FILE_PAGESIZE*1.0) >= (browser.numEntries)/(FILE_PAGESIZE*1.0))
position = 156; position = 156;
} }
scrollbarBoxBtn->SetPosition(0,position+36); scrollbarBoxBtn->SetPosition(0,position+36);
}
listChanged = false; listChanged = false;
numEntries = browser.numEntries; numEntries = browser.numEntries;