gale.ui.window module
This file contains the implementation of the class Window: a Panel-backed Container with an optional title and an optional close (“X”) button docked in its top-right corner.
Author: Alejandro Mujica (aledrums@gmail.com)
- class gale.ui.window.Window(x, y, width, height, title='', closable=True, on_close=None, close_button_size=20, children=None, theme=None, visible=True)[source]
Bases:
ContainerA Panel-backed Container with an optional title and an optional close (“X”) button docked in its top-right corner, the way a desktop window or an in-game modal dialog (an inventory, a pause menu, a dialogue box the player can dismiss early) is closed.
Usage example:
- def on_close():
print(“closed”)
- window = Window(
160, 90, 320, 220, title=”Inventory”, on_close=on_close, children=[ListView(…)],
)
- Parameters: