bigger dialog().ok(), with room for more text.
#1
hello,
I need to create a dialog similar to ok, only bigger, with room for a full paragraph of text. Is there already a dialogue that I've overlooked? Is it possible to change to the ok dialogue or should I be creating a custom window?


I've been working on a plugin for myself, a learning experience. Hopefully it will turn into something usable by the community in a few weeks.
Reply
#2
We don't really have one I'm afraid, so you'll have to create your own.

It's a problem with just how flexible the skinning engine is - skinners can create dialogs that wouldn't be resizable in any meaningful manner (eg mc360's dialogs).

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
To make it easy on yourself, just copy the current ok dialog skin file from pm3 or pm3.hd, grab the media files from svn, then just resize it as you see fit.
IMO skinning is the hardest & least fun part (but thankfully others seem to like it!)
Note that I don't know if this will actually work as I've never done it, but that is how I would start.
Always read the XBMC online-manual, FAQ and search and search the forum before posting.
For troubleshooting and bug reporting please read how to submit a proper bug report.

If you're interested in writing addons for xbmc, read docs and how-to for plugins and scripts ||| http://code.google.com/p/xbmc-addons/
Reply
#4
I've had many instances where I couldve used a bigger OK Dialog.

just an idea;
What about one that's based around a scrollable TextBox, would that translate well to all skins ?

possibly as: ok = Dialog.bigok(header, text)
Retired from Add-on dev
Reply
#5
Thanks for all the replies gents. I'm a bit scared of skinning, it's the sort of thing you have to jump into the deep end with, t least it seams that way too me. Guess I don't have the right type of brain for it.

I've currently set it up as a full window with a bit of text in the center, not very aesthetically pleasing, but it does the job.
Reply
#6
if your happy with that view then you'd be better using the standard skin 'debug' window that all skins have. that way you don't have to custom create anything.
You just need a small 'loader' class.

debug xml: DialogScriptInfo.xml

sample loader class:

Code:
class TextBox( xbmcgui.WindowXML ):
    """ Create a skinned textbox window """
    def __init__( self, *args, **kwargs):
        pass
        
    def onInit( self ):
        try:
            self.getControl( 5 ).setText( self.text )
            self.getControl( 3 ).setLabel( self.title )        # may not have an ID assigned
        except: pass

    def onClick( self, controlId ):
        pass

    def onFocus( self, controlId ):
        pass

    def onAction( self, action ):
        if action and (action.getButtonCode() in CANCEL_DIALOG or action.getId() in CANCEL_DIALOG):
            self.close()

    def ask(self, title, text ):
        self.title = title
        self.text = text
        self.doModal()        # causes window to be drawn

called with:

Code:
tbd = TextBox("DialogScriptInfo.xml", os.getcwd(), "Default")
tbd.ask("my title", mytext)
del tbd

something like that.
Retired from Add-on dev
Reply
#7
Thanks a lot BigBellyBilly.
Reply

Logout Mark Read Team Forum Stats Members Help
bigger dialog().ok(), with room for more text.0