Exemple #1
0
def main():
    """Run gui for testing"""
    import run
    import anwp.func.storedata
    width = 1024
    height = 768
    myGalaxy = anwp.func.storedata.loadFromFile('../../../Database/ANW1.anw')
    myShip = myGalaxy.ships['1']
    pyui.init(width, height, 'p3d', 0, 'Testing Quad Info Panel')
    app = run.TestApplication(width, height)
    i = 0
    top = 70
    width = (width / 4) - 20
    height = height / 3
    dimensions = [(0, height, width, height), (width + 10, top, width, height),
                  (width * 2 + 20, height, width, height),
                  (width + 10, top + height + 150, width, height)]
    for position in ['aft', 'fore', 'port', 'star']:
        (x, y, w, h) = dimensions[i]
        myQuad = myShip.quads[position]
        frame = QuadInfoFrame(None, app, myQuad, x, y, w, h)
        app.addGui(frame)
        i += 1
    app.run()
    pyui.quit()
Exemple #2
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing MainMenuTech Panel')
    app = run.TestApplication(width, height)
    frame = MainMenuTech(None, app)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #3
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing Industry Panel')
    app = run.TestApplication(width, height)
    frame = AddIndustryFrame(None, app, 'Add Industry to System', '1')
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #4
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0)
    app = run.TestApplication(width, height)
    frame = MessageBox(None, app, 'Test MessageBox', 'Test of a Message Box')
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #5
0
def main():
    """Run gui for testing"""
    import run
    width = 1280
    height = 1024
    pyui.init(width, height, 'p3d', 0, 'Testing SimMenu Panel')
    app = run.TestApplication(width, height)
    frame = SimMenu(None, app)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #6
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing Grid Panel')
    app = run.TestApplication(width, height)
    ##frame = GetGridFrame(None, app, 5, 20, 'Select Grid Quadrant for Fleet')
    frame = GetGridFrame(None, app, 3, 6, 'Select Map Quadrant for Fleet')
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #7
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    empireDict = {'id':'1', 'name':'Test Empire'}
    pyui.init(width, height, 'p3d', 0, 'Testing EmpireDip Panel')
    app = run.TestApplication(width, height)
    frame = EmpireDipFrame(None, app, empireDict, 10, 10)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #8
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing Armada Info Panel')
    app = run.TestApplication(width, height)
    frame = ArmadaInfoFrame(None, app)
    frame.panel.populate(None, None)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #9
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing Send Mail Info Panel')
    app = run.TestApplication(width, height)
    empireDict = {'id': '1', 'name': 'Test Empire'}
    frame = SendMailInfoFrame(None, app, empireDict)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #10
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    dTrade = {'AL': 100.0, 'EC': 100.0, 'IA': 100.0}
    pyui.init(width, height, 'p3d', 0, 'Testing Trade Panel')
    app = run.TestApplication(width, height)
    frame = ViewTrade(None, app, 100, 100, dTrade)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #11
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing Mail Info Panel')
    app = run.TestApplication(width, height)
    frame = MailInfoFrame(None, app)
    app.addGui(frame)
    frame2 = MailBodyFrame(None, app, '1')
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #12
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    pyui.init(width, height, 'p3d', 0, 'Testing City Panel')
    app = run.TestApplication(width, height)
    ##frame = AddCityFrame(None, app, 'Add City', '0', '1', 'Colin')
    frame = AddCityFrame(None, app, 'Change City Resource',
                         [11, 20, 14, 25, 18], '1', 'Colin')
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #13
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    myTech = {'name': 'Intelligent Shipyards', 'currentPoints': 0, 'imageFile': 'tech_red', 'y': 1800, 'id': '216', 'preTechs': ['216'], 'complete': 0, 'requiredPoints': 400, 'x': 300, 'preTechNum': 1, 'techAge': 3, 'description': 'Intelligent Shipyards'}
    pyui.init(width, height, 'p3d', 0, 'Testing Tech Info Panel')
    app = run.TestApplication(width, height)
    frame = TechInfoFrame(None, app)
    frame.panel.populate(myTech)
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #14
0
def main():
    """Run gui for testing"""
    import run
    import anwp.func.storedata
    width = 1024
    height = 768
    myGalaxy = anwp.func.storedata.loadFromFile('../../../Database/ANW.anw')
    myShip = myGalaxy.ships['1']
    pyui.init(width, height, 'p3d', 0, 'Testing Ship Info Panel')
    app = run.TestApplication(width, height)
    frame = ShipInfoFrame(None, app, myShip)
    frame.panel.populate()
    app.addGui(frame)
    app.run()
    pyui.quit()
Exemple #15
0
def main():
    """Run gui for testing"""
    import run
    width = 1024
    height = 768
    myEmpire = {'imageFile':'testempire', 'name': 'Kurita', 'ip': '', 'AL': 0, 'EC': 0, 'color1': 'red', 'simulationsLeft': 0, 'color1': 'black', 'emailAddress': '', 'key': '', 'designsLeft': 0, 'IA': 0, 'CR': 0, 'cities': 10}
    dIndustry = {'1':'Factory-1', '3':'Research Center-1', '2':'Marine Academy-2'}
    dShips = {'1':'5 Scouts', '2':'10 Destroyers', '3':'3 Super Dreadnoughts'}
    dMarines = {'1':'10 Flamers', '2':'10 Strikers', '3':'5 Gunners'}
    myIntelReport = {'round':99, 'industryReport':dIndustry, 'shipReport':dShips, 'marineReport':dMarines}
    mySystem = {'intelReport':myIntelReport, 'AL':12032, 'EC':455, 'IA':54, 'name': 'Hannah', 'imageFile': 'sys_8_yellow_black', 'id': '1001', 'connectedSystems': [], 'y': 300, 'x': 200, 'cities': 10, 'citiesUsed':4, 'myEmpireID': '2'}
    systemID = '1000'
    pyui.init(width, height, 'p3d', 0, 'Testing System Info Panel')
    app = run.TestApplication(width, height)
    frame = SystemInfoFrame(None, app)
    frame.panel.populate(myEmpire, mySystem)
    app.addGui(frame)
    app.run()
    pyui.quit()