Skip to content

Commit

Permalink
clockwise?
Browse files Browse the repository at this point in the history
  • Loading branch information
shenjackyuanjie committed Jul 26, 2024
1 parent 114f3c6 commit 695fad3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Difficult_Rocket/gui/widget/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ def _get_vertices(self) -> Sequence[float]:
))
# fmt: on

def _update_vertices(self) -> None:
self._vertex_list.position[:] = self._get_vertices() # pyright: ignore reportAttributeAccessIssue

def _create_vertex_list(self) -> None:
# 1 2
# 4 3
Expand Down Expand Up @@ -154,6 +157,10 @@ def width(self) -> float:
def height(self) -> float:
return self.height

@property
def clockwise(self) -> bool:
return self._clockwise

@thick1.setter
def thick1(self, value: float):
self._thick1 = value
Expand All @@ -174,6 +181,11 @@ def height(self, value: float):
self._height = value
self._update_vertices()

@clockwise.setter
def clockwise(self, value: bool):
self._clockwise = bool(value)
self._update_vertices()


class BaseButtonTheme:
"""
Expand Down

0 comments on commit 695fad3

Please sign in to comment.