No documentation
QUIT: Any = pygame.QUIT
KEYDOWN: Any = pygame.KEYDOWN
KEYUP: Any = pygame.KEYUP
MOUSEWHEEL: Any = pygame.MOUSEWHEEL
MOUSEMOTION: Any = pygame.MOUSEMOTION
MOUSEBUTTONDOWN: Any = pygame.MOUSEBUTTONDOWN
MOUSEBUTTONUP: Any = pygame.MOUSEBUTTONUP
JOYAXISMOTION: Any = pygame.JOYAXISMOTION
VIDEORESIZE: Any = pygame.VIDEORESIZE
WINDOWFOCUSGAINED: Any = pygame.WINDOWFOCUSGAINED
WINDOWFOCUSLOST: Any = pygame.WINDOWFOCUSLOST
ACTIVEEVENT: Any = pygame.ACTIVEEVENT
No methods defined.
No documentation
left: bool = False
middle: bool = False
right: bool = False
extra_button_1: bool = False
extra_button_2: bool = False
No methods defined.
Tracks input state with proper click detection
mouse_pos: tuple = (0, 0)
mouse_buttons_pressed: MouseButtonPressed = None
mouse_just_pressed: bool = False
mouse_just_released: bool = False
mouse_wheel: float = 0
consumed_events: set = None
active_controller: Optional['Controller'] = None
controller_count: int = 0
using_controller: bool = False
def __post_init__(self: Any) -> Any
def consume_global_mouse(self: Any) -> Any
def is_global_mouse_consumed(self: Any) -> Any
def update(self: Any, mouse_pos: Any, mouse_pressed: Any, mouse_wheel: Any = 0) -> Any
def consume_event(self: Any, element_id: Any) -> Any
def is_event_consumed(self: Any, element_id: Any) -> Any
def clear_consumed(self: Any) -> Any
def get_mouse_state(self: Any) -> Tuple[Tuple[int, int], MouseButtonPressed]
No documentation
def __init__(self: Any, *args: tuple, **kwargs: dict) -> Any
def set_on_change(self: Any, on_change: Callable[[ElementsListEvents, any, Optional[int]], None], parent_element: 'UiElement' = None) -> Any
def append(self: Any, item: Any) -> Any
def insert(self: Any, index: Any, item: Any) -> Any
def extend(self: Any, iterable: Any) -> Any
def remove(self: Any, item: Any) -> Any
def pop(self: Any, index: Any = -1) -> Any
Enumeration of UI render layers.
BACKGROUND: Any = 0
NORMAL: Any = 1
ABOVE_NORMAL: Any = 2
POPUP: Any = 3
MODAL: Any = 4
TOP: Any = 5
No methods defined.
Types of window events supported.
FOCUS_GAINED: Any = 'window_focus_gained'
FOCUS_LOST: Any = 'window_focus_lost'
RESIZED: Any = 'window_resized'
MOVED: Any = 'window_moved'
ENTER: Any = 'window_enter'
LEAVE: Any = 'window_leave'
CLOSE: Any = 'window_close'
MINIMIZED: Any = 'window_minimized'
RESTORED: Any = 'window_restored'
MAXIMIZED: Any = 'window_maximized'
SHOWN: Any = 'window_shown'
HIDDEN: Any = 'window_hidden'
EXPOSED: Any = 'window_exposed'
No methods defined.
Data container for window events.
event_type: WindowEventType = None
timestamp: int = None
window_id: int = None
data: Dict[str, Any] = field(default_factory=dict)
def size(self: Any) -> Optional[Tuple[int, int]]
def position(self: Any) -> Optional[Tuple[int, int]]
Represents a width/height ratio (x, y). Supports arithmetic and scaling.
x: Any = width
y: Any = height
def __new__(cls: Any, x: Union[Number, Tuple[Number, Number]], y: Number = None) -> Any
def width(self: Any) -> float
def height(self: Any) -> float
def med(self: Any) -> float
def scale(self: Any, factor: float) -> 'Ratio'
def clamp(self: Any, min_ratio: 'Ratio' = None, max_ratio: 'Ratio' = None) -> 'Ratio'
def as_int(self: Any) -> Tuple[int, int]
def __add__(self: Any, other: Union[Number, Tuple, 'Ratio']) -> 'Ratio'
def __sub__(self: Any, other: Any) -> Any
def __mul__(self: Any, other: Any) -> Any
def __truediv__(self: Any, other: Any) -> Any
def __radd__(self: Any, other: Any) -> Any
def __rmul__(self: Any, other: Any) -> Any
def __repr__(self: Any) -> Any
No documentation
r: int = None
g: int = None
b: int = None
a: float = None
def __init__(self: Any, r: int, g: int, b: int, a: float = 1.0) -> Any
def random(self: Any) -> 'Color'
def __repr__(self: Any) -> Any
def __str__(self: Any) -> Any
def __add__(self: Any, other: 'Color' | Tuple[int, int, int, float]) -> 'Color'
def __sub__(self: Any, other: 'Color' | Tuple[int, int, int, float]) -> 'Color'
def __mul__(self: Any, other: 'Color' | Tuple[int, int, int, float]) -> 'Color'
def __mod__(self: Any, other: 'Color' | Tuple[int, int, int, float]) -> 'Color'
def __truediv__(self: Any, other: 'Color' | Tuple[int, int, int, float]) -> 'Color'
def from_rgb(cls: Any, r: int, g: int, b: int, a: float = 1.0) -> 'Color'
def from_hex(cls: Any, hex_str: str, a: float = 1.0) -> Optional['Color']
def from_hsv(cls: Any, h: float, s: float, v: float, a: float = 1.0) -> 'Color'
def from_hsl(cls: Any, h: float, s: float, l: float, a: float = 1.0) -> 'Color'
def to_rgb_tuple(self: Any) -> Tuple[int, int, int]
def to_rgba_tuple(self: Any) -> Tuple[int, int, int, int]
def validate(self: Any) -> Any
def toTuple(self: Any) -> Tuple[int, int, int, int]
def toHex(self: Any) -> str
def toHSL(self: Any) -> Tuple[float, float, float]