2014-05-24, 17:14
Hi,
I am creating some DirectoryItems in a video.plugin that I'm writing. Here is a snippet:
When the user hits enter or clicks on one of these in XBMC, I'd like to pop up the equivalent of the context menu so that the user is presented a few options. What's the "right" way to do that? I could just create a regular context menu and the user would have to know to click "c" or right click or whatever, but if I can avoid that, I'd like to.
EDIT: Looks like I should be doing an xbmcgui.WindowDialog (is that right?). Can somebody steer me down the path creating something that has the same look and feel as the context menu for a video and works with skins?
Thanks!
Damon
I am creating some DirectoryItems in a video.plugin that I'm writing. Here is a snippet:
PHP Code:
li = xbmcgui.ListItem(name, iconImage="DefaultTVShows.png", thumbnailImage=poster)
li.setInfo(type="video", infoLabels={"title": name, "plot": overview, "duration": duration, "year": year, "mpaa": contentrating, "director": director, "genre": genre, "rating": rating})
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url="plugin://plugin.video.showwhiz-search/?mode=show_actions", listitem=li, isFolder=False)
When the user hits enter or clicks on one of these in XBMC, I'd like to pop up the equivalent of the context menu so that the user is presented a few options. What's the "right" way to do that? I could just create a regular context menu and the user would have to know to click "c" or right click or whatever, but if I can avoid that, I'd like to.
EDIT: Looks like I should be doing an xbmcgui.WindowDialog (is that right?). Can somebody steer me down the path creating something that has the same look and feel as the context menu for a video and works with skins?
Thanks!
Damon