windowXML and reusing existing skin look/feel
#1
Hi,

I want to create a simple dialog in my addon (to select a resume time), but I want to keep the same look and feel of other skins. Is it possible to reuse the existing skin files directly and populating there controls, without taking a copy and placing it directly into my addon?

The actual XML is DialogContextMenu.xml - and so the control IDs will be the same (996) - however I'm not sure if I can populate this type of control through Python?

Or do I need to take a copy and alter it to add some labels which I can change.
Add-on:PleXBMC (wiki) - Play Plex media through XBMC
PleXBMC Helper - Integrate Official/Unoffical Plex remote control apps into PleXBMC
PleXBMC Repository - install and manage all PleXBMC addons
Quartz3 PleXBMC - Integrate PleXBMC into home menus
Reply
#2
that's a dynamic dialog.

you would have to getControl(1000) and copy it and add it to the grouplist control.

i haven't tested this but i don't think you can copy a control. so you would have to get all the controls values eg getPos()... the create new controls.

i think there was talk about adding a context menu control, maybe it was just a wishlist item though. but that would be the best.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#3
Thanks - i'm guessing then that just taking a copy of XML file (and associated media items) and modifing it would be easier then. I'm just looking to simulate the "resume from" type message so it's a very simple dialog.

I've managed to avoid having to do custom dialogs - un til now and i'm just trying to get up to speed on what I can/can;t do.
Add-on:PleXBMC (wiki) - Play Plex media through XBMC
PleXBMC Helper - Integrate Official/Unoffical Plex remote control apps into PleXBMC
PleXBMC Repository - install and manage all PleXBMC addons
Quartz3 PleXBMC - Integrate PleXBMC into home menus
Reply
#4
well if you only have the one item, then it might work.
For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
Reply
#5
If it helps, I just use a yes/no dialog with custom labels:
Code:
if bookmark:
    bookmark = float(bookmark[0])
    if not (self._sought and (bookmark-30 > 0)):
        question = 'Resume %s from %s?' %(self.title, format_time(bookmark))
        resume = xbmcgui.Dialog()
        resume = resume.yesno(self.title,'',question,'','Start from beginning','Resume')
        if resume: self.seekTime(bookmark)
        self._sought = True
Reply
#6
yeah, that's what I used to do and will be my fallback - but i was trying to find a more elegant/seamless looking way (as I already use the standard resume features/dialogs for everything else, so wanted it all to fit in).
Add-on:PleXBMC (wiki) - Play Plex media through XBMC
PleXBMC Helper - Integrate Official/Unoffical Plex remote control apps into PleXBMC
PleXBMC Repository - install and manage all PleXBMC addons
Quartz3 PleXBMC - Integrate PleXBMC into home menus
Reply

Logout Mark Read Team Forum Stats Members Help
windowXML and reusing existing skin look/feel0