Posts: 27
Joined: May 2006
Reputation:
0
stepir
Junior Member
Posts: 27
2007-11-16, 08:30
Hello,
what would I need to add to keymap.xml to map a remote button to the function of 'switch view' (change view from list, small icons, title, etc.. both in Music and Video, both in File and library visualization)?
Thanks in advance,
Ste
Posts: 36
Joined: Oct 2007
Reputation:
-10
you can do this tho
<f>XBMC.ActivateWindow(musicfiles)</f> and likewise for library view
Posts: 26,215
Joined: Oct 2003
Reputation:
187
That's not switching the view mode though obviously!
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Note that it is on my TODO list to allow viewmode to be done in alternate ways in the skin (e.g. an "icon toolbar" type look done with buttons instead of a spinner), and this will allow keymapping at the same time.
If someone is interested in looking into it, my idea was 2 builtin functions:
SetViewMode(<id of viewmode>)
NextViewMode()
If you want to try and implement these yourself, you'd need to:
1. Add a method to CGUIMediaWindow to implement those functions (basically you just request m_viewControl to do it's work - see the OnMessage() handler for the view mode click message.)
2. Add the appropriate code to CUtil::ExecBuiltIn() to execute said functions.
In addition to the builtins, a retrieval method (boolean or infolabel) for the current viewmode would be necessary to do the toolbar type approach from the skin.
Cheers,
Jonathan