213 lines
7.1 KiB
Python
213 lines
7.1 KiB
Python
"""Type stubs for McRogueFace Python API.
|
|
|
|
Auto-generated - do not edit directly.
|
|
"""
|
|
|
|
from typing import Any, List, Dict, Tuple, Optional, Callable, Union
|
|
|
|
# Module documentation
|
|
# McRogueFace Python API
|
|
#
|
|
# Core game engine interface for creating roguelike games with Python.
|
|
|
|
# Classes
|
|
|
|
class Animation:
|
|
"""Animation object for animating UI properties"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def complete(self) -> None: ...
|
|
def get_current_value(self) -> Any: ...
|
|
def hasValidTarget(self) -> bool: ...
|
|
def start(selftarget: UIDrawable) -> None: ...
|
|
def update(selfdelta_time: float) -> bool: ...
|
|
|
|
class Caption:
|
|
"""Caption(pos=None, font=None, text='', **kwargs)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def get_bounds(self) -> tuple: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
|
|
class Color:
|
|
"""SFML Color Object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def from_hex(selfhex_string: str) -> Color: ...
|
|
def lerp(selfother: Color, t: float) -> Color: ...
|
|
def to_hex(self) -> str: ...
|
|
|
|
class Drawable:
|
|
"""Base class for all drawable UI elements"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def get_bounds(self) -> tuple: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
|
|
class Entity:
|
|
"""Entity(grid_pos=None, texture=None, sprite_index=0, **kwargs)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def at(self, *args, **kwargs) -> Any: ...
|
|
def die(self, *args, **kwargs) -> Any: ...
|
|
def get_bounds(self) -> tuple: ...
|
|
def index(self, *args, **kwargs) -> Any: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def path_to(selfx: int, y: int) -> bool: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
def update_visibility(self) -> None: ...
|
|
|
|
class EntityCollection:
|
|
"""Iterable, indexable collection of Entities"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def append(self, *args, **kwargs) -> Any: ...
|
|
def count(self, *args, **kwargs) -> Any: ...
|
|
def extend(self, *args, **kwargs) -> Any: ...
|
|
def index(self, *args, **kwargs) -> Any: ...
|
|
def remove(self, *args, **kwargs) -> Any: ...
|
|
|
|
class Font:
|
|
"""SFML Font Object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class Frame:
|
|
"""Frame(pos=None, size=None, **kwargs)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def get_bounds(self) -> tuple: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
|
|
class Grid:
|
|
"""Grid(pos=None, size=None, grid_size=None, texture=None, **kwargs)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def at(self, *args, **kwargs) -> Any: ...
|
|
def compute_astar_path(selfx1: int, y1: int, x2: int, y2: int, diagonal_cost: float = 1.41) -> List[Tuple[int, int]]: ...
|
|
def compute_dijkstra(selfroot_x: int, root_y: int, diagonal_cost: float = 1.41) -> None: ...
|
|
def compute_fov(selfx: int, y: int, radius: int = 0, light_walls: bool = True, algorithm: int = FOV_BASIC) -> List[Tuple[int, int, bool, bool]]: ...
|
|
def find_path(selfx1: int, y1: int, x2: int, y2: int, diagonal_cost: float = 1.41) -> List[Tuple[int, int]]: ...
|
|
def get_bounds(self) -> tuple: ...
|
|
def get_dijkstra_distance(selfx: int, y: int) -> Optional[float]: ...
|
|
def get_dijkstra_path(selfx: int, y: int) -> List[Tuple[int, int]]: ...
|
|
def is_in_fov(selfx: int, y: int) -> bool: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
|
|
class GridPoint:
|
|
"""UIGridPoint object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class GridPointState:
|
|
"""UIGridPointState object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class Scene:
|
|
"""Base class for object-oriented scenes"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def activate(self) -> None: ...
|
|
def get_ui(self) -> UICollection: ...
|
|
def register_keyboard(selfcallback: callable) -> None: ...
|
|
|
|
class Sprite:
|
|
"""Sprite(pos=None, texture=None, sprite_index=0, **kwargs)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def get_bounds(self) -> tuple: ...
|
|
def move(selfdx: float, dy: float) -> None: ...
|
|
def resize(selfwidth: float, height: float) -> None: ...
|
|
|
|
class Texture:
|
|
"""SFML Texture Object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class Timer:
|
|
"""Timer(name, callback, interval, once=False)"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def cancel(self) -> None: ...
|
|
def pause(self) -> None: ...
|
|
def restart(self) -> None: ...
|
|
def resume(self) -> None: ...
|
|
|
|
class UICollection:
|
|
"""Iterable, indexable collection of UI objects"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def append(self, *args, **kwargs) -> Any: ...
|
|
def count(self, *args, **kwargs) -> Any: ...
|
|
def extend(self, *args, **kwargs) -> Any: ...
|
|
def index(self, *args, **kwargs) -> Any: ...
|
|
def remove(self, *args, **kwargs) -> Any: ...
|
|
|
|
class UICollectionIter:
|
|
"""Iterator for a collection of UI objects"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class UIEntityCollectionIter:
|
|
"""Iterator for a collection of UI objects"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
class Vector:
|
|
"""SFML Vector Object"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def angle(self) -> float: ...
|
|
def copy(self) -> Vector: ...
|
|
def distance_to(selfother: Vector) -> float: ...
|
|
def dot(selfother: Vector) -> float: ...
|
|
def magnitude(self) -> float: ...
|
|
def magnitude_squared(self) -> float: ...
|
|
def normalize(self) -> Vector: ...
|
|
|
|
class Window:
|
|
"""Window singleton for accessing and modifying the game window properties"""
|
|
def __init__(selftype(self)) -> None: ...
|
|
|
|
def center(self) -> None: ...
|
|
def get(self) -> Window: ...
|
|
def screenshot(selffilename: str = None) -> bytes | None: ...
|
|
|
|
# Functions
|
|
|
|
def createScene(name: str) -> None: ...
|
|
def createSoundBuffer(filename: str) -> int: ...
|
|
def currentScene() -> str: ...
|
|
def delTimer(name: str) -> None: ...
|
|
def exit() -> None: ...
|
|
def find(name: str, scene: str = None) -> UIDrawable | None: ...
|
|
def findAll(pattern: str, scene: str = None) -> list: ...
|
|
def getMetrics() -> dict: ...
|
|
def getMusicVolume() -> int: ...
|
|
def getSoundVolume() -> int: ...
|
|
def keypressScene(handler: callable) -> None: ...
|
|
def loadMusic(filename: str) -> None: ...
|
|
def playSound(buffer_id: int) -> None: ...
|
|
def sceneUI(scene: str = None) -> list: ...
|
|
def setMusicVolume(volume: int) -> None: ...
|
|
def setScale(multiplier: float) -> None: ...
|
|
def setScene(scene: str, transition: str = None, duration: float = 0.0) -> None: ...
|
|
def setSoundVolume(volume: int) -> None: ...
|
|
def setTimer(name: str, handler: callable, interval: int) -> None: ...
|
|
|
|
# Constants
|
|
|
|
FOV_BASIC: int
|
|
FOV_DIAMOND: int
|
|
FOV_PERMISSIVE_0: int
|
|
FOV_PERMISSIVE_1: int
|
|
FOV_PERMISSIVE_2: int
|
|
FOV_PERMISSIVE_3: int
|
|
FOV_PERMISSIVE_4: int
|
|
FOV_PERMISSIVE_5: int
|
|
FOV_PERMISSIVE_6: int
|
|
FOV_PERMISSIVE_7: int
|
|
FOV_PERMISSIVE_8: int
|
|
FOV_RESTRICTIVE: int
|
|
FOV_SHADOW: int
|
|
default_font: Any
|
|
default_texture: Any |