Use aliases for cleaner change tracking

This commit is contained in:
Nick Bisby 2019-04-06 01:15:30 -05:00
parent 8197a91821
commit d2d46465ca
No known key found for this signature in database
GPG Key ID: F6E0C4E6D0B5EB36
2 changed files with 6 additions and 11 deletions

View File

@ -11,8 +11,8 @@
</PanelSet>
</children>
<interface>
<field id="itemData" type="node" onChange="dataChanged" />
<field id="seasonData" type="associativearray" onChange="seasonChanged" />
<field id="itemData" type="node" alias="description.itemContent" />
<field id="seasonData" type="associativearray" alias="seasons.TVSeasonData" />
<field id="panelFocused"
alias="panelset.leftPanelIndex"
type="integer"
@ -34,14 +34,8 @@
panel2.panelSize = "full"
panel2.hasNextPanel = false
panel2.isFullScreen = true
end sub
sub dataChanged()
m.top.findNode("description").itemContent = m.top.itemData
end sub
sub seasonChanged()
m.top.findNode("seasons").TVSeasonData = m.top.seasonData
panel2.leftPosition = 150
' TODO - set the bounds so seasons dont go off the edge of the screen
end sub
sub panelFocusChanged()

View File

@ -382,9 +382,10 @@ sub ShowTVShowDetails(show_id)
themeScene(scene)
scene.itemData = ItemMetaData(show_id)
scene.findNode("description").findNode("buttons").setFocus(true)
scene.seasonData = TVSeasons(show_id)
scene.findNode("panel-desc").findNode("buttons").setFocus(true)
scene.findNode("description").findNode("buttons").setFocus(true)
'buttons = scene.findNode("buttons")
'buttons.observeField("buttonSelected", port)