splashscreen-engine 2.0.0__tar.gz → 2.0.2__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.0
3
+ Version: 2.0.2
4
4
  Summary: A module for making Splash Screens with videos, images, loading bars, text rendering, and threaded rendering support for Applications.
5
5
  Home-page: https://github.com/NamanChhabra21/splashscreen-engine
6
6
  Author: Naman Chhabra
@@ -8,7 +8,7 @@ License: MIT
8
8
  Project-URL: Source, https://github.com/NamanChhabra21/splashscreen-engine
9
9
  Project-URL: Issues, https://github.com/NamanChhabra21/splashscreen-engine/issues
10
10
  Project-URL: Discussions, https://github.com/NamanChhabra21/splashscreen-engine/discussions
11
- Keywords: pygame,splash-screen,loading-screen,python,gui,video,splashscreen,pygame-gui,window,animation,loading,open-cv,naman,chhabra,splash,pypi,github,screen,how to,module,api,example,documentation,README,tkinter,customtkinter,opencv-python,code,2.0.0,player,tutorial
11
+ Keywords: pygame,splash-screen,loading-screen,python,gui,video,splashscreen,pygame-gui,window,animation,loading,open-cv,naman,chhabra,splash,pypi,github,screen,how to,module,api,example,documentation,README,tkinter,customtkinter,opencv-python,code,2.0.2,player,tutorial
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  Requires-Dist: pygame
21
21
  Requires-Dist: opencv-python
22
22
  Requires-Dist: numpy
23
+ Requires-Dist: tkinter
23
24
  Dynamic: author
24
25
  Dynamic: classifier
25
26
  Dynamic: description
@@ -59,7 +60,7 @@ pip install splashscreen-engine
59
60
  ```
60
61
  OR
61
62
  ```bash
62
- pip install splashscreen-engine==2.0.0
63
+ pip install splashscreen-engine==2.0.2
63
64
  ```
64
65
 
65
66
  ## Example
@@ -498,19 +499,31 @@ text = splash.Text(
498
499
  )
499
500
  ```
500
501
 
501
- This places the text:
502
- - Horizontally centered
503
- - 100 pixels above the center
504
-
505
502
  ---
506
-
503
+ ### Getting Documentation
504
+ ```python
505
+ documentation = splash.Documentation()
506
+ ```
507
+ #### Opening Documentation
508
+ This opens `README.md` file on Github
509
+ ```python
510
+ documentation.open()
511
+ ```
512
+ #### Contact Details
513
+ This prints all the contact details
514
+ ```python
515
+ documentation.contact()
516
+ ```
517
+ ---
507
518
  ## Contributing & Feedback
508
519
 
509
520
  Discuss approaches, suggest new features,
510
521
  report bugs, or share improvements through GitHub
511
522
  issues and discussions.
512
523
 
513
- Mail:
524
+ ##### Mail:
514
525
  chhabranaman21@gmail.com
526
+ ##### PyPI:
527
+ https://pypi.org/project/splashscreen-engine
515
528
 
516
529
  ---
@@ -25,7 +25,7 @@ pip install splashscreen-engine
25
25
  ```
26
26
  OR
27
27
  ```bash
28
- pip install splashscreen-engine==2.0.0
28
+ pip install splashscreen-engine==2.0.2
29
29
  ```
30
30
 
31
31
  ## Example
@@ -464,19 +464,31 @@ text = splash.Text(
464
464
  )
465
465
  ```
466
466
 
467
- This places the text:
468
- - Horizontally centered
469
- - 100 pixels above the center
470
-
471
467
  ---
472
-
468
+ ### Getting Documentation
469
+ ```python
470
+ documentation = splash.Documentation()
471
+ ```
472
+ #### Opening Documentation
473
+ This opens `README.md` file on Github
474
+ ```python
475
+ documentation.open()
476
+ ```
477
+ #### Contact Details
478
+ This prints all the contact details
479
+ ```python
480
+ documentation.contact()
481
+ ```
482
+ ---
473
483
  ## Contributing & Feedback
474
484
 
475
485
  Discuss approaches, suggest new features,
476
486
  report bugs, or share improvements through GitHub
477
487
  issues and discussions.
