Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SoN9ne
Level 8

ListScreenTitleColor not working - roListScreen.SetHeader()

Hello,

I have developed a theme for my channel. The theme works and looks as I expect with the exception of the title on the main page (roListScreen).

As you can see with the code below, I am setting the title by using "screen.SetHeader()". Now I do notice a "screen.SetTitle()" but when I use this I don't see anything on the screen for a title.
Basically, I am trying to find out how to change the "title text" (or in this case, header text?) color. I have a dark blue background and the text stays a darkish grey. I am trying to make it white.

Hopefully someone can push me in the right direction.

main.brs
' ******************************************************************
' * This is the main function, this is the channel's starting point
' ******************************************************************
Sub Main()
print "Channel Initialized - ";
' Initialize the theme
InitTheme()
' Create screen and event listener port (roMessagePort)
screen = CreateObject("roListScreen")
port = CreateObject("roMessagePort")
' Set lister port to screen
screen.SetMessagePort(port)
' Set screen content title
screen.SetHeader( tr("Welcome to the Sonlife Network") )
' Initialize content list (main page)
contentListOptions = MainContentList()
' Assign the content list to the screen
screen.SetContent(contentListOptions)
' Show the content list
screen.show()
' Keep channel open and monitor event listener
while (true)
' Define event
event = wait(0, port)
' Check if current screen event
if (type(event) = "roListScreenEvent")
print "----------------------[ Main Page | roListScreenEvent ]----------------------"
' Check for focused item
if (event.isListItemFocused())
print "Calling Title for index: " ; event.GetIndex()
' Update breadcrumb
screen.SetBreadcrumbText(tr("Menu"), contentListOptions[event.GetIndex()].Title)
print "Calling Title Complete"
else if (event.isListItemSelected())
print "Calling Callback for index: " ; event.GetIndex() ; " - " ; contentListOptions[event.GetIndex()].Title
' Do callback when selected
contentListOptions[event.GetIndex()].CallBack()
print "Callback Complete"
endif
endif ' End Check for events
end while ' End Keep channel open
End Sub

' Checks if display is HD
Function isHD() As Boolean
di = CreateObject("roDeviceInfo")
if di.GetDisplayType() = "HDTV"
print "HDTV"
return true
else
print "Regular TV"
return false
end if
End Function

' Gets the current locale
Function getLocale() As String
di = CreateObject("roDeviceInfo")
return di.GetCurrentLocale()
End Function


theme.brs
' Main theme of the channel
Function InitTheme() as void
print "InitTheme Start - ";
app = CreateObject("roAppManager")
fontColor = "#FFFFFF"
brandingColor = "#274a73"
backgroundColor = "#274a73"
theme = {
BackgroundColor: backgroundColor

OverhangSliceHD: "pkg://locale/default/images/overhang_slice_hd.png"
OverhangSliceSD: "pkg://locale/default/images/overhang_slice_hd.png"

OverhangPrimaryLogoHD: "pkg://locale/default/images/overhang_logo_hd.png"
OverhangPrimaryLogoOffsetHD_X: "10"
OverhangPrimaryLogoOffsetHD_Y: "10"

OverhangPrimaryLogoSD: "pkg://locale/default/images/overhang_logo_hd.png"
OverhangPrimaryLogoOffsetSD_X: "10"
OverhangPrimaryLogoOffsetSD_Y: "10"



'OverhangLogoHD: "pkg://locale/default/images/channel_diner_logo.png"
'OverhangLogoSD: "pkg://locale/default/images/channel_diner_logo.png"

'OverhangOffsetSD_X: "25"
'OverhangOffsetSD_Y: "0"
'OverhangOffsetHD_X: "60"
'OverhangOffsetHD_Y: "30"

BreadcrumbTextLeft: brandingColor
BreadcrumbTextRight: "#333333"
BreadcrumbDelimiter: brandingColor

ParagraphHeaderText: fontColor
ParagraphBodyText: fontColor

ListItemHighlightText: fontColor
ListItemText: fontColor
ListScreenTitleColor: fontColor
ListScreenDescriptionText: fontColor
ButtonHighlightColor: fontColor

'ListItemHighlightHD: "pkg://locale/default/images/select_bkgnd.png"
'ListItemHighlightSD: "pkg://locale/default/images/select_bkgnd.png"

CounterTextLeft: brandingColor
CounterSeparator: brandingColor

GridScreenBackgroundColor: backgroundColor
GridScreenListNameColor: brandingColor
GridScreenDescriptionTitleColor: brandingColor

'GridScreenLogoHD: "pkg://locale/default/images/channel_diner_logo.png"
'GridScreenLogoSD: "pkg://locale/default/images/channel_diner_logo.png"

'GridScreenOverhangHeightHD: "90"
'GridScreenOverhangHeightSD: "90"
'GridScreenOverhangSliceHD: "pkg://locale/default/images/Overhang_Slice_HD.png"
'GridScreenOverhangSliceSD: "pkg://locale/default/images/Overhang_Slice_HD.png"

'GridScreenLogoOffsetHD_X: "60"
'GridScreenLogoOffsetHD_Y: "0"
'GridScreenLogoOffsetSD_X: "25"
'GridScreenLogoOffsetSD_Y: "0"
}
app.SetTheme( theme )
print "InitTheme End - ";
End Function
0 Kudos
3 REPLIES 3
RokuChris
Roku Employee
Roku Employee

Re: ListScreenTitleColor not working - roListScreen.SetHeade

Try ListScreenHeaderText
0 Kudos
SoN9ne
Level 8

Re: ListScreenTitleColor not working - roListScreen.SetHeade

"RokuChris" wrote:
Try ListScreenHeaderText


Thank you!

How much is not in the SDK?! I didn't see that on this page. I was about to leave the header out..
0 Kudos
adrianc1982
Level 7

Re: ListScreenTitleColor not working - roListScreen.SetHeade

"SoN9ne" wrote:
"RokuChris" wrote:
Try ListScreenHeaderText


Thank you!

How much is not in the SDK?! I didn't see that on this page. I was about to leave the header out..


well at least its now documented via the forums and a quick google search hehehe

it worked for me too
0 Kudos