Settings Screen Labels at Runtime
#1
Ok, I have a raspberry pi connected into my car via the CanBus collecting all loads of data. One of those is the external temeprature.

I've created a label on the home screen and a couple of other areas, I think the Default screen so that it's there across all screens.

Works fine.

Im basically getting the current screen id, getting label from the screen, then setting the text on the label.

As this is done on run time, it means that when I flip into a screen, there's a small delay with updating.

I've seen references to $LOCAL and $ADDON IIRC. Does XBMC have a concept of setting sharing fields between the screen and Python, so for example, I could use $ADDON[32000] on the screen, then in the Python program just use something like $ADDON[32000] = "Text"?

I've looked all over the place, but I cannot see anything that would do this. I've seen the localization strings, but these appear static.

Simon
Reply
#2
(2016-12-07, 14:35)sjdean Wrote: Im basically getting the current screen id, getting label from the screen, then setting the text on the label.

well, that's really the correct way to do it.
if the small delay is bothering you, you could try using window properties instead...

skin:
Code:
<label>$INFO[Window(Home).Property(addon-label)]</label>

addon:
Code:
WIN = xbmcgui.Window(10000)
WIN.setProperty('addon-label', 'This is my text')
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply

Logout Mark Read Team Forum Stats Members Help
Settings Screen Labels at Runtime0