Aethergrid2

This commit is contained in:
firestarsdog
2026-04-02 09:58:35 -04:00
parent 30cfcd12d1
commit 57b8f97edf
4 changed files with 144 additions and 131 deletions
+2
View File
@@ -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
+14
View File
@@ -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