Пример #1
0
def startup(debug):
    app = MyApp()
    if debug: app.doLogging()
    frame = JowstFrame("Pro Wrestling Superstar")
    frame.app = app
    setIcon(frame)
    app.MainLoop()
Пример #2
0
def startBuilder(parent):
    """Call this when starting the Wrestler Builder from another GUI window"""
    frame = wxFrame(parent, -1, "Wrestler Builder")
    frame.win = WrestlerCreator(frame)
    frame.statusBar = wxStatusBar(frame, -1)
    frame.SetStatusBar(frame.statusBar)
    setIcon(frame)
    frame.Show(1)
Пример #3
0
def showTournamentControlPanel(tourney_manager, match_start_cb,
                               close_cb, filename=None):
    frame = wxFrame(None, -1, "Tournament Control Panel", size=(1024, 768))
    controlPanel = TournamentControlPanel(frame, tourney_manager,
                                          match_start_cb, close_cb)
    frame.Fit()
    controlPanel.tourneyFile = filename
    frame.Center()
    util.setIcon(frame)
    frame.Show(1)
Пример #4
0
def showTournamentGUI(cb):    
    tourneyDialog = TourneyStartDialog()
    if tourneyDialog.ShowModal() == wxID_OK:
        mods = dblib.getWrestlerData()
        modVals = mods.values()
        modVals.sort(cmpFunc)
        names = []
        for modVal in modVals:
            names.append("%s - %s" % (modVal.name, getattr(modVal, "nameSet",
                                                           "")))
        numTeams = int(tourneyDialog.numTeamsCtrl.GetValue())
        teamSize = int(tourneyDialog.teamSizeCtrl.GetValue())
        tourneyName = tourneyDialog.nameCtrl.GetValue()
        network = 0
        
        frame = wxFrame(None, -1, "Tournament Setup", size=(1024, 768))
        selgui = SelectionGUI(frame, tourneyName, names, numTeams, teamSize,
                              cb, network)
        frame.Center()
        util.setIcon(frame)
        frame.Show(1)
Пример #5
0
    def __init__(self, path, name):
        wxFrame.__init__(self, None, -1, "Results Manager - %s" % name, size=(800, 600))
        try:
            self.db = dblib.ResultManager(path, name)
        except OSError:
            mDlg = wxMessageDialog(
                self,
                "There was a problem creating the " + "%s database." % name,
                "Problem Creating Database",
                style=wxOK | wxICON_ERROR,
            )
            mDlg.ShowModal()
            mDlg.Destroy()
            self.Destroy()

        self.nbWin = wxNotebook(self, -1)

        self.buildMenu()
        self.name = name
        self.Center(wxBOTH)
        util.setIcon(self)
        self.Show(1)
Пример #6
0
def getFixedWidthLabel(parent, text, flags=0):
    lbl = wxStaticText(parent, -1, text, style=flags)
    #f = wx.Font(10, wxMODERN, wxNORMAL, wxNORMAL)
    #lbl.SetFont(f)
    lbl.SetFont(wx.SystemSettings.GetFont(wxSYS_OEM_FIXED_FONT))
    return lbl

def italicizeLabel(lbl):
    f = lbl.GetFont()
    f.SetStyle(wxITALIC)
    lbl.SetFont(f)
    return lbl

def startBuilder(parent):
    """Call this when starting the Wrestler Builder from another GUI window"""
    frame = wxFrame(parent, -1, "Wrestler Builder")
    frame.win = WrestlerCreator(frame)
    frame.statusBar = wxStatusBar(frame, -1)
    frame.SetStatusBar(frame.statusBar)
    setIcon(frame)
    frame.Show(1)
    
if __name__ == '__main__':
    app = wxPySimpleApp()
    frame = wxFrame(None, -1, "Wrestler Builder")
    frame.win = WrestlerCreator(frame)
    setIcon(frame)
    frame.Show(1)
    app.MainLoop()