From 458c4c2f0c6cd109a0e6dd7b937101c7712cdaef Mon Sep 17 00:00:00 2001 From: SavageCore Date: Fri, 16 Jun 2023 02:22:08 +0100 Subject: [PATCH] Add up and down arrow by firmware select buttons --- assets/icons/chevron-down-outline.png | Bin 0 -> 239 bytes assets/icons/chevron-down-outline.svg | 52 +++++++++++++++++++++++++ assets/icons/chevron-up-outline.png | Bin 0 -> 233 bytes assets/icons/chevron-up-outline.svg | 53 ++++++++++++++++++++++++++ splash_screen.py | 14 +++++++ 5 files changed, 119 insertions(+) create mode 100644 assets/icons/chevron-down-outline.png create mode 100644 assets/icons/chevron-down-outline.svg create mode 100644 assets/icons/chevron-up-outline.png create mode 100644 assets/icons/chevron-up-outline.svg diff --git a/assets/icons/chevron-down-outline.png b/assets/icons/chevron-down-outline.png new file mode 100644 index 0000000000000000000000000000000000000000..bc495a830b688066c35c50ac813a7932ca26a218 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F5he4R}c>anMprB-l zYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt(m4E{-7{oo~-8aybPGxIJ86 zZFGxAOt2@(tb$i9JfUE>n&87aw)hzeZLftLpB?%6P-fZdNh&{eXC(hjo1bt?Oa5U~ z*QccThi%%&)=s>{u2uGM-?6)sgD2aZ*rph?f%DU6_fG;h+dbYsJ?{8KQOMqsM~i + + + + + + + + + + diff --git a/assets/icons/chevron-up-outline.png b/assets/icons/chevron-up-outline.png new file mode 100644 index 0000000000000000000000000000000000000000..66a069d491fc9e9c60ff2f5c46bbbf099c9dc32c GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjoCO|{#S9F5he4R}c>anMprB-l zYeY$Kep*R+Vo@qXd3m{BW?pu2a$-TMUVc&f>~}U&Kt*MqE{-7{oo_D~avcf~aJ~4( zBgR?EF-Ip@D)$jnlk|zK;2T|r#}CE-abh{UeKz;{nT@|^tX!qQv5zS_=b!3(gXJYl zpNi{0(^($$$?l}OOu>=GCsZXS{pnMi{rr8_bdi|C!~f2{o5OWXl{I^f-J9|i^?Dpl b3wZnw-tFpq{pMi<&;<;hu6{1-oD!M + + + + + + + + + + diff --git a/splash_screen.py b/splash_screen.py index a6e446f..f64b39d 100644 --- a/splash_screen.py +++ b/splash_screen.py @@ -11,6 +11,10 @@ def __init__(self, screen, image_file, background_colour=(0, 0, 0), text="", pad self.padding_bottom = padding_bottom self.padding_left = padding_left self.padding_right = padding_right + self.up_arrow_image = pygame.transform.scale(pygame.image.load( + "assets/icons/chevron-up-outline.png").convert_alpha(), (16, 16)) + self.down_arrow_image = pygame.transform.scale(pygame.image.load( + "assets/icons/chevron-down-outline.png").convert_alpha(), (16, 16)) # Display the splash screen def show(self): @@ -73,6 +77,16 @@ def show(self): # Blit the text onto the screen self.screen.blit(text_surface, (text_x, text_y)) + # Calculate the position to blit the arrow images + arrow_x = screen_width - self.padding_right - self.padding_right + arrow__up_y = 35 + arrow__down_y = arrow__up_y + self.up_arrow_image.get_height() + 10 + + # Blit the arrow images onto the screen + self.screen.blit(self.up_arrow_image, (arrow_x, arrow__up_y)) + self.screen.blit(self.down_arrow_image, + (arrow_x, arrow__down_y + self.up_arrow_image.get_height())) + pygame.display.update() # Remove the splash screen