rokudev / SceneGraphDeveloperExtensions

Other
115 stars 66 forks source link

How to set theme settings? #93

Closed RomanSkrypnyk-main closed 2 years ago

RomanSkrypnyk-main commented 2 years ago
sub Show(args as Object)
    ShowHomeScreen() 
end sub

function ShowHomeScreen() as Object
    m.grid = CreateObject("roSGNode", "GridView") 

m.grid.theme = { 
    backgroundColor: "FFFFFFFF" 
}

m.grid.SetFields({ 
         style: "hero" 
         posterShape: "16x9"  }) 

content = CreateObject("roSGNode", "ContentNode") 
content.AddFields({ 
         HandlerConfigGrid: { 
             name: "HomeCH" 
         }}) 
m.grid.content = content 
m.grid.ObserveField("rowItemSelected", "OnGridItemSelected") 
m.top.ComponentController.CallFunc("show", { 
         view: m.grid 
     }) 
     return m.grid 
end function
RokuChris commented 2 years ago

Colors must be specified in hex, the same as in RSG... "0x8000FFFF"

RomanSkrypnyk-main commented 2 years ago

Thank you. Now I will know. It would be very helpful to add this information to 5-Themes_Guide.md