From d5a701ab314830198e7c1972db3c5a0a2d75bd6b Mon Sep 17 00:00:00 2001 From: blitzmann Date: Wed, 27 Aug 2014 21:22:53 -0400 Subject: [PATCH] If in debug mode, open effect file when double clicking effect (windows only) --- gui/itemStats.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gui/itemStats.py b/gui/itemStats.py index 21ef68cdc..c44e7d709 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -27,6 +27,7 @@ import wx.html from eos.types import Ship, Module, Skill, Booster, Implant, Drone from gui.utils.numberFormatter import formatAmount import service +import config try: from collections import OrderedDict @@ -517,6 +518,9 @@ class ItemEffects (wx.Panel): mainSizer.Add( self.effectList, 1, wx.ALL|wx.EXPAND, 0 ) self.SetSizer( mainSizer ) + if config.debug: + self.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnClick, self.effectList) + self.effectList.InsertColumn(0,"Name") self.effectList.InsertColumn(1,"Implemented") @@ -543,6 +547,12 @@ class ItemEffects (wx.Panel): self.effectList.RefreshRows() self.Layout() + def OnClick(self, event): + import os + file = os.path.join(config.pyfaPath,"eos","effects","%s.py"%event.GetText().lower()) + if 'wxMSW' in wx.PlatformInfo: + os.startfile(file) + ########################################################################### ## Class ItemAffectedBy