Price options labels + total computing in minimal
This commit is contained in:
@@ -11,6 +11,7 @@ class PriceOptions(ContextMenu):
|
||||
def __init__(self):
|
||||
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
|
||||
self.settings = PriceMenuSettings.getInstance()
|
||||
self.optionList = ["Ship", "Modules", "Drones", "Cargo", "Character"]
|
||||
|
||||
def display(self, srcContext, selection):
|
||||
return srcContext in ("priceViewFull", "priceViewMinimal")
|
||||
@@ -33,16 +34,16 @@ class PriceOptions(ContextMenu):
|
||||
|
||||
sub = wx.Menu()
|
||||
|
||||
for option in self.settings.PriceMenuDefaultSettings.info:
|
||||
for option in self.optionList:
|
||||
menuItem = self.addOption(rootMenu if msw else sub, option)
|
||||
sub.AppendItem(menuItem)
|
||||
menuItem.Check(self.settings.get(option))
|
||||
menuItem.Check(self.settings.get(option.lower()))
|
||||
|
||||
return sub
|
||||
|
||||
def handleMode(self, event):
|
||||
option = self.optionIds[event.Id]
|
||||
self.settings.set(option, event.Int)
|
||||
self.settings.set(option.lower(), event.Int)
|
||||
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=self.mainFrame.getActiveFit()))
|
||||
|
||||
|
||||
@@ -127,20 +127,15 @@ class PriceViewMinimal(StatsView):
|
||||
|
||||
if (self.settings.get("ship")):
|
||||
total_price += ship_price
|
||||
if(self.settings.get("modules")):
|
||||
if (self.settings.get("modules")):
|
||||
total_price += module_price
|
||||
if(self.settings.get("drones")):
|
||||
if (self.settings.get("drones")):
|
||||
total_price += drone_price + fighter_price
|
||||
if(self.settings.get("cargo")):
|
||||
if (self.settings.get("cargo")):
|
||||
total_price += cargo_price
|
||||
if(self.settings.get("character")):
|
||||
if (self.settings.get("character")):
|
||||
total_price += booster_price + implant_price
|
||||
|
||||
|
||||
|
||||
|
||||
total_price = ship_price + fitting_price
|
||||
|
||||
self.labelPriceShip.SetLabel("%s ISK" % formatAmount(ship_price, 3, 3, 9, currency=True))
|
||||
self.labelPriceShip.SetToolTip(wx.ToolTip('{:,.2f}'.format(ship_price)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user