comparison orpg/main.py @ 4:c0da99091e1d grumpy-goblin

Check out the new About Dialog.
author sirebral
date Wed, 15 Jul 2009 02:09:11 -0500
parents 4385a7d0efd1
children 5a2c95067daf
comparison
equal deleted inserted replaced
3:28ad6bd3ac71 4:c0da99091e1d
596 self._mgr.Update() 596 self._mgr.Update()
597 self.log.log("Exit orpgFrame->OnMB_ToolsMapBar(self)", ORPG_DEBUG) 597 self.log.log("Exit orpgFrame->OnMB_ToolsMapBar(self)", ORPG_DEBUG)
598 598
599 #Help Menu 599 #Help Menu
600 def OnMB_HelpAbout(self): 600 def OnMB_HelpAbout(self):
601 "The about box. We're making it n HTML about box because it's pretty cool!" 601
602 "Inspired by the wxWindows about.cpp sample." 602 description = """OpenRPG is a Virtual Game Table that allows users to connect via a network and play table
603 topSizer = wx.BoxSizer( wx.VERTICAL ) 603 top games with friends. 'Traipse' is an OpenRPG distro that is easy to setup and provides superb
604 dlg = wx.Dialog( self, -1, "About" ) 604 functionality. OpenRPG is originally designed by Chris Davis."""
605 html = AboutHTMLWindow( dlg, -1, wx.DefaultPosition, wx.Size(400, 200), wx.html.HW_SCROLLBAR_NEVER ) 605
606 html.SetBorders( 0 ) 606 license = """OpenRPG is free software; you can redistribute it and/or modify it
607 replace_text = "VeRsIoNrEpLaCeMeNtStRiNg" 607 under the terms of the GNU General Public License as published by the Free Software Foundation;
608 about_file = open(orpg.dirpath.dir_struct["template"]+"about.html","r") 608 either version 2 of the License, or (at your option) any later version.
609 about_text = about_file.read() 609
610 about_file.close() 610 OpenRPG and Traipse 'OpenRPG' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
611 display_text = string.replace(about_text,replace_text,VERSION) 611 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
612 html.SetPage(display_text) 612 See the GNU General Public License for more details. You should have received a copy of
613 html.SetSize( wx.Size(html.GetInternalRepresentation().GetWidth(), 613 the GNU General Public License along with Traipse 'OpenRPG'; if not, write to
614 html.GetInternalRepresentation().GetHeight()) ) 614 the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
615 topSizer.Add( html, 1, wx.ALL, 10 ) 615
616 topSizer.Add( wx.StaticLine( dlg, -1), 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 10 ) 616 'Traipse' and the 'Traipse' Logo are trademarks of Mad Mathematics Laboratories."""
617 Okay = wx.Button( dlg, wx.ID_OK, "Okay" ) 617
618 Okay.SetDefault() 618 info = wx.AboutDialogInfo()
619 topSizer.Add( Okay, 0, wx.ALL | wx.ALIGN_RIGHT, 15 ) 619 info.SetIcon(wx.Icon(orpg.dirpath.dir_struct["icon"]+'splash.gif', wx.BITMAP_TYPE_GIF))
620 dlg.SetAutoLayout( True ) 620 info.SetName('Traipse')
621 dlg.SetSizer( topSizer ) 621 info.SetVersion('OpenRPG ' + VERSION)
622 topSizer.Fit( dlg ) 622 info.SetDescription(description)
623 dlg.ShowModal() 623 info.SetCopyright('(C) 2009 Mad Math Labs')
624 dlg.Destroy() 624 info.SetWebSite('http://www.openrpg.com')
625 info.SetLicence(license)
626 orpg_devs = ['Thomas Baleno', 'Andrew Bennett', 'Lex Berezhny', 'Ted Berg',
627 'Bernhard Bergbauer', 'Chris Blocher', 'David Byron', 'Ben Collins-Sussman', 'Robin Cook', 'Greg Copeland',
628 'Chris Davis', 'Michael Edwards', 'Andrew Ettinger', 'Todd Faris', 'Dj Gilcrease',
629 'Christopher Hickman', 'Paul Hosking', 'Brian Manning', 'Scott Mackay', 'Jesse McConnell',
630 'Brian Osman', 'Rome Reginelli', 'Christopher Rouse', 'Dave Sanders', 'Tyler Starke', 'Mark Tarrabain']
631 for dev in orpg_devs:
632 info.AddDeveloper(dev)
633 #info.AddDocWriter('jan bodnar')
634 #info.AddArtist('The Tango crew')
635 #info.AddTranslator('jan bodnar')
636 wx.AboutBox(info)
625 637
626 def OnMB_HelpOnlineUserGuide(self): 638 def OnMB_HelpOnlineUserGuide(self):
627 wb = webbrowser.get() 639 wb = webbrowser.get()
628 wb.open("https://www.assembla.com/wiki/show/openrpg/User_Manual") 640 wb.open("https://www.assembla.com/wiki/show/traipse/User_Manual")
629 641
630 def OnMB_HelpChangeLog(self): 642 def OnMB_HelpChangeLog(self):
631 wb = webbrowser.get() 643 wb = webbrowser.get()
632 wb.open("http://www.assembla.com/spaces/milestones/index/openrpg?spaces_tool_id=Milestones") 644 wb.open("http://www.assembla.com/spaces/milestones/index/traipse_dev?spaces_tool_id=Milestones")
633 645
634 def OnMB_HelpReportaBug(self): 646 def OnMB_HelpReportaBug(self):
635 wb = webbrowser.get() 647 wb = webbrowser.get()
636 wb.open("http://www.assembla.com/spaces/tickets/index/openrpg?spaces_tool_id=Tickets") 648 wb.open("http://www.assembla.com/spaces/tickets/index/traipse_dev?spaces_tool_id=Tickets")
637 649
638 650
639 ################################# 651 #################################
640 ## Build the GUI 652 ## Build the GUI
641 ################################# 653 #################################