- Add uDraw icons to game info screen

- Clear old game info so it does not show for games without any gameTDB info.
- Only allow Update to show if not in parental lock mode.
This commit is contained in:
yardape8000 2012-05-03 01:34:56 +00:00
parent 1cb8a493d9
commit 40f3a44fef
5 changed files with 53 additions and 30 deletions

BIN
data/images/udraw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 806 B

BIN
data/images/udrawR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -488,6 +488,7 @@ bool GameTDB::FindTitle(char * data, string & title, string langCode)
bool GameTDB::GetTitle(const char * id, string & title)
{
title = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -502,6 +503,7 @@ bool GameTDB::GetTitle(const char * id, string & title)
bool GameTDB::GetSynopsis(const char * id, string & synopsis)
{
synopsis = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -534,6 +536,7 @@ bool GameTDB::GetSynopsis(const char * id, string & synopsis)
bool GameTDB::GetRegion(const char * id, string & region)
{
region = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -555,6 +558,7 @@ bool GameTDB::GetRegion(const char * id, string & region)
bool GameTDB::GetDeveloper(const char * id, string & dev)
{
dev = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -576,6 +580,7 @@ bool GameTDB::GetDeveloper(const char * id, string & dev)
bool GameTDB::GetPublisher(const char * id, string & pub)
{
pub = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -644,6 +649,7 @@ bool GameTDB::GetGenres(const char * id, string & gen)
{
safe_vector<string> genre;
gen = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -738,6 +744,7 @@ int GameTDB::GetRating(const char * id)
bool GameTDB::GetRatingValue(const char * id, string & rating_value)
{
rating_value = "";
if(!id) return false;
char * data = GetGameNode(id);
@ -766,6 +773,7 @@ bool GameTDB::GetRatingValue(const char * id, string & rating_value)
int GameTDB::GetRatingDescriptors(const char * id, safe_vector<string> & desc_list)
{
desc_list.clear();
if(!id)
return -1;
@ -781,7 +789,6 @@ int GameTDB::GetRatingDescriptors(const char * id, safe_vector<string> & desc_li
}
unsigned int list_num = 0;
desc_list.clear();
while(*descriptor_text != '\0')
{
@ -833,6 +840,7 @@ int GameTDB::GetWifiPlayers(const char * id)
int GameTDB::GetWifiFeatures(const char * id, safe_vector<string> & feat_list)
{
feat_list.clear();
if(!id)
return -1;
@ -848,7 +856,6 @@ int GameTDB::GetWifiFeatures(const char * id, safe_vector<string> & feat_list)
}
unsigned int list_num = 0;
feat_list.clear();
while(*feature_text != '\0')
{
@ -905,6 +912,7 @@ int GameTDB::GetPlayers(const char * id)
int GameTDB::GetAccessories(const char * id, safe_vector<Accessory> & acc_list)
{
acc_list.clear();
if(!id)
return -1;
@ -920,7 +928,6 @@ int GameTDB::GetAccessories(const char * id, safe_vector<Accessory> & acc_list)
}
unsigned int list_num = 0;
acc_list.clear();
while(ControlsNode && *ControlsNode != '\0')
{

View File

@ -95,6 +95,7 @@ void CMenu::_showAbout(void)
m_btnMgr.show(m_aboutLblTitle);
m_btnMgr.show(m_aboutLblIOS);
m_btnMgr.show(m_aboutLblInfo,false,true);
if (!m_locked)
m_btnMgr.show(m_aboutBtnSystem);
for (u32 i = 0; i < ARRAY_SIZE(m_aboutLblUser); ++i)
if (m_aboutLblUser[i] != -1u)

View File

@ -40,6 +40,8 @@ extern const u8 drums_png[];
extern const u8 drumsR_png[];
extern const u8 motionplus_png[];
extern const u8 motionplusR_png[];
extern const u8 udraw_png[];
extern const u8 udrawR_png[];
extern const u8 wheel_png[];
extern const u8 zapper_png[];
extern const u8 keyboard_png[];
@ -336,6 +338,7 @@ void CMenu::_textGameInfo(void)
}
//Ratings
m_rating.fromPNG(norating_png);
switch(gameinfo.RatingType)
{
case 0:
@ -350,8 +353,6 @@ void CMenu::_textGameInfo(void)
m_rating.fromPNG(cero_c_png);
else if (gameinfo.RatingValue == "Z")
m_rating.fromPNG(cero_z_png);
else
m_rating.fromPNG(norating_png);
break;
case 1:
//ESRB
@ -367,8 +368,6 @@ void CMenu::_textGameInfo(void)
m_rating.fromPNG(esrb_t_png);
else if (gameinfo.RatingValue == "M")
m_rating.fromPNG(esrb_m_png);
else
m_rating.fromPNG(norating_png);
break;
case 2:
//PEGI
@ -382,8 +381,6 @@ void CMenu::_textGameInfo(void)
m_rating.fromPNG(pegi_16_png);
else if (gameinfo.RatingValue == "18")
m_rating.fromPNG(pegi_18_png);
else
m_rating.fromPNG(norating_png);
break;
default:
break;
@ -428,7 +425,8 @@ void CMenu::_textGameInfo(void)
drums=0,
microphone=0,
wheel=0,
keyboard,
keyboard=0,
udraw = 0,
zapper=0;
//check required controlls
@ -452,6 +450,8 @@ void CMenu::_textGameInfo(void)
microphone=1;
else if (strcmp((acc_itr->Name).c_str(), "balanceboard") == 0)
balanceboard=1;
else if (strcmp((acc_itr->Name).c_str(), "udraw") == 0)
udraw = 1;
}
u8 x = 0;
@ -521,6 +521,12 @@ void CMenu::_textGameInfo(void)
m_btnMgr.setTexture(m_gameinfoLblControlsReq[x] ,m_controlsreq[x], 52, 60);
x++;
}
if(udraw && x < max_controlsReq)
{
m_controlsreq[x].fromPNG(udrawR_png);
m_btnMgr.setTexture(m_gameinfoLblControlsReq[x] ,m_controlsreq[x], 52, 60);
x++;
}
cnt_controlsreq = x;
@ -540,6 +546,7 @@ void CMenu::_textGameInfo(void)
microphone=0,
wheel=0,
keyboard=0,
udraw = 0,
zapper=0;
for (safe_vector<Accessory>::iterator acc_itr = gameinfo.Accessories.begin(); acc_itr != gameinfo.Accessories.end(); acc_itr++)
@ -570,6 +577,8 @@ void CMenu::_textGameInfo(void)
zapper=1;
else if (strcmp((acc_itr->Name).c_str(), "wheel") == 0)
wheel=1;
else if (strcmp((acc_itr->Name).c_str(), "udraw") == 0)
udraw = 1;
}
x = 0;
@ -635,6 +644,12 @@ void CMenu::_textGameInfo(void)
m_btnMgr.setTexture(m_gameinfoLblControls[x] ,m_controls[x], 52, 60);
x++;
}
if(udraw && x < max_controls)
{
m_controls[x].fromPNG(udraw_png);
m_btnMgr.setTexture(m_gameinfoLblControls[x] ,m_controls[x], 52, 60);
x++;
}
if(zapper && x < max_controls)
{
m_controls[x].fromPNG(zapper_png);