kyleabaker
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2015
01:19 PM
GetThemeAttribute or something similar?
Is there a way to retrieve theme attributes that have been applied? For instance, can I find the value of "GridScreenLogoHD" (which should just be a path to an image)?
2 REPLIES 2
TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2015
01:39 PM
Re: GetThemeAttribute or something similar?
None that I'm aware of... I use the following to manage my themes via an object stored in the Global AA.
Sub SetTheme(theme As Object)
m.Theme = theme
app = CreateObject("roAppManager")
app.SetTheme(m.Theme)
End Sub
Function GetTheme() As Object
If m.Theme = invalid Then
m.Theme = {}
End If
Return m.Theme
End Function
Sub SetThemeAttribute(name As String, value As String)
app = CreateObject("roAppManager")
app.SetThemeAttribute(name, value)
theme = GetTheme()
theme[name] = value
End Sub
Function GetThemeAttribute(name As String, defaultValue = "" As String) As String
theme = GetTheme()
value = theme[name]
If IsNullOrEmpty(value) Then
value = defaultValue
End If
Return value
End Function
Sub ClearThemeAttribute(name)
app = CreateObject("roAppManager")
app.ClearThemeAttribute(name)
theme = GetTheme()
theme.Delete(name)
End Sub
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)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
kyleabaker
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2015
05:07 PM
Re: GetThemeAttribute or something similar?
"TheEndless" wrote:
None that I'm aware of... I use the following to manage my themes via an object stored in the Global AA.Sub SetTheme(theme As Object)
m.Theme = theme
app = CreateObject("roAppManager")
app.SetTheme(m.Theme)
End Sub
Function GetTheme() As Object
If m.Theme = invalid Then
m.Theme = {}
End If
Return m.Theme
End Function
Sub SetThemeAttribute(name As String, value As String)
app = CreateObject("roAppManager")
app.SetThemeAttribute(name, value)
theme = GetTheme()
theme[name] = value
End Sub
Function GetThemeAttribute(name As String, defaultValue = "" As String) As String
theme = GetTheme()
value = theme[name]
If IsNullOrEmpty(value) Then
value = defaultValue
End If
Return value
End Function
Sub ClearThemeAttribute(name)
app = CreateObject("roAppManager")
app.ClearThemeAttribute(name)
theme = GetTheme()
theme.Delete(name)
End Sub
That's a nice workaround, thanks!