forked from genewildish/Mainline
feat(integration): Complete feature rewrite with pipeline architecture, effects system, and display improvements
Major changes: - Pipeline architecture with capability-based dependency resolution - Effects plugin system with performance monitoring - Display abstraction with multiple backends (terminal, null, websocket) - Camera system for viewport scrolling - Sensor framework for real-time input - Command-and-control system via ntfy - WebSocket display backend for browser clients - Comprehensive test suite and documentation Issue #48: ADR for preset scripting language included This commit consolidates 110 individual commits into a single feature integration that can be reviewed and tested before further refinement.
This commit is contained in:
56
test_ui_simple.py
Normal file
56
test_ui_simple.py
Normal file
@@ -0,0 +1,56 @@
|
||||
"""
|
||||
Simple test for UIPanel integration.
|
||||
"""
|
||||
|
||||
from engine.pipeline.ui import UIPanel, UIConfig, StageControl
|
||||
|
||||
# Create panel
|
||||
panel = UIPanel(UIConfig(panel_width=24))
|
||||
|
||||
# Add some mock stages
|
||||
panel.register_stage(
|
||||
type(
|
||||
"Stage", (), {"name": "noise", "category": "effect", "is_enabled": lambda: True}
|
||||
),
|
||||
enabled=True,
|
||||
)
|
||||
panel.register_stage(
|
||||
type(
|
||||
"Stage", (), {"name": "fade", "category": "effect", "is_enabled": lambda: True}
|
||||
),
|
||||
enabled=False,
|
||||
)
|
||||
panel.register_stage(
|
||||
type(
|
||||
"Stage",
|
||||
(),
|
||||
{"name": "glitch", "category": "effect", "is_enabled": lambda: True},
|
||||
),
|
||||
enabled=True,
|
||||
)
|
||||
panel.register_stage(
|
||||
type(
|
||||
"Stage",
|
||||
(),
|
||||
{"name": "font", "category": "transform", "is_enabled": lambda: True},
|
||||
),
|
||||
enabled=True,
|
||||
)
|
||||
|
||||
# Select first stage
|
||||
panel.select_stage("noise")
|
||||
|
||||
# Render at 80x24
|
||||
lines = panel.render(80, 24)
|
||||
print("\n".join(lines))
|
||||
|
||||
print("\nStage list:")
|
||||
for name, ctrl in panel.stages.items():
|
||||
print(f" {name}: enabled={ctrl.enabled}, selected={ctrl.selected}")
|
||||
|
||||
print("\nToggle 'fade' and re-render:")
|
||||
panel.toggle_stage("fade")
|
||||
lines = panel.render(80, 24)
|
||||
print("\n".join(lines))
|
||||
|
||||
print("\nEnabled stages:", panel.get_enabled_stages())
|
||||
Reference in New Issue
Block a user