Kodi Community Forum

Full Version: Conditional image display
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm sure this should be pretty simple but at the moment it has me beat.

I'm currently building a horizontal wraplist and want to display an image just above it when a certain item of the list has focus. The wraplist is control 9000 and contains items 1-9.

I can't figure out the visibility code I need. Control.HasFocus(9000) makes it permanently visible, obviously, so how do I specify an item within that control?
Container(9000).HasFocus(1)
Thanks, that worked.
I'm now looking to display a menu item between certain dates. The wiki seems to suggest

stringcompare(System.Date(startDate,endDate))

as a visibility condition with date format MM-DD but I can't get it to work. Can someone point me in the right direction please.

I've tried

stringcompare(System.Date(09-22,10-24))

which should make the item visible from 22 September (yesterday) until 24 October, but the item isn't visible.

edit: ignore me, the stringcompare was redundant, I'd probably assumed it was needed because I've been doing string compares all morning.
why do You use stringcompare?

just <visible>System.Date(09-22,10-24)</visible>