Posts: 3,956
Joined: Dec 2008
Reputation:
62
I suggest moving DVD controls (play/eject..) to a predefined dialog with assigned id, so it can be hidden by system on iOS devices and such.
Posts: 17,603
Joined: Aug 2007
Reputation:
603
Hitcher
Team-Kodi Member
Posts: 17,603
Funny you should post this now because I was just coding the 'Eject tray' and 'Play disc' buttons for my next skin, and while we can hide the 'Play disc' button if there' nothing in the tray, we can't hide the 'Eject' button if there isn't a drive.
What I would like to suggest is a boolean condition based on whether there's a CD/DVD drive available so we can hide the Eject button if it's not needed.
ie
System.CanEject or System.HasDrive
Thanks.
Posts: 17,603
Joined: Aug 2007
Reputation:
603
Hitcher
Team-Kodi Member
Posts: 17,603
I'd still need a boolean condition as other elements besides the button are based on it.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
This will be an increasing problem. I'm not sure as yet what makes most sense.
Certainly just quitting when "shutdownmenu" is called is IMO the wrong way to go.
Usually most folk put buttons inside a grouplist (which may be aligned etc.) so disabling individual buttons seems to be the better way to go to me.
Doing this in a way that doesn't add burden to skinners is tricky though (while still allowing flexibility).
Posts: 3,956
Joined: Dec 2008
Reputation:
62
Solved it (at least from where I stand).
Eject/load shown only when media present in drive. It's not 100% percent but I expect user can load disc manually, problem is rather with eject.
Posts: 26,215
Joined: Oct 2003
Reputation:
187
One idea might be to borrow from the new slider controls (for volume and seek) which essentially gives an <action> field that describes more what the slider does rather than the actual action that is executed and how it's executed.
Perhaps we could do a similar thing with buttons - i.e. encompass both the visibility and click in a "what this button is for" tag, so that XBMC takes care of visibility and the action for you?
Cheers,
Jonathan