Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
destruk
Streaming Star

Theme Default Values?

The component guide lists example values for all the theme methods.
Is there a list anywhere that tells you what the default values are, or are you able to query what a value is?
SimpleGrid.brs example says --
'** @return The default application theme.
'** Screens can make slight adjustments to the default
'** theme by getting it from here and then overriding
'** individual theme attributes.
Function CreateDefaultTheme() as Object

I don't see where it actually grabs any values for the rest of the unlisted properties of the theme object? ie they appear to be all write only commands.
0 Kudos
10 REPLIES 10
RokuKevin
Visitor

Re: Theme Default Values?

It inherits the default theme for any values that aren't overridden.

--Kevin
0 Kudos
destruk
Streaming Star

Re: Theme Default Values?

But what are the default values, or how do I get it to reload default values?
Are you saying that simply a call to function CreateDefaultTheme() as Object will load values for defaults every time it is called, and then act on the lines below that one if they exist?

More specifically - say I have my app. The app is selected from the main menu and begins to execute. I show three choices on the springboard and I want them to have the defaults for everything.
So I call function CreateDefaultTheme at the beginning of this to ensure whenever a user goes 'back' or it needs to be redrawn, all options are reset to the standard defaults.
When a user selects one of the options I want the dialog boxes and everything else to be different.
And just to be overly complex, I want a gridscreen below that level where everything is defaulted again.

What is the easiest way to make this happen if I have no access to know what any of the actual default settings are? Or don't I need to know those values for some reason?
0 Kudos
evilmax17
Visitor

Re: Theme Default Values?

If you want to reset back to the default value, you can use the "ClearThemeAttribute" function on roAppManager.
My Roku Channels:
Viddler - viddler.com
Tested Fan - tested.com | Jamie & Adam
This is my next - theverge.com
1080p Showcase - RIP
Whiskey Media - RIP
======================
http://www.binarymoustache.com
0 Kudos
destruk
Streaming Star

Re: Theme Default Values?

What I want it to do is to load a different description background image whenever the selected grid item changes. This way the color matches the selected image with a nice gradient - which you can't do using single colors.

None of this works

if msg.isListItemFocused() then
row = msg.GetIndex()
selection = msg.getData()
app = CreateObject("roAppManager")
if row=0 then
if selection=0 then
app.ClearThemeAttribute("GridScreenDescriptionImageSD")
screen.SetDescriptionVisible(FALSE)
app.SetThemeAttribute("GridScreenDescriptionImageSD","pkg:/images/1a_d.png")
screen.SetDescriptionVisible(TRUE)
Screen.Showmessage("HI")
Screen.ClearMessage()
Screen.Show()
end if
if selection=1 then
app.ClearThemeAttribute("GridScreenDescriptionImageSD")
screen.SetDescriptionVisible(FALSE)
app.SetThemeAttribute("GridScreenDescriptionImageSD","pkg:/images/1b_d.png")
screen.SetDescriptionVisible(TRUE)
Screen.Showmessage("HI")
Screen.ClearMessage()
Screen.Show()
end if
if selection=2 then
app.ClearThemeAttribute("GridScreenDescriptionImageSD")
screen.SetDescriptionVisible(FALSE)
app.SetThemeAttribute("GridScreenDescriptionImageSD","pkg:/images/1c_d.png")
screen.SetDescriptionVisible(TRUE)
Screen.Showmessage("HI")
Screen.ClearMessage()
Screen.Show()
end if
end if

print"list item focused | current show = "; row ; "data= "; selection
end if


How would you accomplish this task? And yes, for now I'm testing in SD.
0 Kudos
RokuKevin
Visitor

Re: Theme Default Values?

Although the screen.Show() should reapply all the theme attributes, this has been an area where we have been inconsistent....

I suggest rethinking changing the grid theme as users select different grid items. As a user, I would find this a little jarring...

--Kevin
0 Kudos
destruk
Streaming Star

Re: Theme Default Values?

Thanks. I'm trying to duplicate this web page - http://acebroadcasting.com/ Will there be a web page view option in the future to access? Or would roImageCanvas provide some additional functionality?
0 Kudos
evilmax17
Visitor

Re: Theme Default Values?

"destruk" wrote:
Thanks. I'm trying to duplicate this web page - http://acebroadcasting.com/ Will there be a web page view option in the future to access? Or would roImageCanvas provide some additional functionality?

I'm not sure that ACE has enough content as to warrant using the grid screen, especially if you're just using it as a front-end for 10 different shows. You'd probably be better off just using roPosterScreens.

I always pictured an ACE Broadcasting channel as looking similar to the TWiT channel.
My Roku Channels:
Viddler - viddler.com
Tested Fan - tested.com | Jamie & Adam
This is my next - theverge.com
1080p Showcase - RIP
Whiskey Media - RIP
======================
http://www.binarymoustache.com
0 Kudos
kbenson
Visitor

Re: Theme Default Values?

"evilmax17" wrote:
"destruk" wrote:
Thanks. I'm trying to duplicate this web page - http://acebroadcasting.com/ Will there be a web page view option in the future to access? Or would roImageCanvas provide some additional functionality?

I'm not sure that ACE has enough content as to warrant using the grid screen, especially if you're just using it as a front-end for 10 different shows. You'd probably be better off just using roPosterScreens.


Or an roImageCanvas. You could make it look almost identical with that. I guess it really depends on whether the front page content will be changing often or not. roImageCanvas would be harder to make dynamic like roGridScreen (but by no means impossible). If using an ImageCanvas, you would probably want to just move an outline selector around the shows, and then update a portion of the screen with the show text, like on their webpage (when you mouse over).

It's quite a bit more work, but you could get it almost identical to the main page of the site...
-- GandK Labs
Check out Reversi! in the channel store!
0 Kudos
TheEndless
Channel Surfer

Re: Theme Default Values?

"kbenson" wrote:
"evilmax17" wrote:
"destruk" wrote:
Thanks. I'm trying to duplicate this web page - http://acebroadcasting.com/ Will there be a web page view option in the future to access? Or would roImageCanvas provide some additional functionality?

I'm not sure that ACE has enough content as to warrant using the grid screen, especially if you're just using it as a front-end for 10 different shows. You'd probably be better off just using roPosterScreens.


Or an roImageCanvas. You could make it look almost identical with that. I guess it really depends on whether the front page content will be changing often or not. roImageCanvas would be harder to make dynamic like roGridScreen (but by no means impossible). If using an ImageCanvas, you would probably want to just move an outline selector around the shows, and then update a portion of the screen with the show text, like on their webpage (when you mouse over).

It's quite a bit more work, but you could get it almost identical to the main page of the site...

I'd recommend an roImageCanvas as well. For a 3x4 grid like ACE, I think the scrolling caused by the stationary selector frame on the grid screen would be kind of awkward.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.