Kodi Community Forum

Full Version: Can I make the default button coditional?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am modding a skin and I want to change DialogVideoInfo.xml. What I am trying to do is change the order of the buttons (refresh, get thumb, get fanart, play, etc.). I want the trailer button to be the default button as it's the one I use most of the time. I managed to do that, but the problem is that when there is no trailer button, none of the others get focus.

The buttons are built via a group list. And as best I can tell the first button listed gets focus by default. My question is, can I make it so that if the trailer button is not visible the next button gets the focus?
well the easy I guess way is set default focus to the grouplist id and have the trailer button first in the grouplist
Thanks for your help. At first I was confused since I didn't see a default specified, but after looking I found the default control specified somewhere else in the xml. It was the id for the specific button which explains what was happening. Changing it to the grouplist id doesn't quite solve it either. It seems to leave the default button at the last one that had focus. So when highlighting the trailer button and then trying a different movie without a trailer, no button has focus. Granted, moving the cursor does select the next button, but at first it's a bit confusing since no button has focus. Also, if you highlight another button (say 'get thumb') on one movie and then go to movie info for another movie, 'get thumb' will get the focus by default rather than the trailer button.

I'd like it to always be the trailer button and if it is hidden, then the next button should get the focus. Can I do that?
Anyone know if this is possible?
You have !IsEmpty.ListItem(trailer) on your button control?
I have that as a visible condition for the trailer button and that part works. My problem is making it the default and then setting an alternative default for when it isn't visible. As it is, no control gets focus if the trailer button is not visible.

By the way, it your modded Cirrus 2.05 that I am trying to modify. Great skin!
RockDawg Wrote:I have that as a visible condition for the trailer button and that part works. My problem is making it the default and then setting an alternative default for when it isn't visible. As it is, no control gets focus if the trailer button is not visible.

By the way, it your modded Cirrus 2.05 that I am trying to modify. Great skin!

BTW there is 2.06 Version available Smile

In 2.07 there will be an option to start trailer with different options, so you don't really have to go in Info Screen:

Image