1. Added custom images for game setting screen (you could use a different background for game settings now. You need to have gamesettings_background.png and bg_options_gamesettings.png

2. Added custom game list color (gametext_color = r, g, b)
This commit is contained in:
hungyip 2009-05-05 02:56:01 +00:00
parent 4db969442c
commit ce921b5bb9
4 changed files with 19 additions and 4 deletions

View File

@ -247,6 +247,9 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
THEME.clockAlign = CFG_ALIGN_CENTRE;
THEME.sdcard_x = 160;
THEME.sdcard_y = 390;
THEME.gameText_r = 0;
THEME.gameText_g = 0;
THEME.gameText_b = 0;
}
@ -583,6 +586,15 @@ void theme_set(char *name, char *val)
}
}
else if (strcmp(cfg_name, "gametext_color") == 0) {
short x,y,z;
if (sscanf(val, "%hd,%hd, %hd", &x, &y, &z) == 3) {
THEME.gameText_r = x;
THEME.gameText_g = y;
THEME.gameText_b = z;
}
}
cfg_bool("show_id", &THEME.showID);
cfg_bool("show_tooltip", &THEME.showToolTip);
cfg_bool("show_hddinfo", &THEME.showHDD);

View File

@ -119,6 +119,9 @@ struct THEME
short clockAlign;
short sdcard_x;
short sdcard_y;
short gameText_r;
short gameText_g;
short gameText_b;
};
extern struct CFG CFG;

View File

@ -11,7 +11,7 @@
#include <unistd.h>
#include "gui_gamebrowser.h"
#include "cfg.h"
#include "../cfg.h"
#define GAMESELECTSIZE 30
extern const int vol;
@ -129,7 +129,7 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
strncat(buffer, "...", 3);
}
gameTxt[i] = new GuiText(buffer, 20, (GXColor){0, 0, 0, 0xff});
gameTxt[i] = new GuiText(buffer, 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
gameTxt[i]->SetPosition(24,0);

View File

@ -3597,7 +3597,7 @@ int GameSettings(struct discHdr * header)
char imgPath[100];
GuiImageData btnOutline(settings_menu_button_png);
snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
snprintf(imgPath, sizeof(imgPath), "%sgamesettings_background.png", CFG.theme_path);
GuiImageData settingsbg(imgPath, settings_background_png);
GuiTrigger trigA;
@ -3657,7 +3657,7 @@ int GameSettings(struct discHdr * header)
deleteBtn.SetTrigger(&trigA);
deleteBtn.SetEffectGrow();
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_settings", bg_options_settings_png, 0);
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings", bg_options_settings_png, 0);
optionBrowser3.SetPosition(0, 90);
optionBrowser3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
optionBrowser3.SetCol2Position(150);