mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-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:
parent
c99e1c0e6c
commit
07fbb21f3b
@ -43,6 +43,7 @@ void BannerWindow::Init(CVideo *vid, u8 *font1, u8 *font2)
|
||||
AnimPosX = 0.5f * (ScreenProps.x - fIconWidth);
|
||||
AnimPosY = 0.5f * (ScreenProps.y - fIconHeight);
|
||||
AnimationRunning = false;
|
||||
Brightness = 0.f;
|
||||
|
||||
gameBanner->Clear();
|
||||
if(!FontLoaded)
|
||||
@ -217,8 +218,15 @@ void BannerWindow::Draw(void)
|
||||
|
||||
// Clear and back to previous projection
|
||||
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)
|
||||
|
@ -54,6 +54,7 @@ class BannerWindow
|
||||
void CreateGCBanner(u8 *bnr, CVideo *vid, u8 *font1, u8 *font2, const wchar_t *title);
|
||||
void Draw(void);
|
||||
bool ToogleZoom(void);
|
||||
void SetBrightness(float b);
|
||||
protected:
|
||||
int MainLoop();
|
||||
void Animate(void);
|
||||
@ -72,7 +73,7 @@ class BannerWindow
|
||||
int returnVal;
|
||||
int gameSelected;
|
||||
dir_discHdr dvdheader;
|
||||
|
||||
float Brightness;
|
||||
int MaxAnimSteps;
|
||||
|
||||
int AnimStep;
|
||||
|
@ -521,7 +521,9 @@ void CMenu::_game(bool launch)
|
||||
m_gameSelected = true;
|
||||
|
||||
m_banner->ToogleZoom();
|
||||
m_banner->SetBrightness(200.f);
|
||||
_gameSettings();
|
||||
m_banner->SetBrightness(0.f);
|
||||
m_banner->ToogleZoom();
|
||||
|
||||
_showGame();
|
||||
|
Loading…
Reference in New Issue
Block a user