update tests: new scene API
This commit is contained in:
parent
f62362032e
commit
838da4571d
142 changed files with 616 additions and 601 deletions
|
|
@ -9,7 +9,7 @@ class DemoScreen:
|
|||
|
||||
def __init__(self, scene_name):
|
||||
self.scene_name = scene_name
|
||||
mcrfpy.createScene(scene_name)
|
||||
_scene = mcrfpy.Scene(scene_name)
|
||||
self.ui = mcrfpy.sceneUI(scene_name)
|
||||
|
||||
def setup(self):
|
||||
|
|
|
|||
|
|
@ -600,8 +600,8 @@ def create_demo_scene():
|
|||
"""Create and populate the focus system demo scene."""
|
||||
|
||||
# Create scene
|
||||
mcrfpy.createScene("focus_demo")
|
||||
ui = mcrfpy.sceneUI("focus_demo")
|
||||
focus_demo = mcrfpy.Scene("focus_demo")
|
||||
ui = focus_demo.children
|
||||
|
||||
# Background
|
||||
bg = mcrfpy.Frame(
|
||||
|
|
@ -752,10 +752,10 @@ def create_demo_scene():
|
|||
status_text.text = "No widget focused"
|
||||
|
||||
# Activate scene first (keypressScene sets handler for CURRENT scene)
|
||||
mcrfpy.setScene("focus_demo")
|
||||
focus_demo.activate()
|
||||
|
||||
# Register key handler for the now-current scene
|
||||
mcrfpy.keypressScene(on_key)
|
||||
focus_demo.on_key = on_key
|
||||
|
||||
# Set initial focus
|
||||
focus_mgr.focus(0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue