File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ def _attempt_font_name_resolution(font_name: FontNameOrNames) -> FontNameOrNames
61
61
:return: Either a resolved path or the original tuple
62
62
"""
63
63
if font_name :
64
-
65
64
# ensure
66
65
if isinstance (font_name , str ):
67
66
font_list : tuple [str , ...] = (font_name ,)
@@ -174,8 +173,8 @@ class Text:
174
173
def __init__ (
175
174
self ,
176
175
text : str ,
177
- x : int ,
178
- y : int ,
176
+ x : float ,
177
+ y : float ,
179
178
color : RGBOrA255 = arcade .color .WHITE ,
180
179
font_size : float = 12 ,
181
180
width : Optional [int ] = 0 ,
@@ -189,7 +188,7 @@ def __init__(
189
188
rotation : float = 0 ,
190
189
batch : Optional [pyglet .graphics .Batch ] = None ,
191
190
group : Optional [pyglet .graphics .Group ] = None ,
192
- z : int = 0 ,
191
+ z : float = 0 ,
193
192
):
194
193
# Raises a RuntimeError if no window for better user feedback
195
194
arcade .get_window ()
@@ -203,9 +202,10 @@ def __init__(
203
202
adjusted_font = _attempt_font_name_resolution (font_name )
204
203
self ._label = pyglet .text .Label (
205
204
text = text ,
206
- x = x ,
207
- y = y ,
208
- z = z ,
205
+ # pyglet is lying about what it takes here and float is entirely valid
206
+ x = x , # type: ignore
207
+ y = y , # type: ignore
208
+ z = z , # type: ignore
209
209
font_name = adjusted_font ,
210
210
font_size = font_size ,
211
211
# use type: ignore since cast is slow & pyglet used Literal
You can’t perform that action at this time.
0 commit comments