All pastes #384581 Raw Edit

Untitled

public cpp v1 · immutable
·published 2007-03-07 05:12 UTC
rendered paste body
import xbmc, xbmcguiclass gui(xbmcgui.WindowDialog):    def __init__(self):        self.button1 = xbmcgui.ControlButton(100, 250, 200, 50, 'test button1', font='font14')        self.button2 = xbmcgui.ControlButton(100, 350, 200, 50, 'test button2', font='font14')        self.button3 = xbmcgui.ControlButton(100, 450, 200, 50, 'test button3', font='font14')        self.image1 = xbmcgui.ControlImage(400, 350, 200, 200, 'settings-videos-nofocus.png')        self.addControl( self.button1 )        self.addControl( self.button2 )        self.addControl( self.button3 )        self.addControl( self.image1 )        self.setFocus( self.button1 )        #self.image1.setVisible(False)        self.id = self.button1.getId()        self.button1.controlDown( self.button2 )        self.button2.controlDown( self.button3 )        self.button3.controlDown( self.button1 )        temp = [("focus", "effect=zoom end=90,247,220,56 time=0"),("unfocus", "effect=fade time=500")]         self.button1.setAnimation(temp)        self.button2.setAnimation([("focus", "effect=zoom end=90,347,220,56 time=0")])        self.button3.setAnimation([("focus", "effect=zoom end=90,447,220,56 time=0")])        self.image1.setAnimation(("windowopen", "effect=rotate start=0 end=90 center=500,450 time=500"))#condition=control.hasfocus(%s)" % self.id) )        #self.button2.setVisibleCondition("Control.HasFocus(%d)" % self.id, False)                    def onControl( self, control ):        if control == self.button1:            self.button1.setLabel( "%d" % xbmcgui.getCurrentWindowDialogId() )            self.button3.setLabel( "%d" % xbmcgui.getCurrentWindowId() )            #self.button2.setVisible( xbmc.getCondVisibility("Control.HasFocus(%d)" % self.id ) )        if control == self.button3:            self.image1.setAnimation("true", "effect=rotate start=0 end=90 center=500,450 time=200")#condition=control.hasfocus(%s)" % self.id)        def onAction( self, action ):        if action == 10: self.close()if ( __name__ == "__main__" ):    ui = gui()    try:        ui.doModal()    except:        traceback.print_exc()        ui.close()    del ui