mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
Satellic's changes reversed
N O T E: -------- - The old coords for the "sort & search" buttons are obsolete and will be removed in future - the gamelist, gamegrid and the gamecarousel have your own coords (named the old coords with a prefix "gamelist_", "gamegrid_" and "gamecarousel_") - the search-button is e.g. themable over the new setting "gamelist_search_coords=x,y", "gamegrid_search_coords=x,y" and "gamecarousel_search_coords=x,y". - a workaround, for old themes, sets (by using the old coords) all buttons as previously, apart from favorite button. The new search button is placed at the position from the favorite button and the favorite button is placed to the left side of the search button. That is necessary for old themes to insert the search button between favorite and abc button. This workaround will be removed in future - for new themes must use the new coords. - Themes for old and new loader can use both coords (the important thing is that the old coords stands before the new coords in the GXtheme.cfg)
This commit is contained in:
parent
3046b2b660
commit
75beee7328
@ -660,33 +660,34 @@ void theme_set(char *name, char *val) {
|
||||
else if (strcmp(cfg_name, "favorite_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x-=24;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x-=20;
|
||||
// old themes have no search_coords
|
||||
// set the searchIcon to the Position of the favIcon
|
||||
//THEME.gamelist_search_x = x;
|
||||
//THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset;
|
||||
//THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y;
|
||||
THEME.gamelist_search_x = x;
|
||||
THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y;
|
||||
// place the favIcon to the left side of the searchIcon
|
||||
//if(!CFG.widescreen) x-= CFG.widescreen ? 32 : 40;
|
||||
if(!CFG.widescreen) x-= CFG.widescreen ? 32 : 40;
|
||||
THEME.gamelist_favorite_x = x;
|
||||
THEME.gamegrid_favorite_x = THEME.gamecarousel_favorite_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_favorite_y = THEME.gamegrid_favorite_y = THEME.gamecarousel_favorite_y = y;
|
||||
WorkAroundIconSet |= OLD_FAV_ICON;
|
||||
}
|
||||
}
|
||||
else if (strcmp(cfg_name, "search_coords") == 0) {
|
||||
else if (strcmp(cfg_name, "abc_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x-=16;
|
||||
THEME.gamelist_search_x = x;
|
||||
THEME.gamegrid_search_x = THEME.gamecarousel_search_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_search_y = THEME.gamegrid_search_y = THEME.gamecarousel_search_y = y;
|
||||
}
|
||||
}
|
||||
else if (strcmp(cfg_name, "abc_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x-=8;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x-=12;
|
||||
THEME.gamelist_abc_x = x;
|
||||
THEME.gamegrid_abc_x = THEME.gamecarousel_abc_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_abc_y = THEME.gamegrid_abc_y = THEME.gamecarousel_abc_y = y;
|
||||
@ -696,7 +697,12 @@ void theme_set(char *name, char *val) {
|
||||
else if (strcmp(cfg_name, "count_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x=0;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x-=4;
|
||||
THEME.gamelist_count_x = x;
|
||||
THEME.gamegrid_count_x = THEME.gamecarousel_count_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_count_y = THEME.gamegrid_count_y = THEME.gamecarousel_count_y = y;
|
||||
@ -706,7 +712,12 @@ void theme_set(char *name, char *val) {
|
||||
else if (strcmp(cfg_name, "list_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x+=8;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x+=4;
|
||||
THEME.gamelist_list_x = x;
|
||||
THEME.gamegrid_list_x = THEME.gamecarousel_list_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_list_y = THEME.gamegrid_list_y = THEME.gamecarousel_list_y = y;
|
||||
@ -716,7 +727,12 @@ void theme_set(char *name, char *val) {
|
||||
else if (strcmp(cfg_name, "grid_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x+=16;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x+=12;
|
||||
THEME.gamelist_grid_x = x;
|
||||
THEME.gamegrid_grid_x = THEME.gamecarousel_grid_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_grid_y = THEME.gamegrid_grid_y = THEME.gamecarousel_grid_y = y;
|
||||
@ -726,7 +742,12 @@ void theme_set(char *name, char *val) {
|
||||
else if (strcmp(cfg_name, "carousel_coords") == 0) {
|
||||
short x,y;
|
||||
if (sscanf(val, "%hd,%hd", &x, &y) == 2) {
|
||||
if(!CFG.widescreen) x+=24;
|
||||
// the old Icons are aligned at center and the new at the left top corner.
|
||||
// we must add 320 and sub the half image width to get the correct position.
|
||||
x += 300;
|
||||
// the old stuff is optimized for widescreen.
|
||||
// if no widescreen, we must reposition the pos
|
||||
if(!CFG.widescreen) x+=20;
|
||||
THEME.gamelist_carousel_x = x;
|
||||
THEME.gamegrid_carousel_x = THEME.gamecarousel_carousel_x = x-WorkAroundBarOffset;
|
||||
THEME.gamelist_carousel_y = THEME.gamegrid_carousel_y = THEME.gamecarousel_carousel_y = y;
|
||||
|
Loading…
Reference in New Issue
Block a user