478
488
 
479
- Mail:
489
+ ##### Mail:
480
490
  chhabranaman21@gmail.com
491
+ ##### PyPI:
492
+ https://pypi.org/project/splashscreen-engine
481
493
 
482
494
  ---
@@ -6,14 +6,15 @@ with open("README.md", "r", encoding="utf-8") as f:
6
6
  setup(
7
7
  name="splashscreen-engine",
8
8
 
9
- version="2.0.0",
9
+ version="2.0.2",
10
10
 
11
11
  py_modules=["splashscreen_engine"],
12
12
 
13
13
  install_requires=[
14
14
  "pygame",
15
15
  "opencv-python",
16
- "numpy"
16
+ "numpy",
17
+ "tkinter"
17
18
  ],
18
19
 
19
20
  author="Naman Chhabra",
@@ -63,7 +64,7 @@ setup(
63
64
  "customtkinter",
64
65
  "opencv-python",
65
66
  "code",
66
- "2.0.0",
67
+ "2.0.2",
67
68
  "player",
68
69
  "tutorial"
69
70
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: splashscreen-engine
3
- Version: 2.0.0
3
+ Version: 2.0.2
4
4
  Summary: A module for making Splash Screens with videos, images, loading bars, text rendering, and threaded rendering support for Applications.
5
5
  Home-page: https://github.com/NamanChhabra21/splashscreen-engine
6
6
  Author: Naman Chhabra
@@ -8,7 +8,7 @@ License: MIT
8
8
  Project-URL: Source, https://github.com/NamanChhabra21/splashscreen-engine
9
9
  Project-URL: Issues, https://github.com/NamanChhabra21/splashscreen-engine/issues
10
10
  Project-URL: Discussions, https://github.com/NamanChhabra21/splashscreen-engine/discussions
11
- Keywords: pygame,splash-screen,loading-screen,python,gui,video,splashscreen,pygame-gui,window,animation,loading,open-cv,naman,chhabra,splash,pypi,github,screen,how to,module,api,example,documentation,README,tkinter,customtkinter,opencv-python,code,2.0.0,player,tutorial
11
+ Keywords: pygame,splash-screen,loading-screen,python,gui,video,splashscreen,pygame-gui,window,animation,loading,open-cv,naman,chhabra,splash,pypi,github,screen,how to,module,api,example,documentation,README,tkinter,customtkinter,opencv-python,code,2.0.2,player,tutorial
12
12
  Classifier: Programming Language :: Python :: 3
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
@@ -20,6 +20,7 @@ Description-Content-Type: text/markdown
20
20
  Requires-Dist: pygame
21
21
  Requires-Dist: opencv-python
22
22
  Requires-Dist: numpy
23
+ Requires-Dist: tkinter
23
24
  Dynamic: author
24
25
  Dynamic: classifier
25
26
  Dynamic: description
@@ -59,7 +60,7 @@ pip install splashscreen-engine
59
60
  ```
60
61
  OR
61
62
  ```bash
62
- pip install splashscreen-engine==2.0.0
63
+ pip install splashscreen-engine==2.0.2
63
64
  ```
64
65
 
65
66
  ## Example
@@ -498,19 +499,31 @@ text = splash.Text(
498
499
  )
499
500
  ```
500
501
 
501
- This places the text:
502
- - Horizontally centered
503
- - 100 pixels above the center
504
-
505
502
  ---
506
-
503
+ ### Getting Documentation
504
+ ```python
505
+ documentation = splash.Documentation()
506
+ ```
507
+ #### Opening Documentation
508
+ This opens `README.md` file on Github
509
+ ```python
510
+ documentation.open()
511
+ ```
512
+ #### Contact Details
513
+ This prints all the contact details
514
+ ```python
515
+ documentation.contact()
516
+ ```
517
+ ---
507
518
  ## Contributing & Feedback
508
519
 
509
520
  Discuss approaches, suggest new features,
510
521
  report bugs, or share improvements through GitHub
511
522
  issues and discussions.
512
523
 
513
- Mail:
524
+ ##### Mail:
514
525
  chhabranaman21@gmail.com
526
+ ##### PyPI:
527
+ https://pypi.org/project/splashscreen-engine
515
528
 
516
529
  ---
@@ -10,7 +10,7 @@ os.environ['SDL_VIDEO_CENTERED'] = s
10
10
  # Modules
11
11
  import pygame
12
12
  import cv2
13
- pygame.init()
13
+
14
14
 
15
15
  deleted_by_user = False
16
16
  program_stopped = False
@@ -112,6 +112,15 @@ one_time_warning = True # A variable used for printing warning inside the size()
112
112
  class Screen:
113
113
 
114
114
  def __init__(self,title_bar=False):
115
+
116
+ if not pygame.get_init():
117
+ pygame.init()
118
+
119
+ # Reset Quitting values
120
+ global deleted_by_user,program_stopped
121
+ deleted_by_user = False
122
+ program_stopped = False
123
+
115
124
  # Default Height and Width
116
125
  self.height = 500
117
126
  self.width = 750
@@ -146,6 +155,10 @@ class Screen:
146
155
  # FOREGROUND VIDEO
147
156
  self.foreground_video = None
148
157
 
158
+ # Icon
159
+ self.icon = pygame.image.load("SplashLogo.png")
160
+
161
+
149
162
  # GLOBAL UI
150
163
  self.ui_elements = []
151
164
 
@@ -154,11 +167,16 @@ class Screen:
154
167
 
155
168
 
156
169
 
170
+
171
+
172
+
173
+
157
174
  def get_size(self):
158
175
  return self.width,self.height
159
176
 
160
177
  def start(self):
161
178
 
179
+
162
180
  self.running = True
163
181
 
164
182
  # CREATING SCREEN
@@ -177,11 +195,12 @@ class Screen:
177
195
  # Creates window with title Bar
178
196
  self.screen = pygame.display.set_mode((w, h),pygame.RESIZABLE)
179
197
 
180
-
198
+ pygame.display.set_icon(self.icon.convert_alpha())
181
199
  self.screen.fill(self.bgColor)
182
200
 
183
201
  pygame.display.update()
184
202
 
203
+
185
204
  # BACKGROUND MAINLOOP
186
205
  def mainloop():
187
206
  global program_stopped
@@ -191,6 +210,8 @@ class Screen:
191
210
 
192
211
  self.running = True
193
212
 
213
+
214
+
194
215
  while self.running and not self.stopped:
195
216
 
196
217
  # Updates window size every time you resize
@@ -340,6 +361,14 @@ class Screen:
340
361
 
341
362
  self.bgColor = color
342
363
 
364
+ def set_icon(self,path):
365
+ if not self.title_bar:
366
+ raise RuntimeError("Unable to set Icon, Title Bar is disabled.")
367
+ self.icon = path
368
+ icon_image = pygame.image.load(path).convert_alpha()
369
+ pygame.display.set_icon(icon_image)
370
+
371
+
343
372
 
344
373
  def is_quit(self):
345
374
  if not self.title_bar:
@@ -714,3 +743,24 @@ class Text:
714
743
  def show(self):
715
744
  self.visible = True
716
745
 
746
+ class Documentation:
747
+ def __init__(self):
748
+ self.GithubReadMeLink = "https://github.com/NamanChhabra21/splashscreen-engine/blob/main/README.md"
749
+ self.gmail = "chhabranaman21@gmail.com"
750
+ self.ytChannel = "www.youtube.com/@GenZCoderZShorts"
751
+ self.GithubLink = "https://github.com/NamanChhabra21"
752
+ self.pypi = "https://pypi.org/project/splashscreen-engine/"
753
+ self.issues = "https://github.com//NamanChhabra21//splashscreen-engine//issues"
754
+ self.discussions = "https://github.com/NamanChhabra21/splashscreen-engine/discussions"
755
+
756
+ def open(self):
757
+ os.startfile(self.GithubReadMeLink)
758
+ def contact(self):
759
+ print(f"For Contact & Feedback :\n\
760
+ Github : {self.GithubLink}\n\
761
+ PyPI : {self.pypi}\n\
762
+ YouTube : {self.ytChannel}\n\
763
+ Issues : {self.issues}\n\
764
+ Discussions : {self.discussions}\n\
765
+ Mail : {self.gmail}")
766
+