Forum Discussion

destruk's avatar
destruk
Streaming Star
15 years ago

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.

10 Replies

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

    --Kevin
  • destruk's avatar
    destruk
    Streaming Star
    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?
  • If you want to reset back to the default value, you can use the "ClearThemeAttribute" function on roAppManager.
  • destruk's avatar
    destruk
    Streaming Star
    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.
  • 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
  • destruk's avatar
    destruk
    Streaming Star
    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?
  • "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.
  • "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...
  • "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.