Enable/disable edit menu options, and add color to character editor to show which skills are edited
This commit is contained in:
@@ -23,6 +23,7 @@ import bitmapLoader
|
||||
import gui.mainFrame
|
||||
import gui.graphFrame
|
||||
import gui.globalEvents as GE
|
||||
import service
|
||||
|
||||
class MainMenuBar(wx.MenuBar):
|
||||
def __init__(self):
|
||||
@@ -119,5 +120,14 @@ class MainMenuBar(wx.MenuBar):
|
||||
self.Enable(wx.ID_SAVEAS, enable)
|
||||
self.Enable(wx.ID_COPY, enable)
|
||||
self.Enable(self.exportSkillsNeededId, enable)
|
||||
event.Skip()
|
||||
|
||||
sChar = service.Character.getInstance()
|
||||
charID = self.mainFrame.charSelection.getActiveCharacter()
|
||||
char = sChar.getCharacter(charID)
|
||||
|
||||
# enable/disable character saving stuff
|
||||
self.Enable(self.saveCharId, not char.ro and char.isDirty)
|
||||
self.Enable(self.saveCharAsId, char.isDirty)
|
||||
self.Enable(self.revertCharId, char.isDirty)
|
||||
|
||||
event.Skip()
|
||||
|
||||
Reference in New Issue
Block a user