Kodi Community Forum

Full Version: random function
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi, I've decided i'm going to attempt to code a random function as mentioned here could someone tell me where I could locate the queue and play methods located in the context menu and where I could find and the context menu's method calls so I can see the variables that are passed, thanks.
it's in xbmc/ ;P

contextmenu get filled from the GetContextButtons() function and handled in the OnContextButton() function. these are overloaded in all the media windows.
cheers I'll have a look into it, see if my rusty limited knowledge is any good :p
right I've got the function setup i now need to know where keyboard input is managed so i can map the function to a key, had a look but couldn't work it out based on file names lol
you can define an action in Key.h. you then handle the action in the relevant media window. to use it, you map the action to a human name in ButtonTranslator.cpp. you then do the final mapping in e.g. keyboard.xml
Right, think I've got it fully working so I've submitted a patch on trac if anyone is interested
http://trac.xbmc.org/ticket/10503