- minor cosmetic changes.

added Miigotu's game info synopsis and about fix.
added Miigotu's multichoice buttons fix - now button font size can be different than label font size.
changed game info genre to display the whole genre.
changed theme choice button to not display in uppercase.
This commit is contained in:
fledge68 2012-06-27 12:31:48 +00:00
parent ad18bea212
commit eaec483ce6
9 changed files with 18 additions and 21 deletions

View File

@ -10,7 +10,7 @@ const u8 WIIFONT_HASH_KOR[] = {0xb7, 0x15, 0x6d, 0xf0, 0xf4, 0xae, 0x07, 0x8f, 0
#define FONT_NOBOLD 8u #define FONT_NOBOLD 8u
#define TITLEFONT_PT_SZ 36u #define TITLEFONT_PT_SZ 36u
#define BTNFONT_PT_SZ 24u #define BTNFONT_PT_SZ 21u
#define LBLFONT_PT_SZ 24u #define LBLFONT_PT_SZ 24u
#define TEXTFONT_PT_SZ 18u #define TEXTFONT_PT_SZ 18u

View File

@ -674,8 +674,7 @@ bool GameTDB::GetGenres(const char * id, string & gen)
{ {
ptr++; ptr++;
while(*ptr == ' ') ptr++; while(*ptr == ' ') ptr++;
genre[genre_num].push_back('\0'); genre_num++;
genre_num++;
continue; continue;
} }

View File

@ -173,15 +173,13 @@ void CButtonsMgr::setSoundVolume(int vol)
m_soundVolume = min(max(0, vol), 0xFF); m_soundVolume = min(max(0, vol), 0xFF);
} }
void CButtonsMgr::show(u32 id, bool instant, bool synopsis) void CButtonsMgr::show(u32 id, bool instant)
{ {
if (id < m_elts.size()) if (id < m_elts.size())
{ {
CButtonsMgr::SElement &b = *m_elts[id]; CButtonsMgr::SElement &b = *m_elts[id];
b.visible = true; b.visible = true;
b.targetScaleX = 1.0f; b.targetScaleX = 1.0f;
if(synopsis)
b.targetScaleX = 0.9f;
b.targetScaleY = 1.0f; b.targetScaleY = 1.0f;
b.targetPos = Vector3D((float)b.x, (float)b.y, 0); b.targetPos = Vector3D((float)b.x, (float)b.y, 0);
b.targetAlpha = 0xFF; b.targetAlpha = 0xFF;
@ -734,7 +732,7 @@ void CButtonsMgr::_drawLbl(CButtonsMgr::SLabel &b)
guMtxTransApply(modelViewMtx, modelViewMtx, posX, posY, 0.f); guMtxTransApply(modelViewMtx, modelViewMtx, posX, posY, 0.f);
GX_LoadPosMtxImm(modelViewMtx, GX_PNMTX0); GX_LoadPosMtxImm(modelViewMtx, GX_PNMTX0);
if (b.moveByX != 0 || b.moveByY != 0) if (b.moveByX != 0 || b.moveByY != 0)
GX_SetScissor(b.targetPos.x - b.moveByX - m_vid.width()/2, b.targetPos.y - b.moveByY - m_vid.height()/2, b.w, b.h); GX_SetScissor(b.targetPos.x - b.moveByX - b.w/2, b.targetPos.y - b.moveByY - b.h/2, b.w, b.h);
b.text.draw(); b.text.draw();
if (b.moveByX != 0 || b.moveByY != 0) if (b.moveByX != 0 || b.moveByY != 0)

View File

@ -48,7 +48,7 @@ public:
void getDimensions(u32 id, int &x, int &y, u32 &width, u32 &height); void getDimensions(u32 id, int &x, int &y, u32 &width, u32 &height);
void hide(u32 id, int dx, int dy, float scaleX, float scaleY, bool instant = false); void hide(u32 id, int dx, int dy, float scaleX, float scaleY, bool instant = false);
void hide(u32 id, bool instant = false); void hide(u32 id, bool instant = false);
void show(u32 id, bool instant = false, bool synopsis = false); void show(u32 id, bool instant = false);
void mouse(int chan, int x, int y); void mouse(int chan, int x, int y);
void up(void); void up(void);
void down(void); void down(void);

View File

@ -1392,7 +1392,7 @@ u32 CMenu::_addLabel(CMenu::SThemeData &theme, const char *domain, SFont font, c
y = m_theme.getInt(domain, "y", y); y = m_theme.getInt(domain, "y", y);
width = m_theme.getInt(domain, "width", width); width = m_theme.getInt(domain, "width", width);
height = m_theme.getInt(domain, "height", height); height = m_theme.getInt(domain, "height", height);
font = _font(theme.fontSet, domain, "font", LABELFONT); font = _font(theme.fontSet, domain, "font", BUTTONFONT);
STexture texBg = _texture(theme.texSet, domain, "background_texture", bg); STexture texBg = _texture(theme.texSet, domain, "background_texture", bg);
style = _textStyle(domain, "style", style); style = _textStyle(domain, "style", style);

View File

@ -42,7 +42,7 @@ void CMenu::_about(void)
} }
if(first) if(first)
{ {
m_btnMgr.moveBy(m_aboutLblInfo, 0, -(pixels_to_skip * 10)); m_btnMgr.moveBy(m_aboutLblInfo, 0, -1);
amount_of_skips++; amount_of_skips++;
first = false; first = false;
} }
@ -86,7 +86,7 @@ void CMenu::_showAbout(void)
_setBg(m_aboutBg, m_aboutBg); _setBg(m_aboutBg, m_aboutBg);
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);
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)
@ -100,7 +100,7 @@ void CMenu::_initAboutMenu(CMenu::SThemeData &theme)
_addUserLabels(theme, m_aboutLblUser, ARRAY_SIZE(m_aboutLblUser), "ABOUT"); _addUserLabels(theme, m_aboutLblUser, ARRAY_SIZE(m_aboutLblUser), "ABOUT");
m_aboutBg = _texture(theme.texSet, "ABOUT/BG", "texture", theme.bg); m_aboutBg = _texture(theme.texSet, "ABOUT/BG", "texture", theme.bg);
m_aboutLblTitle = _addTitle(theme, "ABOUT/TITLE", theme.titleFont, L"", 20, 30, 600, 75, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE); m_aboutLblTitle = _addTitle(theme, "ABOUT/TITLE", theme.titleFont, L"", 20, 30, 600, 75, theme.titleFontColor, FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE);
m_aboutLblInfo = _addText(theme, "ABOUT/INFO", theme.txtFont, L"", 20, 200, 600, 280, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP); m_aboutLblInfo = _addText(theme, "ABOUT/INFO", theme.txtFont, L"", 40, 120, 560, 280, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
m_aboutLblIOS = _addLabel(theme, "ABOUT/IOS", theme.txtFont, L"", 240, 400, 360, 56, theme.txtFontColor, FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE); m_aboutLblIOS = _addLabel(theme, "ABOUT/IOS", theme.txtFont, L"", 240, 400, 360, 56, theme.txtFontColor, FTGX_JUSTIFY_RIGHT | FTGX_ALIGN_MIDDLE);
_setHideAnim(m_aboutLblTitle, "ABOUT/TITLE", 0, 100, 0.f, 0.f); _setHideAnim(m_aboutLblTitle, "ABOUT/TITLE", 0, 100, 0.f, 0.f);

View File

@ -78,9 +78,9 @@ static void listThemes(const char * path, vector<string> &themes)
dir = readdir(d); dir = readdir(d);
while (dir != 0) while (dir != 0)
{ {
string fileName = upperCase(dir->d_name); string fileName = dir->d_name;
def = def || fileName == "DEFAULT.INI"; def = def || (upperCase(fileName) == "DEFAULT.INI");
if (fileName.size() > 4 && fileName.substr(fileName.size() - 4, 4) == ".INI") if (fileName.size() > 4 && fileName.substr(fileName.size() - 4, 4) == ".ini")
themes.push_back(fileName.substr(0, fileName.size() - 4)); themes.push_back(fileName.substr(0, fileName.size() - 4));
dir = readdir(d); dir = readdir(d);
} }

View File

@ -104,7 +104,7 @@ void CMenu::_gameinfo(void)
} }
if(first && page == 1) if(first && page == 1)
{ {
m_btnMgr.moveBy(m_gameinfoLblSynopsis, 0, -(30)); m_btnMgr.moveBy(m_gameinfoLblSynopsis, 0, -1);
amount_of_skips++; amount_of_skips++;
first = false; first = false;
} }
@ -131,7 +131,7 @@ void CMenu::_gameinfo(void)
amount_of_skips = 0; amount_of_skips = 0;
m_btnMgr.reset(m_gameinfoLblSynopsis); m_btnMgr.reset(m_gameinfoLblSynopsis);
m_btnMgr.setText(m_gameinfoLblSynopsis, wfmt(L"%s", gameinfo.Synopsis.c_str()), true); //, line, false); m_btnMgr.setText(m_gameinfoLblSynopsis, wfmt(L"%s", gameinfo.Synopsis.c_str()));
m_btnMgr.hide(m_gameinfoLblID, true); m_btnMgr.hide(m_gameinfoLblID, true);
m_btnMgr.hide(m_gameinfoLblDev, true); m_btnMgr.hide(m_gameinfoLblDev, true);
@ -157,7 +157,7 @@ void CMenu::_gameinfo(void)
else else
m_btnMgr.show(m_gameinfoLblUser[i]); m_btnMgr.show(m_gameinfoLblUser[i]);
m_btnMgr.show(m_gameinfoLblSynopsis,false,true); m_btnMgr.show(m_gameinfoLblSynopsis,false);
} }
else if (BTN_LEFT_PRESSED && !(m_thrdWorking && m_thrdStop)) else if (BTN_LEFT_PRESSED && !(m_thrdWorking && m_thrdStop))
{ {
@ -266,7 +266,7 @@ void CMenu::_initGameInfoMenu(CMenu::SThemeData &theme)
m_gameinfoLblRlsdate = _addText(theme, "GAMEINFO/RLSDATE", theme.txtFont, L"", 40, 230, 460, 56, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP); m_gameinfoLblRlsdate = _addText(theme, "GAMEINFO/RLSDATE", theme.txtFont, L"", 40, 230, 460, 56, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
m_gameinfoLblRegion = _addText(theme, "GAMEINFO/REGION", theme.txtFont, L"", 40, 260, 460, 56, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP); m_gameinfoLblRegion = _addText(theme, "GAMEINFO/REGION", theme.txtFont, L"", 40, 260, 460, 56, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
m_gameinfoLblRating = _addLabel(theme, "GAMEINFO/RATING", theme.titleFont, L"", 550, 380, 48, 60, theme.titleFontColor, 0, m_rating); m_gameinfoLblRating = _addLabel(theme, "GAMEINFO/RATING", theme.titleFont, L"", 550, 380, 48, 60, theme.titleFontColor, 0, m_rating);
m_gameinfoLblSynopsis = _addText(theme, "GAMEINFO/SYNOPSIS", theme.txtFont, L"", 20, 150, 600, 400, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP); m_gameinfoLblSynopsis = _addText(theme, "GAMEINFO/SYNOPSIS", theme.txtFont, L"", 40, 120, 560, 280, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP);
m_gameinfoLblWifiplayers = _addLabel(theme, "GAMEINFO/WIFIPLAYERS", theme.txtFont, L"", 550, 110, 68, 60, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP,m_wifi); m_gameinfoLblWifiplayers = _addLabel(theme, "GAMEINFO/WIFIPLAYERS", theme.txtFont, L"", 550, 110, 68, 60, theme.txtFontColor, FTGX_JUSTIFY_LEFT | FTGX_ALIGN_TOP,m_wifi);
_addUserLabels(theme, m_gameinfoLblUser, 1, 1, "GAMEINFO"); _addUserLabels(theme, m_gameinfoLblUser, 1, 1, "GAMEINFO");
@ -291,7 +291,7 @@ void CMenu::_initGameInfoMenu(CMenu::SThemeData &theme)
_setHideAnim(m_gameinfoLblID, "GAMEINFO/GAMEID",0, -100, 0.f, 0.f); _setHideAnim(m_gameinfoLblID, "GAMEINFO/GAMEID",0, -100, 0.f, 0.f);
_setHideAnim(m_gameinfoLblTitle, "GAMEINFO/TITLE", 0, -100, 0.f, 0.f); _setHideAnim(m_gameinfoLblTitle, "GAMEINFO/TITLE", 0, -100, 0.f, 0.f);
_setHideAnim(m_gameinfoLblRating, "GAMEINFO/RATING", 100, 0, 0.f, 0.f); _setHideAnim(m_gameinfoLblRating, "GAMEINFO/RATING", 100, 0, 0.f, 0.f);
_setHideAnim(m_gameinfoLblSynopsis, "GAMEINFO/SYNOPSIS", 0, 100, 0.f, 0.f); _setHideAnim(m_gameinfoLblSynopsis, "GAMEINFO/SYNOPSIS", 0, 700, 1.f, 1.f);
_setHideAnim(m_gameinfoLblRegion, "GAMEINFO/REGION", 0, -100, 0.f, 0.f); _setHideAnim(m_gameinfoLblRegion, "GAMEINFO/REGION", 0, -100, 0.f, 0.f);
_setHideAnim(m_gameinfoLblDev, "GAMEINFO/DEVELOPER", 0, -100, 0.f, 0.f); _setHideAnim(m_gameinfoLblDev, "GAMEINFO/DEVELOPER", 0, -100, 0.f, 0.f);
_setHideAnim(m_gameinfoLblPublisher, "GAMEINFO/PUBLISHER", 0, -100, 0.f, 0.f); _setHideAnim(m_gameinfoLblPublisher, "GAMEINFO/PUBLISHER", 0, -100, 0.f, 0.f);

View File

@ -239,7 +239,7 @@ void CMenu::_showSystem(void)
m_btnMgr.show(m_systemLblVersionTxt); m_btnMgr.show(m_systemLblVersionTxt);
m_btnMgr.show(m_systemLblVersion); m_btnMgr.show(m_systemLblVersion);
m_btnMgr.show(m_systemBtnBack); m_btnMgr.show(m_systemBtnBack);
m_btnMgr.show(m_systemLblInfo,false,true); m_btnMgr.show(m_systemLblInfo,false);
m_btnMgr.show(m_systemLblVerSelectVal); m_btnMgr.show(m_systemLblVerSelectVal);
m_btnMgr.show(m_systemBtnVerSelectM); m_btnMgr.show(m_systemBtnVerSelectM);
m_btnMgr.show(m_systemBtnVerSelectP); m_btnMgr.show(m_systemBtnVerSelectP);