mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-19 00:11:55 +01:00
Added pagesize option (number of entries displayed in the gamelist)
This commit is contained in:
parent
046be61cc4
commit
c7ffd0ad09
@ -253,6 +253,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
|||||||
THEME.gameText_r = 0;
|
THEME.gameText_r = 0;
|
||||||
THEME.gameText_g = 0;
|
THEME.gameText_g = 0;
|
||||||
THEME.gameText_b = 0;
|
THEME.gameText_b = 0;
|
||||||
|
THEME.pagesize = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -598,6 +599,13 @@ void theme_set(char *name, char *val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (strcmp(cfg_name, "pagesize") == 0) {
|
||||||
|
short x;
|
||||||
|
if (sscanf(val, "%hd", &x) == 1) {
|
||||||
|
THEME.pagesize = x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
cfg_bool("show_id", &THEME.showID);
|
cfg_bool("show_id", &THEME.showID);
|
||||||
cfg_bool("show_tooltip", &THEME.showToolTip);
|
cfg_bool("show_tooltip", &THEME.showToolTip);
|
||||||
cfg_bool("show_hddinfo", &THEME.showHDD);
|
cfg_bool("show_hddinfo", &THEME.showHDD);
|
||||||
|
@ -123,6 +123,7 @@ struct THEME
|
|||||||
short gameText_r;
|
short gameText_r;
|
||||||
short gameText_g;
|
short gameText_g;
|
||||||
short gameText_b;
|
short gameText_b;
|
||||||
|
short pagesize;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct CFG CFG;
|
extern struct CFG CFG;
|
||||||
|
@ -25,8 +25,8 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
|||||||
height = h;
|
height = h;
|
||||||
this->gameCnt = gameCnt;
|
this->gameCnt = gameCnt;
|
||||||
gameList = l;
|
gameList = l;
|
||||||
pagesize = (gameCnt > PAGESIZE) ? PAGESIZE : gameCnt;
|
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
|
||||||
scrollbaron = (gameCnt > PAGESIZE) ? 1 : 0;
|
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
|
||||||
selectable = true;
|
selectable = true;
|
||||||
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
|
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
|
||||||
selectedItem = selected - offset;
|
selectedItem = selected - offset;
|
||||||
|
Loading…
Reference in New Issue
Block a user