mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-11 20:32:13 +08:00
Aethergrid2
This commit is contained in:
@@ -101,6 +101,8 @@ class FontWeight(StrEnum):
|
||||
MEDIUM = "Inter-Medium.fnt"
|
||||
BOLD = "Inter-Bold.fnt"
|
||||
SEMI_BOLD = "Inter-SemiBold.fnt"
|
||||
EXTRA_BOLD = "Inter-ExtraBold.fnt"
|
||||
BLACK = "Inter-Black.fnt"
|
||||
UNIFONT = "unifont.fnt"
|
||||
|
||||
# Small UI fonts
|
||||
|
||||
@@ -54,6 +54,20 @@ class Widget(abc.ABC):
|
||||
def is_pressed(self) -> bool:
|
||||
return any(self.__is_pressed)
|
||||
|
||||
@property
|
||||
def _is_pressed(self) -> bool:
|
||||
return any(self.__is_pressed)
|
||||
|
||||
@_is_pressed.setter
|
||||
def _is_pressed(self, value: bool):
|
||||
if value:
|
||||
for i, tracked in enumerate(self._Widget__tracking_is_pressed):
|
||||
if tracked:
|
||||
self.__is_pressed[i] = True
|
||||
else:
|
||||
for i in range(len(self.__is_pressed)):
|
||||
self.__is_pressed[i] = False
|
||||
|
||||
@property
|
||||
def enabled(self) -> bool:
|
||||
return self._enabled() if callable(self._enabled) else self._enabled
|
||||
|
||||
Reference in New Issue
Block a user