Update test demos for new Python API and entity system
- Update all text input demos to use new Entity constructor signature - Fix pathfinding showcase to work with new entity position handling - Remove entity_waypoints tracking in favor of simplified movement - Delete obsolete exhaustive_api_demo.py (superseded by newer demos) - Adjust entity creation calls to match Entity((x, y), texture, sprite_index) pattern All demos now properly demonstrate the updated API while maintaining their original functionality for showcasing engine features. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
6d29652ae7
commit
c5e7e8e298
6 changed files with 37 additions and 1241 deletions
|
|
@ -95,8 +95,7 @@ class TextInput:
|
|||
self.label_text = mcrfpy.Caption(
|
||||
self.x - 5,
|
||||
self.y - self.font_size - 5,
|
||||
self.label,
|
||||
font_size=self.font_size
|
||||
self.label
|
||||
)
|
||||
self.label_text.color = (255, 255, 255, 255)
|
||||
|
||||
|
|
@ -104,8 +103,7 @@ class TextInput:
|
|||
self.text_display = mcrfpy.Caption(
|
||||
self.x + 4,
|
||||
self.y + 4,
|
||||
"",
|
||||
font_size=self.font_size
|
||||
""
|
||||
)
|
||||
self.text_display.color = (0, 0, 0, 255)
|
||||
|
||||
|
|
@ -227,12 +225,12 @@ def create_demo():
|
|||
scene.append(bg)
|
||||
|
||||
# Title
|
||||
title = mcrfpy.Caption(10, 10, "Text Input Widget Demo", font_size=24)
|
||||
title = mcrfpy.Caption(10, 10, "Text Input Widget Demo")
|
||||
title.color = (255, 255, 255, 255)
|
||||
scene.append(title)
|
||||
|
||||
# Instructions
|
||||
instructions = mcrfpy.Caption(10, 50, "Click to focus, Tab to switch fields, Type to enter text", font_size=14)
|
||||
instructions = mcrfpy.Caption(10, 50, "Click to focus, Tab to switch fields, Type to enter text")
|
||||
instructions.color = (200, 200, 200, 255)
|
||||
scene.append(instructions)
|
||||
|
||||
|
|
@ -276,7 +274,7 @@ def create_demo():
|
|||
fields.append(comment_input)
|
||||
|
||||
# Result display
|
||||
result_text = mcrfpy.Caption(50, 320, "Type in the fields above...", font_size=14)
|
||||
result_text = mcrfpy.Caption(50, 320, "Type in the fields above...")
|
||||
result_text.color = (150, 255, 150, 255)
|
||||
scene.append(result_text)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue