03/16/2010 (9:25 am)
setVisibleCondition() & setAnimations()
Allows XBMC to control visibility of your controls.
setVisibleCondition(visible[,allowHiddenFocus]) -- Set's the control's visible condition.
Allows XBMC to control the visible status of the control.
visible : string - Visible condition.
allowHiddenFocus : bool - True=gains focus even if hidden.
List of Conditions - http://www.xboxmediacenter.com/wiki/index.php?title=List_of_Boolean_Conditions
example:
- self.button.setVisibleCondition('[System.KaiEnabled + !Skin.String(KAI)]', True)
Allows XBMC to animate your controls:
setAnimations([(event, attr,)*]) -- Set's the control's animations.
[(event,attr,)*] : list - A list of tuples consisting of event and attributes pairs.
- event : string - The event to animate.
- attr : string - The whole attribute string separated by spaces.
Animating your skin - http://www.xboxmediacenter.com/wiki/index.php?title=Animating_Your_Skin
example:
- self.button.setAnimations([('focus', 'effect=zoom end=90,247,220,56 time=0')])
A big thanks to Asteron who made setAnimations() work properly. Also a thank you to cptspiff and nano-. :)
You need SVN revision 8035 or newer.
GuiBuilder.py has been updated to support these methods. For an example script and the updated guibuilder.py.
http://xbmc-scripting.googlecode.com/svn/trunk/Kaid%20Control%20Pad (https://xbmc-scripting.googlecode.com/svn/trunk/Kaid%20Control%20Pad)
I used to do:
But using conditions like this within the skin.xml no longer works, only setting it to False or true seems to work.
Do all visible conditions now have to be set via the script?
#If you have any other info about this subject , Please add it free.# |