def run(): opts = testopt.parseCommandLine(800, 600) done = 1 t = time.time() core.init(*opts) w = widgets.Frame(50, 100, 400, 400, "Test Window") m = frame.FrameMenuBar() mm = frame.FrameMenu("TestMe") mm.addItem("one", onbutton) mm.addItem("foobarme", onbutton) m.addMenu(mm) m2 = frame.FrameMenu("Second One") m2.addItem("Long test one", onbutton) m2.addItem("hello", onbutton) m2.addItem("Long test one", onbutton ) m2.addItem("menu item", onbutton) m2.addItem("go go go ", onbutton) m2.addItem("Long test two", onbutton) m.addMenu(m2) w.setMenuBar(m) b = widgets.Button( "A button is here", onbutton) w.addChild(b) w.pack() w.setBackImage("max.bmp") core.run() print "done" core.quit()
def run(): import testopt opts = testopt.parseCommandLine(800, 600) pyui.init(*opts) g = game() pyui.run()
def run(): done = 1 frame = 0 t = time.time() import testopt opts = testopt.parseCommandLine(800, 600, "dx") pyui.init(*opts) # w = pyui.widgets.ViewWindow(10, 10, 400, 300) # w.pack() terrainDetails = CreateTestTerrainDetails() terrain = PyUnseen.createTerrainRegion(terrainDetails) # will take dictionary of stuff rootWorld = PyUnseen.getRootWorld() PyUnseen.addToWorld(rootWorld, terrain) # just like any other object cameraPos = (-10, 6, -10) cameraDir = (45, -45, 0) view1 = PyUnseen.createView(rootWorld) # will also take zMin, zMax? PyUnseen.setCameraParameters(view1, cameraPos, cameraDir) rootView = PyUnseen.getRootView() PyUnseen.setCameraParameters(rootView, cameraPos, cameraDir) while done: pyui.draw() done = pyui.update() print "done" pyui.quit()
def run(): done = 1 frame = 0 t = time.time() import testopt opts = testopt.parseCommandLine(640, 480) pyui.init(*opts) g = app() while done: pyui.draw() now = int(time.time()) if now != t: print frame frame = 0 t = now frame = frame + 1 done = pyui.update() print "done X" g.cleanup() pyui.quit() print "quit."
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()
def run(): done = 1 import testopt opts = testopt.parseCommandLine(800, 600) pyui.init(*opts) g = app() pyui.run()
def run(): done = 1 frame = 0 t = time.time() import testopt opts = testopt.parseCommandLine(800, 600) pyui.init(*opts) g = game() pyui.run()
def __init__(self): opts = testopt.parseCommandLine(800, 600) pyui.init(800,600,"p3d") ## DB init stuff self.dbpool = adbapi.ConnectionPool("pyPgSQL.PgSQL", "sean", host="localhost:5432") self.application = app.Application("testApp") self.reflector = sqlreflector.SQLReflector(self.dbpool, [], self.makeGrids) main.addTimeout(self.tick, 0.001) # make sure we can be shut down on windows. self.application.run()
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."
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."
def run(): done = 1 frame = 0 t = time.time() import testopt opts = testopt.parseCommandLine(800, 600) pyui.init(*opts) w = pyui.widgets.WorldWindow(50, 50, 400, 400) w.pack() while done: pyui.draw() done = pyui.update() print "done" pyui.quit()
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()
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()