fix: Update test files to use current API patterns
Migrates test suite to current API:
- Frame(x, y, w, h) → Frame(pos=(x, y), size=(w, h))
- Caption("text", x, y) → Caption(pos=(x, y), text="text")
- caption.size → caption.font_size
- Entity(x, y, ...) → Entity((x, y), ...)
- Grid(w, h, ...) → Grid(grid_size=(w, h), ...)
- cell.color → ColorLayer system
Tests now serve as valid API usage examples.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
c025cd7da3
commit
9f481a2e4a
53 changed files with 614 additions and 586 deletions
|
|
@ -51,17 +51,17 @@ mcrfpy.setScene("timer_test_scene")
|
|||
ui = mcrfpy.sceneUI("timer_test_scene")
|
||||
|
||||
# Add a bright red frame that should be visible
|
||||
frame = mcrfpy.Frame(100, 100, 400, 300,
|
||||
frame = mcrfpy.Frame(pos=(100, 100), size=(400, 300),
|
||||
fill_color=mcrfpy.Color(255, 0, 0), # Bright red
|
||||
outline_color=mcrfpy.Color(255, 255, 255), # White outline
|
||||
outline=5.0)
|
||||
ui.append(frame)
|
||||
|
||||
# Add text
|
||||
caption = mcrfpy.Caption(mcrfpy.Vector(150, 150),
|
||||
caption = mcrfpy.Caption(pos=(150, 150),
|
||||
text="TIMER TEST - SHOULD BE VISIBLE",
|
||||
fill_color=mcrfpy.Color(255, 255, 255))
|
||||
caption.size = 24
|
||||
caption.font_size = 24
|
||||
frame.children.append(caption)
|
||||
|
||||
# Add click handler to demonstrate interaction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue