2017-03-22, 09:45
(2017-03-22, 07:41)jurialmunkey Wrote:(2017-03-22, 07:17)smitchell6879 Wrote: Maybe this is a dumb already answered question by is there a way to have 2 actions one menu items click? or 2 onclicks for one menu item... hope this makes sense.There are lots of ways to do this. The best method depends on what you are trying to achieve.
IF you need to just add the same additional onclick to all items then use a groupoverride.
I use this in eminence 2 - have a look at its overrides file for an example (its labelled Additional onclick). The groupoverride I use there just adds an additional onclick action to the user defined one.
https://github.com/jurialmunkey/skin.emi...rrides.xml
You can also add conditions to the groupoverride if you need to specify different onclick actions based upon certain conditions. This is the easiest way to do it. You can see how this is done in the Eminence overrides (I use it to set a close condition for power/favourites and also to set some properties for main menu before the main action).
If you want the user to be able to specify two onclick actions (not sure why you would, but perhaps there is a use case). Then you would have to set an additional custom property and then override the onclick by specifying in your list control the onclick action (NOT in the item/focus layout, but in the main definition of the list control (i.e. where you put width, height, orientation etc.)). ListItem.Property(list) is there because that properties is the normally defined onclick action for that menu item.
Code:<onclick>$INFO[ListItem.Property(custom_property_name)]</onclick>
<onclick>$INFO[ListItem.Property(list)]</onclick>
Building on that could I have the change the onclick action to a on focus action?