Posts: 16
Joined: Sep 2005
Reputation:
0
i just added some small info to the video system (for a rating mod) but i have no idea how to send this info to the screen. right now is basically just
a).-a number between 0-5 (stars)
b).-a image (with the stars)
<control>
<info>videofile.rating</info>
</control>
but i have no idea how to declare those in code. i think they are an extra label for the skin , but i dont know where or how to declare them.
any help would be apreciated, thanks!
added manually by pike, check your gmail for verification mail anyhow
Posts: 26,215
Joined: Oct 2003
Reputation:
187
please be more specific on exactly what you are trying to do.
where are you attempting to add this information?
Posts: 16
Joined: Sep 2005
Reputation:
0
hmm. ok, ill try to be more specific. per example ive added a rating to the videos in their db and also ive added a function to get that info getrating() videodatabase.h and videodatabase.cpp, now i want to show that rating in the thumbnails or through a <info> tag.
you know the same way you can use:
<control>
<info>weather.temperature</info>
</control>
added manually by pike, check your gmail for verification mail anyhow
Posts: 26,215
Joined: Oct 2003
Reputation:
187
you can't do that in the thumbnail panel without a whole bunch of extra code.
you can, however, display the information on the video info dialog. just add a label control with a unique id to the skin xml file, and add the code to fill this in to the code for that window (it'd just be a set_control_label())
cheers,
jonathan
Posts: 16
Joined: Sep 2005
Reputation:
0
thanks jmarshall but after trying a bit with labels, ive realized thats not what i want. i want to add data to the thumbnails and buttons, ive actually coded a bit of my own functions for this, but i just cant get the data to show on screen.
i went to the gui video cpp and h file and added data to the strname variable so it would show along with the name, it didnt worked. my second try was to add data to the description of the file, when the fileobject is created (this passes data to the label) no go.
could you tell me where the label for the button is created? i just want to show some extra data there, video rating, actor, etc. i know is hard due to the skins but there has to be a way.
added manually by pike, check your gmail for verification mail anyhow
Posts: 16
Joined: Sep 2005
Reputation:
0
excellent! thanks, i finally have been able to add the data to the label, (it wasnt easy though) now i need to ask how can i call a function (i have previously made) to modify the value of the data (rating in this case) from a dialog?
something like this:
imdb
modify rating: (with a slider from 1 to 5)
added manually by pike, check your gmail for verification mail anyhow
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
you will need to create a custom dialog window. look at the guidialog* files. those are all the current dialog windows.
then to call the custom dialog. for an example, look at cguiwindowmusicbase, onsearch(). it calls the keyboard dialog.
Posts: 16
Joined: Sep 2005
Reputation:
0
hmm, im reading the code for those files but im not sure if i understood, all i want is a contextmenu with the option to modify the rating (with numbers) isnt there a way to modify a skin (xml) file for that? i need to create an entire new dialog for it?
added manually by pike, check your gmail for verification mail anyhow
Posts: 26,215
Joined: Oct 2003
Reputation:
187
1. you could just call the numeric input dialog. there is the obvious difficulty though that it would allow a greater than 5 input to deal with.
2. you can just alter the onpopupmenu() command to add a button for "set rating" and then call the numeric input dialog.
Posts: 16
Joined: Sep 2005
Reputation:
0
thanks i've tried but i still get the same problem, maybe is not possible to open two subwindows in xbmc so that may be it. jmarshall was right i need a new dialog. im working on it right now.
oops! about the modify time command, yeah i got the example on how to do the numeric dialog from the date and time settings thanks for pointing that out.
added manually by pike, check your gmail for verification mail anyhow
Posts: 7,172
Joined: Dec 2003
Reputation:
4
kraqh3d
Retired Developer
Posts: 7,172
its possible but the context menu will close after the new dialog opens because the contextmenu dialog is calling another dialog.
"edit title" in the video context menu does this. it calls the keyboard dialog window to get user input.