diff --git a/include/gfx.hpp b/include/gfx.hpp index f92ecb2..4e74e2d 100644 --- a/include/gfx.hpp +++ b/include/gfx.hpp @@ -22,7 +22,7 @@ typedef u32 Color; namespace GFX { - void DrawTop(); + void DrawTop(bool showVer); void DrawSprite(int img, int x, int y, float ScaleX = 1, float ScaleY = 1); void DrawSpriteBlend(int img, int x, int y, u32 color, float ScaleX = 1, float ScaleY = 1); } diff --git a/source/download.cpp b/source/download.cpp index a268012..aad192b 100644 --- a/source/download.cpp +++ b/source/download.cpp @@ -1015,8 +1015,9 @@ void displayProgressBar() { Gui::clearTextBufs(); C3D_FrameBegin(C3D_FRAME_SYNCDRAW); C2D_TargetClear(Top, BLACK); + C2D_TargetClear(TopRight, BLACK); C2D_TargetClear(Bottom, BLACK); - GFX::DrawTop(); + GFX::DrawTop(false); Gui::ScreenDraw(Bottom); GFX::DrawSprite(sprites_BS_loading_background_idx, 0, 0); Gui::DrawStringCentered(0, 40, 0.65f, BLACK, progressBarMsg, 400); diff --git a/source/gfx.cpp b/source/gfx.cpp index b7562fe..7951c3e 100644 --- a/source/gfx.cpp +++ b/source/gfx.cpp @@ -1,4 +1,5 @@ #include "common.hpp" +extern int fadealpha; // 3D offsets. typedef struct _Offset3D { @@ -13,7 +14,7 @@ Offset3D offset3D[2] = {0.0f, 0.0f}; extern C2D_SpriteSheet sprites; -void GFX::DrawTop(void) { +void GFX::DrawTop(bool showVer) { offset3D[0].topbg = CONFIG_3D_SLIDERSTATE * -7.0f; offset3D[1].topbg = CONFIG_3D_SLIDERSTATE * 7.0f; offset3D[0].twinkle3 = CONFIG_3D_SLIDERSTATE * -6.0f; @@ -36,6 +37,8 @@ void GFX::DrawTop(void) { DrawSprite(sprites_arrow_idx, 41+offset3D[d].updater, 25); DrawSprite(sprites_text_updater_idx, 187+offset3D[d].updater, 151); DrawSprite(sprites_twlm_logo_idx, 127+offset3D[d].logo, 100); + Gui::DrawString(336, 222, 0.50, WHITE, VERSION_STRING); + if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in/out effect } } diff --git a/source/msg.cpp b/source/msg.cpp index 7e52526..474253d 100644 --- a/source/msg.cpp +++ b/source/msg.cpp @@ -8,7 +8,7 @@ void Msg::DisplayMsg(std::string text) { C2D_TargetClear(Top, TRANSPARENT); C2D_TargetClear(TopRight, TRANSPARENT); C2D_TargetClear(Bottom, TRANSPARENT); - GFX::DrawTop(); + GFX::DrawTop(false); Gui::ScreenDraw(Bottom); GFX::DrawSprite(sprites_BS_loading_background_idx, 0, 0); Gui::DrawString(24, 32, 0.45f, BLACK, text); @@ -25,8 +25,7 @@ bool Msg::promptMsg(std::string promptMsg) C2D_TargetClear(Top, TRANSPARENT); C2D_TargetClear(TopRight, TRANSPARENT); C2D_TargetClear(Bottom, TRANSPARENT); - GFX::DrawTop(); - if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in/out effect + GFX::DrawTop(false); Gui::ScreenDraw(Bottom); GFX::DrawSprite(sprites_BS_loading_background_idx, 0, 0); Gui::DrawString(24, 32, 0.5f, BLACK, promptMsg); diff --git a/source/screens/updaterScreen.cpp b/source/screens/updaterScreen.cpp index 98feddc..ff20602 100644 --- a/source/screens/updaterScreen.cpp +++ b/source/screens/updaterScreen.cpp @@ -69,9 +69,7 @@ const char *row_titles2[] = { void UpdaterScreen::Draw(void) const { - GFX::DrawTop(); - Gui::DrawString(336, 222, 0.50, WHITE, VERSION_STRING); - if (fadealpha > 0) Gui::Draw_Rect(0, 0, 400, 240, C2D_Color32(0, 0, 0, fadealpha)); // Fade in/out effect + GFX::DrawTop(true); Gui::ScreenDraw(Bottom); GFX::DrawSprite(sprites_BS_background_idx, 0, 0);