-added option to disable banner in game settings,

banner_in_settings in wiiflow.ini
This commit is contained in:
fix94.1 2012-07-10 12:02:06 +00:00
parent 1b7d76177e
commit 7b4d983f87
5 changed files with 12 additions and 8 deletions

View File

@ -224,9 +224,10 @@ void BannerWindow::Draw(void)
DrawRectangle(0.0f, 0.0f, video->width(), video->height(), (GXColor) {0, 0, 0, Brightness});
}
void BannerWindow::SetBrightness(float b)
void BannerWindow::ToogleGameSettings()
{
Brightness = b;
ToogleZoom();
Brightness = (Brightness > 1.f ? 0.f : 200.f);
}
void BannerWindow::DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color)

View File

@ -51,10 +51,11 @@ class BannerWindow
void LoadBannerBin(u8 *bnr, u32 bnr_size, CVideo *vid, u8 *font1, u8 *font2);
int GetSelectedGame() { return gameSelected; }
bool GetZoomSetting() { return AnimZoom; }
bool GetInGameSettings() { return (Brightness > 1.f ? true : false); }
void CreateGCBanner(u8 *bnr, CVideo *vid, u8 *font1, u8 *font2, const wchar_t *title);
void Draw(void);
bool ToogleZoom(void);
void SetBrightness(float b);
void ToogleGameSettings();
protected:
int MainLoop();
void Animate(void);

View File

@ -134,6 +134,7 @@ CMenu::CMenu(CVideo &vid) :
m_bgCrossFade = 0;
m_bnrSndVol = 0;
m_gameSettingsPage = 0;
m_bnr_settings = true;
m_directLaunch = false;
m_exit = false;
m_initialCoverStatusComplete = false;
@ -454,6 +455,8 @@ void CMenu::init(void)
m_favorites = m_cfg.getBool(domain, "favorites", false);
m_max_categories = m_cat.getInt("GENERAL", "numcategories", 21);
m_bnr_settings = m_cfg.getBool("GENERAL", "banner_in_settings", true);
m_cfg.setString("GAMERCARD", "gamercards", "wiinnertag|dutag");
m_cfg.getString("GAMERCARD", "wiinnertag_url", WIINNERTAG_URL);
m_cfg.getString("GAMERCARD", "wiinnertag_key", "");
@ -1771,7 +1774,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
}
m_fa.draw();
if(m_banner->GetSelectedGame())
if(m_banner->GetSelectedGame() && (!m_banner->GetInGameSettings() || (m_banner->GetInGameSettings() && m_bnr_settings)))
m_banner->Draw();
m_btnMgr.draw();

View File

@ -77,6 +77,7 @@ private:
SmartBuf m_base_font;
u32 m_base_font_size;
u8 m_aa;
bool m_bnr_settings;
bool m_directLaunch;
bool m_locked;
bool m_favorites;

View File

@ -520,11 +520,9 @@ void CMenu::_game(bool launch)
_hideGame();
m_gameSelected = true;
m_banner->ToogleZoom();
m_banner->SetBrightness(200.f);
m_banner->ToogleGameSettings();
_gameSettings();
m_banner->SetBrightness(0.f);
m_banner->ToogleZoom();
m_banner->ToogleGameSettings();
_showGame();
if(!m_gameSound.IsPlaying())