mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-30 15:14:18 +01:00
- 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:
parent
1cb8a493d9
commit
40f3a44fef
BIN
data/images/udraw.png
Normal file
BIN
data/images/udraw.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 806 B |
BIN
data/images/udrawR.png
Normal file
BIN
data/images/udrawR.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
@ -488,6 +488,7 @@ bool GameTDB::FindTitle(char * data, string & title, string langCode)
|
|||||||
|
|
||||||
bool GameTDB::GetTitle(const char * id, string & title)
|
bool GameTDB::GetTitle(const char * id, string & title)
|
||||||
{
|
{
|
||||||
|
title = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -502,6 +503,7 @@ bool GameTDB::GetTitle(const char * id, string & title)
|
|||||||
|
|
||||||
bool GameTDB::GetSynopsis(const char * id, string & synopsis)
|
bool GameTDB::GetSynopsis(const char * id, string & synopsis)
|
||||||
{
|
{
|
||||||
|
synopsis = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -534,6 +536,7 @@ bool GameTDB::GetSynopsis(const char * id, string & synopsis)
|
|||||||
|
|
||||||
bool GameTDB::GetRegion(const char * id, string & region)
|
bool GameTDB::GetRegion(const char * id, string & region)
|
||||||
{
|
{
|
||||||
|
region = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -555,6 +558,7 @@ bool GameTDB::GetRegion(const char * id, string & region)
|
|||||||
|
|
||||||
bool GameTDB::GetDeveloper(const char * id, string & dev)
|
bool GameTDB::GetDeveloper(const char * id, string & dev)
|
||||||
{
|
{
|
||||||
|
dev = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -576,6 +580,7 @@ bool GameTDB::GetDeveloper(const char * id, string & dev)
|
|||||||
|
|
||||||
bool GameTDB::GetPublisher(const char * id, string & pub)
|
bool GameTDB::GetPublisher(const char * id, string & pub)
|
||||||
{
|
{
|
||||||
|
pub = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -644,6 +649,7 @@ bool GameTDB::GetGenres(const char * id, string & gen)
|
|||||||
{
|
{
|
||||||
safe_vector<string> genre;
|
safe_vector<string> genre;
|
||||||
|
|
||||||
|
gen = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
char * data = GetGameNode(id);
|
||||||
@ -738,6 +744,7 @@ int GameTDB::GetRating(const char * id)
|
|||||||
|
|
||||||
bool GameTDB::GetRatingValue(const char * id, string & rating_value)
|
bool GameTDB::GetRatingValue(const char * id, string & rating_value)
|
||||||
{
|
{
|
||||||
|
rating_value = "";
|
||||||
if(!id) return false;
|
if(!id) return false;
|
||||||
|
|
||||||
char * data = GetGameNode(id);
|
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)
|
int GameTDB::GetRatingDescriptors(const char * id, safe_vector<string> & desc_list)
|
||||||
{
|
{
|
||||||
|
desc_list.clear();
|
||||||
if(!id)
|
if(!id)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -781,7 +789,6 @@ int GameTDB::GetRatingDescriptors(const char * id, safe_vector<string> & desc_li
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int list_num = 0;
|
unsigned int list_num = 0;
|
||||||
desc_list.clear();
|
|
||||||
|
|
||||||
while(*descriptor_text != '\0')
|
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)
|
int GameTDB::GetWifiFeatures(const char * id, safe_vector<string> & feat_list)
|
||||||
{
|
{
|
||||||
|
feat_list.clear();
|
||||||
if(!id)
|
if(!id)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -848,7 +856,6 @@ int GameTDB::GetWifiFeatures(const char * id, safe_vector<string> & feat_list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int list_num = 0;
|
unsigned int list_num = 0;
|
||||||
feat_list.clear();
|
|
||||||
|
|
||||||
while(*feature_text != '\0')
|
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)
|
int GameTDB::GetAccessories(const char * id, safe_vector<Accessory> & acc_list)
|
||||||
{
|
{
|
||||||
|
acc_list.clear();
|
||||||
if(!id)
|
if(!id)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -920,7 +928,6 @@ int GameTDB::GetAccessories(const char * id, safe_vector<Accessory> & acc_list)
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int list_num = 0;
|
unsigned int list_num = 0;
|
||||||
acc_list.clear();
|
|
||||||
|
|
||||||
while(ControlsNode && *ControlsNode != '\0')
|
while(ControlsNode && *ControlsNode != '\0')
|
||||||
{
|
{
|
||||||
|
@ -95,6 +95,7 @@ void CMenu::_showAbout(void)
|
|||||||
m_btnMgr.show(m_aboutLblTitle);
|
m_btnMgr.show(m_aboutLblTitle);
|
||||||
m_btnMgr.show(m_aboutLblIOS);
|
m_btnMgr.show(m_aboutLblIOS);
|
||||||
m_btnMgr.show(m_aboutLblInfo,false,true);
|
m_btnMgr.show(m_aboutLblInfo,false,true);
|
||||||
|
if (!m_locked)
|
||||||
m_btnMgr.show(m_aboutBtnSystem);
|
m_btnMgr.show(m_aboutBtnSystem);
|
||||||
for (u32 i = 0; i < ARRAY_SIZE(m_aboutLblUser); ++i)
|
for (u32 i = 0; i < ARRAY_SIZE(m_aboutLblUser); ++i)
|
||||||
if (m_aboutLblUser[i] != -1u)
|
if (m_aboutLblUser[i] != -1u)
|
||||||
|
@ -40,6 +40,8 @@ extern const u8 drums_png[];
|
|||||||
extern const u8 drumsR_png[];
|
extern const u8 drumsR_png[];
|
||||||
extern const u8 motionplus_png[];
|
extern const u8 motionplus_png[];
|
||||||
extern const u8 motionplusR_png[];
|
extern const u8 motionplusR_png[];
|
||||||
|
extern const u8 udraw_png[];
|
||||||
|
extern const u8 udrawR_png[];
|
||||||
extern const u8 wheel_png[];
|
extern const u8 wheel_png[];
|
||||||
extern const u8 zapper_png[];
|
extern const u8 zapper_png[];
|
||||||
extern const u8 keyboard_png[];
|
extern const u8 keyboard_png[];
|
||||||
@ -336,6 +338,7 @@ void CMenu::_textGameInfo(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Ratings
|
//Ratings
|
||||||
|
m_rating.fromPNG(norating_png);
|
||||||
switch(gameinfo.RatingType)
|
switch(gameinfo.RatingType)
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@ -350,8 +353,6 @@ void CMenu::_textGameInfo(void)
|
|||||||
m_rating.fromPNG(cero_c_png);
|
m_rating.fromPNG(cero_c_png);
|
||||||
else if (gameinfo.RatingValue == "Z")
|
else if (gameinfo.RatingValue == "Z")
|
||||||
m_rating.fromPNG(cero_z_png);
|
m_rating.fromPNG(cero_z_png);
|
||||||
else
|
|
||||||
m_rating.fromPNG(norating_png);
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
//ESRB
|
//ESRB
|
||||||
@ -367,8 +368,6 @@ void CMenu::_textGameInfo(void)
|
|||||||
m_rating.fromPNG(esrb_t_png);
|
m_rating.fromPNG(esrb_t_png);
|
||||||
else if (gameinfo.RatingValue == "M")
|
else if (gameinfo.RatingValue == "M")
|
||||||
m_rating.fromPNG(esrb_m_png);
|
m_rating.fromPNG(esrb_m_png);
|
||||||
else
|
|
||||||
m_rating.fromPNG(norating_png);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
//PEGI
|
//PEGI
|
||||||
@ -382,8 +381,6 @@ void CMenu::_textGameInfo(void)
|
|||||||
m_rating.fromPNG(pegi_16_png);
|
m_rating.fromPNG(pegi_16_png);
|
||||||
else if (gameinfo.RatingValue == "18")
|
else if (gameinfo.RatingValue == "18")
|
||||||
m_rating.fromPNG(pegi_18_png);
|
m_rating.fromPNG(pegi_18_png);
|
||||||
else
|
|
||||||
m_rating.fromPNG(norating_png);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -428,7 +425,8 @@ void CMenu::_textGameInfo(void)
|
|||||||
drums=0,
|
drums=0,
|
||||||
microphone=0,
|
microphone=0,
|
||||||
wheel=0,
|
wheel=0,
|
||||||
keyboard,
|
keyboard=0,
|
||||||
|
udraw = 0,
|
||||||
zapper=0;
|
zapper=0;
|
||||||
|
|
||||||
//check required controlls
|
//check required controlls
|
||||||
@ -452,6 +450,8 @@ void CMenu::_textGameInfo(void)
|
|||||||
microphone=1;
|
microphone=1;
|
||||||
else if (strcmp((acc_itr->Name).c_str(), "balanceboard") == 0)
|
else if (strcmp((acc_itr->Name).c_str(), "balanceboard") == 0)
|
||||||
balanceboard=1;
|
balanceboard=1;
|
||||||
|
else if (strcmp((acc_itr->Name).c_str(), "udraw") == 0)
|
||||||
|
udraw = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 x = 0;
|
u8 x = 0;
|
||||||
@ -521,6 +521,12 @@ void CMenu::_textGameInfo(void)
|
|||||||
m_btnMgr.setTexture(m_gameinfoLblControlsReq[x] ,m_controlsreq[x], 52, 60);
|
m_btnMgr.setTexture(m_gameinfoLblControlsReq[x] ,m_controlsreq[x], 52, 60);
|
||||||
x++;
|
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;
|
cnt_controlsreq = x;
|
||||||
|
|
||||||
@ -540,6 +546,7 @@ void CMenu::_textGameInfo(void)
|
|||||||
microphone=0,
|
microphone=0,
|
||||||
wheel=0,
|
wheel=0,
|
||||||
keyboard=0,
|
keyboard=0,
|
||||||
|
udraw = 0,
|
||||||
zapper=0;
|
zapper=0;
|
||||||
|
|
||||||
for (safe_vector<Accessory>::iterator acc_itr = gameinfo.Accessories.begin(); acc_itr != gameinfo.Accessories.end(); acc_itr++)
|
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;
|
zapper=1;
|
||||||
else if (strcmp((acc_itr->Name).c_str(), "wheel") == 0)
|
else if (strcmp((acc_itr->Name).c_str(), "wheel") == 0)
|
||||||
wheel=1;
|
wheel=1;
|
||||||
|
else if (strcmp((acc_itr->Name).c_str(), "udraw") == 0)
|
||||||
|
udraw = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
x = 0;
|
x = 0;
|
||||||
@ -635,6 +644,12 @@ void CMenu::_textGameInfo(void)
|
|||||||
m_btnMgr.setTexture(m_gameinfoLblControls[x] ,m_controls[x], 52, 60);
|
m_btnMgr.setTexture(m_gameinfoLblControls[x] ,m_controls[x], 52, 60);
|
||||||
x++;
|
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)
|
if(zapper && x < max_controls)
|
||||||
{
|
{
|
||||||
m_controls[x].fromPNG(zapper_png);
|
m_controls[x].fromPNG(zapper_png);
|
||||||
|
Loading…
Reference in New Issue
Block a user