TUIX v0.5Beta
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
| Povrch | Jak použít | Proč existuje |
|---|---|---|
| registry.registry | Importujte 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.