Exemplo n.º 1
0
Arquivo: test5.py Projeto: burito/PyUI
def run():
    
    import testopt
    opts = testopt.parseCommandLine(800, 600)
    pyui.init(*opts)
    g = game()
    pyui.run()
Exemplo n.º 2
0
Arquivo: grid.py Projeto: burito/PyUI
def run():
    opts = testopt.parseCommandLine(800, 600)
    done = 1
    frame = 0
    t = time.time()
    pyui.init(*opts)
    pyui.desktop.getRenderer().setMouseCursor("cursor.png", 11,7)    
    w = pyui.widgets.Frame(50, 50, 600, 450, "clipme")

    g = pyui.grid.GridPanel(6,10)

    for i in range(0,10):
        g.putCellAt( pyui.widgets.Button("button #%d" % i, None), random.randrange(0,4), random.randrange(0,5) )
        g.putCellAt( pyui.widgets.Label("label #%d" % i), random.randrange(0,4), random.randrange(5,10) )
        g.putCellAt( pyui.widgets.Edit("label #%d" % i, 12, None), random.randrange(0,4), random.randrange(10,15) )
        g.putCellAt( pyui.widgets.SliderBar(onbutton, 50, 30), random.randrange(0,4), random.randrange(15,20) )                        
        
                     
    w.replacePanel(g)

    w.pack()
    
    pyui.run()

    print "done"
    pyui.quit()
Exemplo n.º 3
0
def run():
    done = 1

    import testopt
    opts = testopt.parseCommandLine(800, 600)
    pyui.init(*opts)
    g = app()
    pyui.run()
Exemplo n.º 4
0
Arquivo: test6.py Projeto: burito/PyUI
def run():
    done = 1
    frame = 0
    t = time.time()

    import testopt
    opts = testopt.parseCommandLine(800, 600)
    pyui.init(*opts)
    g = game()
    pyui.run()
Exemplo n.º 5
0
def run():
    import testopt
    opts = testopt.parseCommandLine(800, 600)
    pyui.init(*opts)

    cubeSetup()
    pyui.desktop.getRenderer().setBackMethod(drawCube)
    createControl()
    con = pyui.dialogs.Console(0,500,780,80)
    pyui.run()

    print "done X"
    pyui.quit()
    print "quit."
Exemplo n.º 6
0
Arquivo: test1.py Projeto: burito/PyUI
def run():
    import testopt

    opts = testopt.parseCommandLine(800, 600)
    pyui.init(*opts)
    # pyui.core.setTheme(pyui.greenTheme.greenTheme(pyui.core.gRenderer, 640, 480))
    g = app()

    pyui.run()

    print "done X"
    g.cleanup()
    pyui.quit()
    print "quit."
Exemplo n.º 7
0
    def update(self):
        sylphis.CClient.update_c(self)
        e = CEngine
        dt = e.getFrameLength()

        if self.mapLoaded:
            self.getSceneManager().update(dt)

        e.renderer.beginFrame()

        for s in self.postEffects.values():
            e.renderer.drawPic(0, 0, 800, 600, s)
        
        #e.renderer.calcAverageLuma()    
        #e.renderer.drawPic(50, 50, 300, 300, self.bufferA, 0.0, 0.0, 1.0 + 3.0 / 64.0, 1.0 + 3.0 / 64.0)
        #e.renderer.drawPic(400, 50, 300, 300, self.bufferAb, 0.0, 0.0, 1.0 + 3.0 / 64.0, 1.0 + 3.0 / 64.0)

        #if faderAmount() < 1.0:
        #    e.renderer.drawPic(0, 0, 800, 600, self.faderShader)

        if self.mapLoaded:
            self.getSceneManager().render(e.renderer)

        e.renderer.enter2DMode()

        # Render the postprocess quads
        #e.renderer.renderOverlay2D()

        # Run and render the GUI
        pyui.run()

        if self.drawFPS:
            self._drawFPS()
            self._drawEPS()

        if self.drawPerf:
            self._drawPerformaceInfo()

##        if not pyui.isActive():
##            self.hud.render(self.player)

        e.renderer.exit2DMode()
        e.renderer.endFrame()
Exemplo n.º 8
0
    def update(self):
        sylphis.CClient.update_c(self)
        e = CEngine
        dt = e.getFrameLength()

        if self.mapLoaded:
            self.getSceneManager().update(dt)

        e.renderer.beginFrame()

        for s in self.postEffects.values():
            e.renderer.drawPic(0, 0, 800, 600, s)

        #e.renderer.calcAverageLuma()
        #e.renderer.drawPic(50, 50, 300, 300, self.bufferA, 0.0, 0.0, 1.0 + 3.0 / 64.0, 1.0 + 3.0 / 64.0)
        #e.renderer.drawPic(400, 50, 300, 300, self.bufferAb, 0.0, 0.0, 1.0 + 3.0 / 64.0, 1.0 + 3.0 / 64.0)

        #if faderAmount() < 1.0:
        #    e.renderer.drawPic(0, 0, 800, 600, self.faderShader)

        if self.mapLoaded:
            self.getSceneManager().render(e.renderer)

        e.renderer.enter2DMode()

        # Render the postprocess quads
        #e.renderer.renderOverlay2D()

        # Run and render the GUI
        pyui.run()

        if self.drawFPS:
            self._drawFPS()
            self._drawEPS()

        if self.drawPerf:
            self._drawPerformaceInfo()

##        if not pyui.isActive():
##            self.hud.render(self.player)

        e.renderer.exit2DMode()
        e.renderer.endFrame()
Exemplo n.º 9
0
def run():
    opts = testopt.parseCommandLine(800, 600)
    done = 1
    frame = 0
    t = time.time()
    pyui.init(*opts)
    pyui.desktop.getRenderer().setMouseCursor("cursor.png", 11, 7)

    for i in range(0, 1):
        w = pyui.widgets.Frame(50 + i * 20, 50 + i * 20, 400, 400, "spreadsheet")
        w.setLayout(pyui.layouts.GridLayoutManager(1, 1, 0))
        b = pyui.sheet.Sheet(onChanged, onInserted)
        b.setColumnTitle(3, "A very Long one")
        b.setColumnTitle(2, "Table name")
        b.setColumnTitle(1, "Something goes here....")
        w.addChild(b)
        w.pack()

    pyui.run()

    print "done"
    pyui.quit()
Exemplo n.º 10
0
Arquivo: thtml.py Projeto: burito/PyUI
def run():
    opts = testopt.parseCommandLine(1024, 768)
    done = 1
    frame = 0
    t = time.time()
    pyui.init(*opts)
    w = pyui.widgets.Frame(0,0,800,600, "HTML!")
    h = pyui.html.HTMLPanel()
    w.replacePanel(h)
    w.pack()

    #f = open('C:/ninja/Projects/pyui/website/index.html')
    #text = f.read()
    #f.close()
    h.feed(text)
    
    #h.feed(testText)

    w.resize(800,600)
    pyui.run()

    print "done"
    pyui.quit()
Exemplo n.º 11
0
 def loop(self):
     pyui.run()
Exemplo n.º 12
0
 def loop(self):
     pyui.run()
Exemplo n.º 13
0
def run():
    pyui.run(update)
Exemplo n.º 14
0
def run():
    pyui.run(update)