Skip to content

Commit

Permalink
Fix 3.9 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
eruvanos committed Sep 7, 2024
1 parent ff93ee8 commit 4754599
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions arcade/gui/view.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

from typing import TypeVar

from arcade import View
Expand Down
12 changes: 6 additions & 6 deletions arcade/gui/widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from pyglet.event import EventDispatcher, EVENT_HANDLED, EVENT_UNHANDLED
from pyglet.math import Vec2
from typing_extensions import Self, reveal_type
from typing_extensions import Self

import arcade
from arcade import Sprite, Texture, LBWH, Rect
Expand Down Expand Up @@ -60,15 +60,15 @@ class UIWidget(EventDispatcher, ABC):
rect = Property(LBWH(0, 0, 1, 1))
visible = Property(True)

size_hint = Property[Optional[Tuple[float | None, float | None]]](None)
size_hint_min = Property[Tuple[float, float] | None](None)
size_hint_max = Property[Tuple[float, float] | None](None)
size_hint = Property[Optional[Tuple[Optional[float], Optional[float]]]](None)
size_hint_min = Property[Optional[Tuple[float, float]]](None)
size_hint_max = Property[Optional[Tuple[float, float]]](None)

_children = ListProperty[_ChildEntry]()
_border_width = Property(0)
_border_color = Property(arcade.color.BLACK)
_bg_color = Property[Color | None]()
_bg_tex = Property[Texture | NinePatchTexture | None]()
_bg_color = Property[Optional[Color]]()
_bg_tex = Property[Union[Texture, NinePatchTexture, None]]()
_padding_top = Property(0)
_padding_right = Property(0)
_padding_bottom = Property(0)
Expand Down

0 comments on commit 4754599

Please sign in to comment.