From 7ec78b941edb741d5ec3c8aeb32183a64e1661fa Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 24 Jun 2015 15:10:37 -0400 Subject: [PATCH] Add help text for why api is disabled, per #269. I may or may not make it look nicer later --- gui/characterEditor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index be77c8d21..57242a92d 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -147,6 +147,7 @@ class CharacterEditor(wx.Frame): def restrict(self): self.btnRename.Enable(False) self.btnDelete.Enable(False) + self.aview.stDisabledTip.Show(True) self.aview.inputID.Enable(False) self.aview.inputKey.Enable(False) self.aview.charChoice.Enable(False) @@ -158,6 +159,7 @@ class CharacterEditor(wx.Frame): def unrestrict(self): self.btnRename.Enable(True) self.btnDelete.Enable(True) + self.aview.stDisabledTip.Show(False) self.aview.inputID.Enable(True) self.aview.inputKey.Enable(True) self.aview.btnFetchCharList.Enable(True) @@ -537,6 +539,11 @@ class APIView (wx.Panel): pmainSizer = wx.BoxSizer(wx.VERTICAL) + self.stDisabledTip = wx.StaticText( self, wx.ID_ANY, u"You cannot add API Details for All 0 and All 5 characters. Please select another character or make a new one.", style=wx.ALIGN_CENTER ) + self.stDisabledTip.Wrap( -1 ) + + pmainSizer.Add( self.stDisabledTip, 0, wx.ALL, 2 ) + fgSizerInput = wx.FlexGridSizer(3, 2, 0, 0) fgSizerInput.AddGrowableCol(1) fgSizerInput.SetFlexibleDirection(wx.BOTH)