Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed May 16, 2020
1 parent e9a15a4 commit f71d4fa
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion include/gfx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
3 changes: 2 additions & 1 deletion source/download.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion source/gfx.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "common.hpp"
extern int fadealpha;

// 3D offsets.
typedef struct _Offset3D {
Expand All @@ -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;
Expand All @@ -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
}
}

Expand Down
5 changes: 2 additions & 3 deletions source/msg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
4 changes: 1 addition & 3 deletions source/screens/updaterScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f71d4fa

Please sign in to comment.