mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +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);
|
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)
|
||||||
|
@ -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;
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user