mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-23 02:59:17 +01:00
small fix
This commit is contained in:
parent
badb7747c9
commit
8022c018e6
@ -414,22 +414,24 @@ 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)
|
if(positionWiimote > 0 || listChanged || numEntries != browser.numEntries)
|
||||||
{
|
{
|
||||||
position = positionWiimote; // follow wiimote cursor
|
if(positionWiimote > 0)
|
||||||
}
|
{
|
||||||
else
|
position = positionWiimote; // follow wiimote cursor
|
||||||
{
|
}
|
||||||
position = 156*(browser.pageIndex + FILE_PAGESIZE/2.0) / (browser.numEntries*1.0);
|
else
|
||||||
|
{
|
||||||
|
position = 156*(browser.pageIndex + FILE_PAGESIZE/2.0) / (browser.numEntries*1.0);
|
||||||
|
|
||||||
if(browser.pageIndex/(FILE_PAGESIZE/2.0) < 1)
|
if(browser.pageIndex/(FILE_PAGESIZE/2.0) < 1)
|
||||||
position = 0;
|
position = 0;
|
||||||
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user