Merge pull request #1645 from cewert/fix-homeitem-crash
This commit is contained in:
commit
5be021e662
|
@ -21,9 +21,17 @@ sub init()
|
||||||
m.showProgressBarField = m.top.findNode("showProgressBarField")
|
m.showProgressBarField = m.top.findNode("showProgressBarField")
|
||||||
|
|
||||||
' Randomize the background colors
|
' Randomize the background colors
|
||||||
|
backdropColor = "#00a4db" ' set default in case global var is invalid
|
||||||
|
localGlobal = m.global
|
||||||
|
|
||||||
|
if isValid(localGlobal) and isValid(localGlobal.constants) and isValid(localGlobal.constants.poster_bg_pallet)
|
||||||
|
posterBackgrounds = localGlobal.constants.poster_bg_pallet
|
||||||
|
backdropColor = posterBackgrounds[rnd(posterBackgrounds.count()) - 1]
|
||||||
|
end if
|
||||||
|
|
||||||
|
' update the backdrop node
|
||||||
m.backdrop = m.top.findNode("backdrop")
|
m.backdrop = m.top.findNode("backdrop")
|
||||||
posterBackgrounds = m.global.constants.poster_bg_pallet
|
m.backdrop.color = backdropColor
|
||||||
m.backdrop.color = posterBackgrounds[rnd(posterBackgrounds.count()) - 1]
|
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user