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
|
|
@ -115,18 +115,18 @@ mcrfpy.setScene("metrics_test")
|
|||
ui = mcrfpy.sceneUI("metrics_test")
|
||||
|
||||
# Create various UI elements
|
||||
frame1 = mcrfpy.Frame(10, 10, 200, 150)
|
||||
frame1.fill_color = (100, 100, 100, 128)
|
||||
frame1 = mcrfpy.Frame(pos=(10, 10), size=(200, 150))
|
||||
frame1.fill_color = mcrfpy.Color(100, 100, 100, 128)
|
||||
ui.append(frame1)
|
||||
|
||||
caption1 = mcrfpy.Caption("Test Caption", 50, 50)
|
||||
caption1 = mcrfpy.Caption(pos=(50, 50), text="Test Caption")
|
||||
ui.append(caption1)
|
||||
|
||||
sprite1 = mcrfpy.Sprite(100, 100)
|
||||
sprite1 = mcrfpy.Sprite(pos=(100, 100))
|
||||
ui.append(sprite1)
|
||||
|
||||
# Invisible element (should not count as visible)
|
||||
frame2 = mcrfpy.Frame(300, 10, 100, 100)
|
||||
frame2 = mcrfpy.Frame(pos=(300, 10), size=(100, 100))
|
||||
frame2.visible = False
|
||||
ui.append(frame2)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue