multiple <onright> actions
#1
Would it be possible to apply multiple actions to <onright>. <onleft> and such? Basically like <onclick> is able to?

I have an onright action to set visibility of other items using a property, but I would also like to set focus to the first of those toggle-able items.

All the items are contained in one grouplist, so I'm not able to use more traditional ways when using separate menus like using the main menu's focused item.

so in shorthand I'm using
PHP Code:
<grouplist>
   <
orientation>vertical</orientation>
   <
main button>
      <
onright>SetProperty(Home.Item,videos)</onright>
   <
main button>
   <
secondary button>
      <
visible>StringCompare(Window.Property(Home.Item),videos)</visible>
   <
secondary button>
</
grouplist

And I would like the selection to move to the secondary button right away when it becomes visible whereas now I have to press right to make it appear, and then down to actually select it.
Reply
#2
not sure if it works, but this might be an alternative way:
PHP Code:
<grouplist>
   <
orientation>vertical</orientation>
   <
main button id="1">
      <
onright>SetFocus(2)</onright>
   </
main button>
   <
secondary button id="2">
      <
onfocus>SetProperty(Home.Item,videos)</onfocus>
      <
visible allowhiddenfocus="true">StringCompare(Window.Property(Home.Item),videos)</visible>
   </
secondary button>
</
grouplist
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Yeah tried that too Smile But the strange thing then is that the secondary button gets selected even when I don't press right, but it isn't made visible.

So when not pressing right, instead of going from the first primary button right to the second primary button, it goes to the secondary button first but you don't see see it selected.

edit: all the button's have an ID btw
Reply
#4
I didn't test it - but I think that You can already define multiple onright actions
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#5
You're right, I tried with the secondary button always visible and the multiple onright commands both worked.

edit: setting focus to the secondary button basically works, but it still doesn't skip from the first primary button to the second primary button, it selects the hidden button first..Which actually makes sense as the ID of the secondary button comes before the second primary button and it allows hidden focus..hm not sure if I can get around that
Reply
#6
That's handy to know.
Reply
#7
Think I managed to get around it Smile
By using

PHP Code:
<ondown condition="!StringCompare(Window.Property(Home.Item),videos)">200</ondown

On the primary button to go to the second primary button when the first one's child items aren't visible. Have to see how this works out because some buttons can be turned of by a skin setting though.
Reply
#8
I didn't really do research on that (if this is reason of problems), but basicly setting property doesn't automaticly trigger other control to become visible (it will become visible in next frame when this control will evaluate its visibility condition). So if You would try to simply set focus right after setting property, secondary control wouldn't be yet visible and thus couldn't be focused (unless it allow hidden focus, which in turn bring problem of normal navigation in grouplist).

I think at some point (propably as another step in turning infomanager to be push-based) we will need to change this behaviour ...
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply

Logout Mark Read Team Forum Stats Members Help
multiple <onright> actions0