Bind the main menu entry for the damage pattern editor
This commit is contained in:
@@ -16,7 +16,6 @@ class DamagePattern(ContextMenu):
|
||||
return map(lambda p: p.name, sDP.getDamagePatternList())
|
||||
|
||||
def activate(self, context, selection, i):
|
||||
dlg=DmgPatternEditorDlg(self.mainFrame)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
pass
|
||||
|
||||
DamagePattern.register()
|
||||
|
||||
@@ -29,6 +29,7 @@ from gui.shipBrowser import ShipBrowser
|
||||
from wx.lib.wordwrap import wordwrap
|
||||
from gui.characterEditor import CharacterEditor
|
||||
from gui.characterSelection import CharacterSelection
|
||||
from gui.patternEditor import DmgPatternEditorDlg
|
||||
import aboutData
|
||||
import gui.fittingView as fv
|
||||
from wx._core import PyDeadObjectError
|
||||
@@ -132,6 +133,11 @@ class MainFrame(wx.Frame):
|
||||
cFit.clearFit(self.getActiveFit())
|
||||
wx.PostEvent(self, fv.FitChanged(fitID=self.getActiveFit()))
|
||||
|
||||
def showDamagePatternEditor(self, event):
|
||||
dlg=DmgPatternEditorDlg(self)
|
||||
dlg.ShowModal()
|
||||
dlg.Destroy()
|
||||
|
||||
def registerMenu(self):
|
||||
# Quit
|
||||
self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT)
|
||||
@@ -141,6 +147,8 @@ class MainFrame(wx.Frame):
|
||||
self.Bind(wx.EVT_MENU, self.ShowAboutBox, id=wx.ID_ABOUT)
|
||||
# Char editor
|
||||
self.Bind(wx.EVT_MENU, self.showCharacterEditor, id=self.GetMenuBar().characterEditorId)
|
||||
# Damage pattern editor
|
||||
self.Bind(wx.EVT_MENU, self.showDamagePatternEditor, id=self.GetMenuBar().damagePatternEditorId)
|
||||
|
||||
def toggleShipBrowser(self, event):
|
||||
self.GetToolBar().toggleShipBrowser(event)
|
||||
|
||||
@@ -48,7 +48,7 @@ class MainMenuBar(wx.MenuBar):
|
||||
|
||||
# Character menu
|
||||
windowMenu = wx.Menu()
|
||||
self.Append(windowMenu, "&Windows")
|
||||
self.Append(windowMenu, "&Window")
|
||||
|
||||
charEditItem = wx.MenuItem(windowMenu, self.characterEditorId, "&Character Editor\tCTRL+E")
|
||||
charEditItem.SetBitmap(bitmapLoader.getBitmap("character_small", "icons"))
|
||||
|
||||
Reference in New Issue
Block a user