PDA

View Full Version : Small controller project


AzraelK
2005-10-06, 08:05
im trying to pull a small mod in xbmc all i want is to send a small signal trough the rumble controller whenever i select a program or music, so i can know what file is being played so i can send a different rumble signal in each, is just a small project to learn how to code in xdk and xbmc (and so far ive learned a lot!)

unfortunately im stuck, i have 2 problems

1.-i have created a new function for the class controller that sends the signal , but i dont know where to use it. (cguiwindowprograms seems like the right class but i dont know where)

2.-i have no idea where to get the list number for the icon im seing in the screen (called button in the code)

any help on this will be apreciated.

if i can get this to work, i will get to the second step of the project, to call a small video preview from the directory im reading (for videos and programs) and play it on the background, while selecting the icon (yes i know thats more difficult so im saving that for later when im more experienced)

thanks!

AzraelK
2005-10-06, 22:27
ok after reading around for a while, i have discovered the answer to my question is to use a python script to send that info (without modificating the current xbmc functions) im now looking into how to get python to use my modified controller class.

p.s. is this the right forum for this?

jmarshall
2005-10-09, 11:27
you won't be able to use python.

you were on the right track the first time. you should have the executable that was clicked on in the onclick() method of cguiwindowprograms. there you can call whatever function you have that does the rumbling.

cheers,
jonathan

AzraelK
2005-10-12, 21:47
thanks for that answer jmarshall, yes you are right but now i have a small problem, ive added my function setrumble, in the cxbapplicationex class but this class (apparently) is not attached to cguiwindowprograms so i cant use it from there, where can i place this class so i can use it there?

also, well this is just a minor problem, but i want a function that is called when you change the focus to an icon. ive looked everywhere for this function but i have not found it.