Posts: 38
Joined: Jan 2014
Reputation:
0
Hi, I writing a python script, and executing it throuhg skin with Runscript(path-to-python-file). Ok until here.
The script must be able to create a window that looks like video window (capable of list item and if selected do something), but I not sure about wich class I must use.
I tried xbmcgui.Window with addControl method, but I got only a black screen.
I tried with xbmcgui.ListItem but without success.
Wich class should I use?
Thanks!
Posts: 1,506
Joined: Nov 2013
2014-07-09, 18:11
(This post was last modified: 2014-07-09, 18:13 by ironic_monkey.)
do you actually need a custom window / a full blown script? sounds like you're trying to write a plugin..
EDIT: in case you're not aware. a 'script' is a full-blown window written in python. a 'plugin' is a virtual filesystem entry written in python. you provide a virtual filesystem, and it's listed as any other dirs in xbmc.
Posts: 38
Joined: Jan 2014
Reputation:
0
I guess I need because what I trying to do is show the file content (a list of items)
The scenario is:
I have a website that registers some quiz. The XBMC it's responsible to go to the server and get the quiz and store in a file.
I already have an addon that do this.
I think that the best way to show the quiz it's in the same way of videos or images. If the best practice it's to write a plugin then I'm going write a plugin. But I'm a little lost in what to do.
What do you mean with full-blown?
Posts: 1,506
Joined: Nov 2013
so you have a virtual filesystem with videos and pictures. by full-blown mean the need for custom controls, layouts etc. i still think you can do a plugin.
if you want to do a script, see
http://forum.xbmc.org/showthread.php?tid=174859
Posts: 1,506
Joined: Nov 2013
other way around. the core calls your plugin. as i said it's a vfs, so you'll get a callback with whatever url you assigned to the item being clicked. encode all info in the url (typically, url parameters..). bam.