I'm still working on this and making some progress. I dumped the initial configuration and tried to simplify things a bit just using chained functions:
fe.load_module("scene-creator")
fe.load_module("animate2")
SceneCreator
.scene("main")
.add("artwork", { artwork = "snap", x = 0, y = 0, width = 640, height = 480 } )
.add("image", { id = "darken_art", x = 0, y = 0, width = fe.layout.width, height = fe.layout.height, file_name = "pixel.png", red = 0, green = 0, blue = 0, alpha = 125 })
.add("text", { x = "10 + 50", y = 0, width = 300, height = 30, msg = "[Title]" })
.add("text", { id = "year", x = 25, y = 60, width = 200, height = 30, msg = "[Year]" })
.add("text", { id = "man", x = 25, y = 95, width = 200, height = 30, msg = "[Manufacturer]" })
.add("listbox", { id = "list", x = 350, y = 25, width = 200, height = 300, bg_red = 0, bg_green = 0, bg_blue = 0, bg_alpha = 200 })
.scene("test", { x = 0, y = 380, width = 640, height = 480 } )
.add("image", { file_name = "pixel.png", x = 0, y = 0, width = 640, height = 100, red = 100, green = 50, blue = 100, alpha = 200 })
.add("artwork", { artwork = "snap", x = 0, y = 0, width = 320, height = 240 } )
.add("text", { x = 0, y = 30, width = 640, height = 30, msg = "[Title]" })
.on( "custom1", function(str) {
fe.signal("reload")
})
.on( "Transition.ToNewSelection", function(opts) {
PropertyAnimation( SceneCreator.find("main.year") ).from( { y = 0 } ).to( { y = 60 } ).play()
PropertyAnimation( SceneCreator.find("main.man") ).from( { y = 0 } ).to( { y = 140 } ).play()
})
.on( "Transition.ToNewList", function(opts) {
PropertyAnimation( SceneCreator.find("main.list") ).from( { x = fe.layout.width } ).to( { x = 120 } ).play()
})
So .scene() begins a new scene (aka surface layer) and .add(type) adds an object of the specified type, with the properties provided. Then .on(event) can be used to trigger a function for transition, tick or signal callbacks
You can access the objects by giving them an id property using SceneCreator.find("scene.objectid") - here I'm using it with my animatev2 module to add animations on certain transitions.
If I can get this to work properly like this, you can fairly easily see the scene setup for the layout, and still do custom code later on accessing the objects.
Still working out a bunch of kinks, but let me know if that makes sense or you have any suggestions.