crystalwindow 3.8.6__py3-none-any.whl → 3.8.9__py3-none-any.whl
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.
- crystalwindow/clock.py +11 -6
- {crystalwindow-3.8.6.dist-info → crystalwindow-3.8.9.dist-info}/METADATA +1 -1
- {crystalwindow-3.8.6.dist-info → crystalwindow-3.8.9.dist-info}/RECORD +6 -6
- {crystalwindow-3.8.6.dist-info → crystalwindow-3.8.9.dist-info}/WHEEL +0 -0
- {crystalwindow-3.8.6.dist-info → crystalwindow-3.8.9.dist-info}/licenses/LICENSE +0 -0
- {crystalwindow-3.8.6.dist-info → crystalwindow-3.8.9.dist-info}/top_level.txt +0 -0
crystalwindow/clock.py
CHANGED
|
@@ -2,16 +2,21 @@ import time
|
|
|
2
2
|
|
|
3
3
|
class Clock:
|
|
4
4
|
def __init__(self):
|
|
5
|
-
self.
|
|
5
|
+
self.last = time.time()
|
|
6
6
|
self.delta = 0
|
|
7
7
|
self.fps = 60
|
|
8
8
|
|
|
9
|
-
def tick(self, fps=
|
|
9
|
+
def tick(self, fps=None):
|
|
10
10
|
now = time.time()
|
|
11
|
-
self.delta = now - self.
|
|
12
|
-
self.
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
self.delta = now - self.last
|
|
12
|
+
self.last = now
|
|
13
|
+
|
|
14
|
+
if fps:
|
|
15
|
+
self.fps = fps
|
|
16
|
+
sleep_for = (1 / fps) - self.delta
|
|
17
|
+
if sleep_for > 0:
|
|
18
|
+
time.sleep(sleep_for)
|
|
19
|
+
|
|
15
20
|
return self.delta
|
|
16
21
|
|
|
17
22
|
def get_fps(self):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crystalwindow
|
|
3
|
-
Version: 3.8.
|
|
3
|
+
Version: 3.8.9
|
|
4
4
|
Summary: A Tkinter powered window + GUI toolkit made by Crystal (MEEEEEE)! Easier apps, smoother UI and all-in-one helpers!
|
|
5
5
|
Home-page: https://pypi.org/project/crystalwindow/
|
|
6
6
|
Author: CrystalBallyHereXD
|
|
@@ -3,7 +3,7 @@ crystalwindow/__init__.py,sha256=Ugp3GLsfYK_OAA8J9WnGc95P4Uev5fAePmzNNXmpSKQ,214
|
|
|
3
3
|
crystalwindow/animation.py,sha256=zHjrdBXQeyNaLAuaGPldJueX05OZ5j31YR8NizmR0uQ,427
|
|
4
4
|
crystalwindow/assets.py,sha256=2Cj0zdhMWo3mWjdr9KU5n-9_8iKj_fJ9uShMFA-27HU,5193
|
|
5
5
|
crystalwindow/camera.py,sha256=tbn4X-jxMIszAUg3Iu-89gJN5nij0mjPMEzGotcLbJI,712
|
|
6
|
-
crystalwindow/clock.py,sha256=
|
|
6
|
+
crystalwindow/clock.py,sha256=EAcNvxonD7ktkKSIbuVHqzhPhQqtUQtleMSBB_OuUQY,541
|
|
7
7
|
crystalwindow/collision.py,sha256=hpkHTp_KparghVK-itp_rxuYdd2GbQMxICHlUBv0rSw,472
|
|
8
8
|
crystalwindow/color_handler.py,sha256=ZnXnz8552GPiRAnCkW_8wycwRRMAaFRFLlCcsrv0j2E,4071
|
|
9
9
|
crystalwindow/crystal3d.py,sha256=-Te9IJgbtzl8Mpuc4BPi2bn2apnvBNTI2GwxSLd8sqg,2006
|
|
@@ -32,8 +32,8 @@ crystalwindow/gametests/guitesting.py,sha256=SrOssY5peCQEV6TQ1AiOWtjb9phVGdRzW-Q
|
|
|
32
32
|
crystalwindow/gametests/sandbox.py,sha256=Oo2tU2N0y3BPVa6T5vs_h9N6islhQrjSrr_78XLut5I,1007
|
|
33
33
|
crystalwindow/gametests/squaremove.py,sha256=poP2Zjl2oc2HVvIAgIK34H2jVj6otL4jEdvAOR6L9sI,572
|
|
34
34
|
crystalwindow/gametests/windowtesting.py,sha256=_9X6wnV1-_X_PtNS-0zu-k209NtFIwAc4vpxLPp7V2o,97
|
|
35
|
-
crystalwindow-3.8.
|
|
36
|
-
crystalwindow-3.8.
|
|
37
|
-
crystalwindow-3.8.
|
|
38
|
-
crystalwindow-3.8.
|
|
39
|
-
crystalwindow-3.8.
|
|
35
|
+
crystalwindow-3.8.9.dist-info/licenses/LICENSE,sha256=Gt5cJRchdNt0guxyQMHKsATN5PM5mjuDhdO6Gzs9qQc,1096
|
|
36
|
+
crystalwindow-3.8.9.dist-info/METADATA,sha256=FJligl342pLMxbxJzIhvnpyHaserCLpWOsRr7KDzSdI,7340
|
|
37
|
+
crystalwindow-3.8.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
crystalwindow-3.8.9.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
|
|
39
|
+
crystalwindow-3.8.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|