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
|
|
@ -28,11 +28,11 @@ class TextInput:
|
|||
# Label
|
||||
if self.label:
|
||||
self.label_caption = mcrfpy.Caption(self.label, self.x, self.y - 20)
|
||||
self.label_caption.color = (255, 255, 255, 255)
|
||||
self.label_caption.fill_color = (255, 255, 255, 255)
|
||||
|
||||
# Text display
|
||||
self.text_caption = mcrfpy.Caption("", self.x + 4, self.y + 4)
|
||||
self.text_caption.color = (0, 0, 0, 255)
|
||||
self.text_caption.fill_color = (0, 0, 0, 255)
|
||||
|
||||
# Cursor (a simple vertical line using a frame)
|
||||
self.cursor = mcrfpy.Frame(self.x + 4, self.y + 4, 2, 16)
|
||||
|
|
@ -176,7 +176,7 @@ def create_scene():
|
|||
|
||||
# Title
|
||||
title = mcrfpy.Caption("Text Input Widget Demo", 10, 10)
|
||||
title.color = (255, 255, 255, 255)
|
||||
title.fill_color = (255, 255, 255, 255)
|
||||
scene.append(title)
|
||||
|
||||
# Create input fields
|
||||
|
|
@ -194,7 +194,7 @@ def create_scene():
|
|||
|
||||
# Status text
|
||||
status = mcrfpy.Caption("Click to focus, type to enter text", 50, 280)
|
||||
status.color = (200, 200, 200, 255)
|
||||
status.fill_color = (200, 200, 200, 255)
|
||||
scene.append(status)
|
||||
|
||||
# Keyboard handler
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue