From 0ddb35d3d7269f0ff383d30db7c22765f59828e8 Mon Sep 17 00:00:00 2001 From: Helloman892 <1565516+Helloman892@users.noreply.github.com> Date: Mon, 4 Sep 2017 22:41:26 +0100 Subject: [PATCH] see #35 percentage bar isn't practical. counter was quite simple. --- include/draw.h | 2 +- source/draw.c | 16 +++++++++------- source/main.c | 3 +-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/draw.h b/include/draw.h index 96004fc..02546b2 100644 --- a/include/draw.h +++ b/include/draw.h @@ -37,7 +37,7 @@ void exit_screens(void); void draw_base_interface(void); void draw_qr(void); void draw_theme_install(int install_type); -void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode); +void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode, int shuffle_theme_count); void draw_splash_install(int install_type); void draw_splash_interface(Splash_s *splashes_list, int splash_count, int selected_splash, bool preview_mode); diff --git a/source/draw.c b/source/draw.c index b77328a..7434203 100644 --- a/source/draw.c +++ b/source/draw.c @@ -117,7 +117,7 @@ void draw_qr(void) void draw_shuffle_selection(int shuffled_theme_count) { - pp2d_draw_text(36, 2, 0.6, 0.6, COLOR_WHITE, "%d/10", shuffled_theme_count); + pp2d_draw_textf(36, 2, 0.6, 0.6, COLOR_WHITE, "%i/10", shuffled_theme_count); } void draw_base_interface(void) @@ -153,13 +153,13 @@ void draw_theme_install(int install_type) switch(install_type) { case 0: - pp2d_draw_text(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a single theme..."); + pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_WHITE, "Installing a single theme..."); break; case 1: - pp2d_draw_text(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a shuffle theme..."); + pp2d_draw_text(70, 120, 0.8, 0.8, COLOR_WHITE, "Installing a shuffle theme..."); break; case 2: - pp2d_draw_text(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing BGM..."); + pp2d_draw_text(120, 120, 0.8, 0.8, COLOR_WHITE, "Installing BGM..."); break; default: break; @@ -167,7 +167,7 @@ void draw_theme_install(int install_type) pp2d_end_draw(); } -void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode) +void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_theme, bool preview_mode, int shuffle_theme_count) { if (themes_list == NULL) @@ -214,6 +214,8 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t pp2d_draw_on(GFX_BOTTOM); + pp2d_draw_textf(7, 3, 0.6, 0.6, COLOR_WHITE, "Selected: %i/10", shuffle_theme_count); + // Scroll the menu up or down if the selected theme is out of its bounds //---------------------------------------------------------------- for (int i = 0; i < theme_count; i++) { @@ -274,10 +276,10 @@ void draw_splash_install(int install_type) switch (install_type) { case SINGLE_INSTALL: - pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Installing a splash..."); + pp2d_draw_textf(130, 110, 0.7, 0.7, COLOR_WHITE, "Installing a splash..."); break; case UNINSTALL: - pp2d_draw_textf(20, 30, 0.7, 0.7, COLOR_WHITE, "Uninstalling a splash..."); + pp2d_draw_textf(130, 110, 0.7, 0.7, COLOR_WHITE, "Uninstalling a splash..."); break; default: break; diff --git a/source/main.c b/source/main.c index 9b36d10..e57a551 100644 --- a/source/main.c +++ b/source/main.c @@ -106,7 +106,7 @@ int main(void) draw_qr(); } else if (!splash_mode) { - draw_theme_interface(themes_list, theme_count, selected_theme, preview_mode); + draw_theme_interface(themes_list, theme_count, selected_theme, preview_mode, shuffle_theme_count); } else { draw_splash_interface(splashes_list, splash_count, selected_splash, preview_mode); } @@ -199,7 +199,6 @@ int main(void) current_theme->in_shuffle = false; } } - draw_shuffle_selection(shuffle_theme_count); } }