splashscreen-engine 2.0.7__tar.gz → 2.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splashscreen-engine
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: A Python framework for creating splash screens with videos, images, animated loading bars, threaded rendering, transparency, and dynamic UI support.
5
5
  Home-page: https://github.com/NamanChhabra21/splashscreen-engine
6
6
  Author: Naman Chhabra
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as f:
6
6
  setup(
7
7
  name="splashscreen-engine",
8
8
 
9
- version="2.0.7",
9
+ version="2.0.8",
10
10
 
11
11
  py_modules=[
12
12
  "splashscreen_engine",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splashscreen-engine
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: A Python framework for creating splash screens with videos, images, animated loading bars, threaded rendering, transparency, and dynamic UI support.
5
5
  Home-page: https://github.com/NamanChhabra21/splashscreen-engine
6
6
  Author: Naman Chhabra
@@ -307,8 +307,14 @@ class Screen:
307
307
  self.screen.fill(self.bgColor)
308
308
 
309
309
  # DRAW BACKGROUND IMAGE
310
+
310
311
  if self.current_background:
311
- bg = pygame.transform.scale(self.current_background.original_image,(self.width,self.height))
312
+ screen_width, screen_height = self.screen.get_size()
313
+
314
+ bg = pygame.transform.scale(
315
+ self.current_background.original_image,
316
+ (screen_width, screen_height)
317
+ )
312
318
  self.screen.blit(bg,(0, 0))
313
319
  draw_loading_bar(self.screen,self.current_background.ui_elements)
314
320
  draw_text(self.screen,self.current_background.ui_elements)
@@ -588,7 +594,6 @@ class BackgroundVideo:
588
594
 
589
595
  self.play()
590
596
 
591
-
592
597
  def delete(self):
593
598
 
594
599
  analyse.append_function("delete()")
@@ -596,8 +601,12 @@ class BackgroundVideo:
596
601
  self.pause()
597
602
 
598
603
  self.video.reset_frames()
604
+
599
605
  self.frame = None
600
606
 
607
+ if self.parent.foreground_video is self:
608
+ self.parent.foreground_video = None
609
+
601
610
  def transparency(self, level=120):
602
611
 
603
612
  analyse.append_function("transparency()")