本文整理汇总了Python中Menu.setStatics方法的典型用法代码示例。如果您正苦于以下问题:Python Menu.setStatics方法的具体用法?Python Menu.setStatics怎么用?Python Menu.setStatics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Menu
的用法示例。
在下文中一共展示了Menu.setStatics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TFM_Frame
# 需要导入模块: import Menu [as 别名]
# 或者: from Menu import setStatics [as 别名]
class TFM_Frame(wx.Frame):
def __init__(self, parent, id, title, size, pos):
wx.Frame.__init__(self, parent, id, title, pos, size)
self.VERSION_TYPE = "Version: Alpha - 0.3.1"
self.addMenu()
self.HotKeyMachine = HotKeys()
self.mySettings = Settings(self, "Settings - More options coming soon")
self.url = ""
# Hook the new game selection option prior to loading the game
self.Panel = MyPanel(self, "http://www.transformice.com/TransformiceChargeur.swf")
self.Show(True)
# thread.start_new_thread(self.checkUpdates, ())
def getSize(self):
return global_size
def addMenu(self):
self.Menu = Menu()
self.Menu.setStatics()
##################### Bind the Menu Statics ##########################
self.Bind(wx.EVT_MENU, self.onCredits, self.Menu.creditsMenu)
self.Bind(wx.EVT_MENU, self.onHelp, self.Menu.helpMenu)
self.Bind(wx.EVT_MENU, self.onExit, self.Menu.quitMenu)
self.Bind(wx.EVT_MENU, self.alignNorth, self.Menu.alignItem.MenuItems[1])
self.Bind(wx.EVT_MENU, self.alignSouth, self.Menu.alignItem.MenuItems[2])
self.Bind(wx.EVT_MENU, self.alignEast, self.Menu.alignItem.MenuItems[3])
self.Bind(wx.EVT_MENU, self.alignWest, self.Menu.alignItem.MenuItems[4])
self.Bind(wx.EVT_MENU, self.alignNorthEast, self.Menu.alignItem.MenuItems[5])
self.Bind(wx.EVT_MENU, self.alignNorthWest, self.Menu.alignItem.MenuItems[6])
self.Bind(wx.EVT_MENU, self.alignSouthEast, self.Menu.alignItem.MenuItems[7])
self.Bind(wx.EVT_MENU, self.alignSouthWest, self.Menu.alignItem.MenuItems[8])
self.Bind(wx.EVT_MENU, self.alignNeutral, self.Menu.alignItem.MenuItems[0])
self.Bind(wx.EVT_MENU, self.setZoom, self.Menu.zoomMenu)
self.Bind(wx.EVT_MENU, self.initRefresh, self.Menu.refreshMenu)
self.Bind(wx.EVT_MENU, self.initPause, self.Menu.pauseMenu)
self.Bind(wx.EVT_MENU, self.initFS, self.Menu.fsMenu)
self.Bind(wx.EVT_MENU, self.pictionaryHK, self.Menu.hkItem.MenuItems[0])
self.Bind(wx.EVT_MENU, self.deathmatchHK, self.Menu.hkItem.MenuItems[1])
self.Bind(wx.EVT_MENU, self.shamanHK, self.Menu.hkItem.MenuItems[2])
self.Bind(wx.EVT_MENU, self.transformapHK, self.Menu.hkItem.MenuItems[3])
self.Bind(wx.EVT_MENU, self.tribeHouseHK, self.Menu.hkItem.MenuItems[4])
self.Bind(wx.EVT_MENU, self.eventHK, self.Menu.hkItem.MenuItems[5])
self.Bind(wx.EVT_MENU, self.disableHK, self.Menu.hkItem.MenuItems[6])
self.Bind(wx.EVT_MENU, self.initScrn, self.Menu.scrnMenu)
self.Bind(wx.EVT_MENU, self.onSettings, self.Menu.settingMenu)
for x in range(13):
self.Bind(wx.EVT_MENU, self.saveXML, self.Menu.saveItem.MenuItems[x])
self.SetMenuBar(self.Menu.MenuBar)
def onExit(self, event):
self.Close()
def onCredits(self, event):
About(self.VERSION_TYPE)
def alignNeutral(self, event):
Save("MapSaves/Settings.csv", "0", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(0)
def alignNorth(self, event):
Save("MapSaves/Settings.csv", "4", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(4)
def alignSouth(self, event):
Save("MapSaves/Settings.csv", "8", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(8)
def alignEast(self, event):
Save("MapSaves/Settings.csv", "2", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(2)
def alignWest(self, event):
Save("MapSaves/Settings.csv", "3", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(3)
def alignNorthEast(self, event):
Save("MapSaves/Settings.csv", "6", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(6)
def alignNorthWest(self, event):
Save("MapSaves/Settings.csv", "5", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(5)
def alignSouthEast(self, event):
Save("MapSaves/Settings.csv", "10", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(10)
def alignSouthWest(self, event):
Save("MapSaves/Settings.csv", "9", "Align", 0).injectCSV()
self.Panel.flash._set_AlignMode(9)
def setZoom(self, event):
self.Panel.flash._set_Scale("noscale")
def initRefresh(self, event):
#Kills Current Panel completely, and inits a new one complete with flashy goodness.
self.Panel.Destroy()
#.........这里部分代码省略.........