crystalwindow 5.3__py3-none-any.whl → 5.5__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/gravity.py +4 -1
- crystalwindow/window.py +17 -8
- {crystalwindow-5.3.dist-info → crystalwindow-5.5.dist-info}/METADATA +1 -1
- {crystalwindow-5.3.dist-info → crystalwindow-5.5.dist-info}/RECORD +7 -7
- {crystalwindow-5.3.dist-info → crystalwindow-5.5.dist-info}/WHEEL +0 -0
- {crystalwindow-5.3.dist-info → crystalwindow-5.5.dist-info}/licenses/LICENSE +0 -0
- {crystalwindow-5.3.dist-info → crystalwindow-5.5.dist-info}/top_level.txt +0 -0
crystalwindow/gravity.py
CHANGED
|
@@ -48,6 +48,7 @@ class Gravity:
|
|
|
48
48
|
# Update gravity
|
|
49
49
|
# -----------------------
|
|
50
50
|
def update(self, dt=1, platforms=[]):
|
|
51
|
+
self.on_ground = False
|
|
51
52
|
# Apply gravity (per frame, not dt scaled)
|
|
52
53
|
self.obj.vel_y += self.force
|
|
53
54
|
if self.obj.vel_y > self.terminal_velocity:
|
|
@@ -64,7 +65,9 @@ class Gravity:
|
|
|
64
65
|
plat_h = getattr(plat, "height", 32)
|
|
65
66
|
|
|
66
67
|
if (x + w > plat.x and x < plat.x + plat_w and
|
|
67
|
-
y + h
|
|
68
|
+
y + h >= plat.y and y < plat.y and
|
|
69
|
+
self.obj.vel_y >= 0):
|
|
70
|
+
|
|
68
71
|
# Land on top
|
|
69
72
|
y = plat.y - h
|
|
70
73
|
self.on_ground = True
|
crystalwindow/window.py
CHANGED
|
@@ -122,17 +122,26 @@ class Window:
|
|
|
122
122
|
self.root.protocol("WM_DELETE_WINDOW", self.quit)
|
|
123
123
|
|
|
124
124
|
# === ICON HANDLING ===
|
|
125
|
-
|
|
125
|
+
# === ICON HANDLING (SAFE + DEFERRED) ===
|
|
126
|
+
self._icon_ref = None # prevent GC
|
|
127
|
+
|
|
128
|
+
if icon:
|
|
126
129
|
try:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
if isinstance(icon, str) and os.path.exists(icon):
|
|
131
|
+
self._icon_ref = tk.PhotoImage(file=icon, master=self.root)
|
|
132
|
+
elif isinstance(icon, tk.PhotoImage):
|
|
133
|
+
self._icon_ref = icon
|
|
134
|
+
if self._icon_ref:
|
|
135
|
+
self.root.iconphoto(True, self._icon_ref)
|
|
136
|
+
|
|
137
|
+
except Exception as e:
|
|
138
|
+
print("⚠️ Icon load failed, using default", e)
|
|
139
|
+
|
|
140
|
+
# fallback logo
|
|
141
|
+
if not self._icon_ref:
|
|
134
142
|
logo = decode_logo()
|
|
135
143
|
if logo:
|
|
144
|
+
self._icon_ref = logo
|
|
136
145
|
self.root.iconphoto(True, logo)
|
|
137
146
|
|
|
138
147
|
# === Canvas setup ===
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: crystalwindow
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.5
|
|
4
4
|
Summary: A Tkinter powered window + GUI toolkit made by Crystal (ME)! Easier apps, smoother UI and all-in-one helpers!, Gui, Buttons, FileHelper, Sprites, Animations, Colors, Math, Gravity, Camera, 3D and more!
|
|
5
5
|
Home-page: https://pypi.org/project/crystalwindow/
|
|
6
6
|
Author: CrystalBallyHereXD
|
|
@@ -16,7 +16,7 @@ crystalwindow/draw_rects.py,sha256=o7siET3y35N2LPeNBGe8QhsQbOH8J-xF6fOUz07rymU,1
|
|
|
16
16
|
crystalwindow/draw_text_helper.py,sha256=qv5fFCuTCKWeGDk9Z_ZpOzrTFP8YYwlgQrrorwrq9Hg,1298
|
|
17
17
|
crystalwindow/draw_tool.py,sha256=1YYEqjmgt4HpV3S15sTjCSmcqgHup4fD8gskTkxU0t4,1638
|
|
18
18
|
crystalwindow/fun_helpers.py,sha256=UHfveBTJ3NlgFd8ZbEJpHtQL-YUWiG7Hl9CWhT06VmQ,5144
|
|
19
|
-
crystalwindow/gravity.py,sha256=
|
|
19
|
+
crystalwindow/gravity.py,sha256=wqVQt1S9ECA69gHdN__xahnm7I4xsFreV5hBzRRN8so,2971
|
|
20
20
|
crystalwindow/gui.py,sha256=9JA25IztgqSYN1NnWVKK99G0rlEosXf2ATWww2rUZIQ,5353
|
|
21
21
|
crystalwindow/gui_ext.py,sha256=JctpNPr7gtGdro3csyUo9ft3FFArj3JhkVlgKF0lyME,3407
|
|
22
22
|
crystalwindow/math.py,sha256=slOY3KQZ99VDMUMxsSJabMyRtJcwVzEyxR2RoXspHho,963
|
|
@@ -26,7 +26,7 @@ crystalwindow/sprites.py,sha256=IADCQetFDQoat3qGpKkH93TdtqqgldfHl4N0HKX1Ajc,7480
|
|
|
26
26
|
crystalwindow/tilemap.py,sha256=endJ8KcbP9EjPvL9qWsOpV4jc_Re1yH080aUyDkwufA,3378
|
|
27
27
|
crystalwindow/ver_warner.py,sha256=qEN3ulc1NixBy15FFx2R3Zu0DhyJTVJwiESGAPwpynM,3373
|
|
28
28
|
crystalwindow/websearch.py,sha256=IgsoKt27yCBHeq8yFVfSq_8sEj5KP6mqn2yNRTsRw1A,5161
|
|
29
|
-
crystalwindow/window.py,sha256=
|
|
29
|
+
crystalwindow/window.py,sha256=i9VRJyVVMQoLzaHbOuZHsdmtmwXRA9h-pL_Tc8Kb5XY,32327
|
|
30
30
|
crystalwindow/Icons/default_icon.png,sha256=Loq27Pxb8Wb3Sz-XwtNF1RmlLNxR4TcfOWfK-1lWcII,7724
|
|
31
31
|
crystalwindow/Icons/file_icons.png,sha256=kqjvz3gMaIbepW4XGrLZOjDYu-yhFbVxjvylS-0RO4U,5659
|
|
32
32
|
crystalwindow/docs/getting_started.md,sha256=e_XEhJk8eatS22MX0nRX7hQNkYkwN9both1ObabZSTw,5759
|
|
@@ -40,8 +40,8 @@ crystalwindow/gametests/sandbox.py,sha256=Oo2tU2N0y3BPVa6T5vs_h9N6islhQrjSrr_78X
|
|
|
40
40
|
crystalwindow/gametests/squaremove.py,sha256=ei6DMnvcgpOhmxbGv-Yqmx5EqiZjKbVlZhI7YbT2hY8,643
|
|
41
41
|
crystalwindow/gametests/testtttagain.py,sha256=oIhK9MGgMVly_W2lRwD9Hn9WyPdd8JnX2HGrLTGZdxY,373
|
|
42
42
|
crystalwindow/gametests/windowtesting.py,sha256=_9X6wnV1-_X_PtNS-0zu-k209NtFIwAc4vpxLPp7V2o,97
|
|
43
|
-
crystalwindow-5.
|
|
44
|
-
crystalwindow-5.
|
|
45
|
-
crystalwindow-5.
|
|
46
|
-
crystalwindow-5.
|
|
47
|
-
crystalwindow-5.
|
|
43
|
+
crystalwindow-5.5.dist-info/licenses/LICENSE,sha256=Gt5cJRchdNt0guxyQMHKsATN5PM5mjuDhdO6Gzs9qQc,1096
|
|
44
|
+
crystalwindow-5.5.dist-info/METADATA,sha256=ZGYHwqby96I0Z_j7qmWzCYHJt3PbhbRKE9lOWppMuUs,7523
|
|
45
|
+
crystalwindow-5.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
46
|
+
crystalwindow-5.5.dist-info/top_level.txt,sha256=PeQSld4b19XWT-zvbYkvE2Xg8sakIMbDzSzSdOSRN8o,14
|
|
47
|
+
crystalwindow-5.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|