Zpět na projekty
TUIX v0.5Beta

Naposledy aktualizováno: 2026-05-20

API registry

Modul registry vystavuje RegistryProxy, malý wrapper nad nativní globální registry. Většina aplikačního kódu má používat scenes.select_scene(); registry.registry.current_scene_name zůstává dostupné pro kompatibilitu a přímé nízkoúrovňové řízení.

Veřejný povrch

PovrchJak použítProč existuje
registry.registryImportujte z tuix.core.registry a přistupujte k jeho property.Poskytuje Python proxy nad nativním stavem registry.
registry.registry.current_scene_nameČtěte nebo přiřazujte názvy scén jako bytes/str; pro běžné přepínání preferujte scenes.select_scene(name).Udržuje kompatibilitu se starším kódem a fallback cestami nastavujícími aktivní scénu přímo.

Pokročilá zrcadlená pole

Když je dostupný nativní stav registry, RegistryProxy může zrcadlit scenes, subcycles, builders, frame_counter, next_uid, terminal_width, terminal_height, terminal_width_old, terminal_height_old a debug_config. Berte je jako diagnostiku, pokud nedebugujete engine.

Použití

from tuix.core import registry, scenes

scenes.select_scene('Main')
active = registry.registry.current_scene_name

# Compatibility path:
registry.registry.current_scene_name = 'Main'
Preferujte API scénV aplikačním kódu nemutujte zrcadlená nízkoúrovňová pole přímo. Používejte raději helpery scenes, buffers, objects a engine.