- Support tuple argument: grid.at((x, y)) - Support keyword arguments: grid.at(x=5, y=3) - Support pos keyword: grid.at(pos=(2, 8)) - Maintain backward compatibility with grid.at(x, y) - Add comprehensive error handling for invalid arguments Improves API ergonomics and Python-like flexibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
309 B
Python
16 lines
309 B
Python
import mcrfpy
|
|
|
|
# Create a new scene
|
|
mcrfpy.createScene("intro")
|
|
|
|
# Add a text caption
|
|
caption = mcrfpy.Caption((50, 50), "Welcome to McRogueFace!")
|
|
caption.size = 48
|
|
caption.fill_color = (255, 255, 255)
|
|
|
|
# Add to scene
|
|
mcrfpy.sceneUI("intro").append(caption)
|
|
|
|
# Switch to the scene
|
|
mcrfpy.setScene("intro")
|
|
|