-if in game settings, dont display game banner with the full

brightness, otherwise its not easy to read the settings for some
games
This commit is contained in:
fix94.1 2012-07-09 20:06:53 +00:00
parent c99e1c0e6c
commit 07fbb21f3b
3 changed files with 14 additions and 3 deletions

View File

@ -43,6 +43,7 @@ void BannerWindow::Init(CVideo *vid, u8 *font1, u8 *font2)
AnimPosX = 0.5f * (ScreenProps.x - fIconWidth); AnimPosX = 0.5f * (ScreenProps.x - fIconWidth);
AnimPosY = 0.5f * (ScreenProps.y - fIconHeight); AnimPosY = 0.5f * (ScreenProps.y - fIconHeight);
AnimationRunning = false; AnimationRunning = false;
Brightness = 0.f;
gameBanner->Clear(); gameBanner->Clear();
if(!FontLoaded) if(!FontLoaded)
@ -217,8 +218,15 @@ void BannerWindow::Draw(void)
// Clear and back to previous projection // Clear and back to previous projection
video->setup2DProjection(); video->setup2DProjection();
GX_InvVtxCache();
GX_InvalidateTexAll(); // If wanted
if(Brightness > 1.f)
DrawRectangle(0.0f, 0.0f, video->width(), video->height(), (GXColor) {0, 0, 0, Brightness});
}
void BannerWindow::SetBrightness(float b)
{
Brightness = b;
} }
void BannerWindow::DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color) void BannerWindow::DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color)

View File

@ -54,6 +54,7 @@ class BannerWindow
void CreateGCBanner(u8 *bnr, CVideo *vid, u8 *font1, u8 *font2, const wchar_t *title); void CreateGCBanner(u8 *bnr, CVideo *vid, u8 *font1, u8 *font2, const wchar_t *title);
void Draw(void); void Draw(void);
bool ToogleZoom(void); bool ToogleZoom(void);
void SetBrightness(float b);
protected: protected:
int MainLoop(); int MainLoop();
void Animate(void); void Animate(void);
@ -72,7 +73,7 @@ class BannerWindow
int returnVal; int returnVal;
int gameSelected; int gameSelected;
dir_discHdr dvdheader; dir_discHdr dvdheader;
float Brightness;
int MaxAnimSteps; int MaxAnimSteps;
int AnimStep; int AnimStep;

View File

@ -521,7 +521,9 @@ void CMenu::_game(bool launch)
m_gameSelected = true; m_gameSelected = true;
m_banner->ToogleZoom(); m_banner->ToogleZoom();
m_banner->SetBrightness(200.f);
_gameSettings(); _gameSettings();
m_banner->SetBrightness(0.f);
m_banner->ToogleZoom(); m_banner->ToogleZoom();
_showGame(); _showGame();