crystalwindow 3.6.post5__tar.gz → 3.6.6__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.
- {crystalwindow-3.6.post5/crystalwindow.egg-info → crystalwindow-3.6.6}/PKG-INFO +1 -1
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/sprites.py +13 -3
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6/crystalwindow.egg-info}/PKG-INFO +1 -1
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/setup.py +1 -1
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/LICENSE +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/MANIFEST.in +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/README.md +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/FileHelper.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/Icons/default_icon.png +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/__init__.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/animation.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/assets.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/camera.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/clock.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/collision.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/crystal3d.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/docs/getting_started.md +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/docs/index.md +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/draw_helpers.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/draw_rects.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/draw_text_helper.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/draw_tool.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/fun_helpers.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/3dsquare.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/__init__.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/__main__.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/gravitytest.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/guitesting.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/sandbox.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/squaremove.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gametests/windowtesting.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gravity.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gui.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/gui_ext.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/math.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/player.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/tilemap.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/ver_warner.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow/window.py +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow.egg-info/SOURCES.txt +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow.egg-info/dependency_links.txt +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/crystalwindow.egg-info/top_level.txt +0 -0
- {crystalwindow-3.6.post5 → crystalwindow-3.6.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crystalwindow
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.6
|
|
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
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import random
|
|
1
2
|
from tkinter import PhotoImage
|
|
2
3
|
|
|
3
4
|
class Sprite:
|
|
@@ -21,16 +22,19 @@ class Sprite:
|
|
|
21
22
|
else:
|
|
22
23
|
raise ValueError("Sprite needs either 'size' or 'image'")
|
|
23
24
|
|
|
25
|
+
# optional velocity fields for physics
|
|
26
|
+
self.vel_x = 0
|
|
27
|
+
self.vel_y = 0
|
|
28
|
+
|
|
24
29
|
# === CLASS METHODS ===
|
|
25
30
|
@classmethod
|
|
26
31
|
def image(cls, img, pos):
|
|
32
|
+
# fallback if img is missing
|
|
27
33
|
if isinstance(img, dict) and img.get("fallback"):
|
|
28
34
|
print("⚠️ Missing image, making RANDOM rect fallback.")
|
|
29
35
|
w, h = img["size"]
|
|
30
36
|
color = img["color"]
|
|
31
37
|
return cls.rect(pos, w, h, color=color)
|
|
32
|
-
|
|
33
|
-
# normal image
|
|
34
38
|
return cls(pos, image=img)
|
|
35
39
|
|
|
36
40
|
@classmethod
|
|
@@ -52,11 +56,17 @@ class Sprite:
|
|
|
52
56
|
win.draw_rect(self.color, (draw_x, draw_y, self.width, self.height))
|
|
53
57
|
|
|
54
58
|
def move(self, dx, dy):
|
|
55
|
-
"""Move sprite by dx/dy"""
|
|
59
|
+
"""Move sprite manually by dx/dy"""
|
|
56
60
|
self.x += dx
|
|
57
61
|
self.y += dy
|
|
58
62
|
self.pos = (self.x, self.y)
|
|
59
63
|
|
|
64
|
+
def apply_velocity(self, dt=1):
|
|
65
|
+
"""Apply vel_x/vel_y to x/y for physics"""
|
|
66
|
+
self.x += self.vel_x * dt
|
|
67
|
+
self.y += self.vel_y * dt
|
|
68
|
+
self.pos = (self.x, self.y)
|
|
69
|
+
|
|
60
70
|
# === COLLISION ===
|
|
61
71
|
def colliderect(self, other):
|
|
62
72
|
"""Check if self collides with another sprite"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crystalwindow
|
|
3
|
-
Version: 3.6.
|
|
3
|
+
Version: 3.6.6
|
|
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
|
|
@@ -7,7 +7,7 @@ with open("README.md", encoding="utf-8") as f:
|
|
|
7
7
|
|
|
8
8
|
setup(
|
|
9
9
|
name="crystalwindow",
|
|
10
|
-
version="3.6.
|
|
10
|
+
version="3.6.6", # Force metadata refresh
|
|
11
11
|
packages=find_packages(include=["crystalwindow", "crystalwindow.*"]),
|
|
12
12
|
|
|
13
13
|
include_package_data=True, # include package_data files
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|