From c93b4c9f4e347689540603a5abe241940d00f1f1 Mon Sep 17 00:00:00 2001 From: Corollax Date: Mon, 29 Nov 2010 02:44:07 -0600 Subject: [PATCH] Added tooltips for max warp dist and probe size Updated eos to include the new property functions that drive those tooltips. Also fixed an error on showing the ship stats attribute when an icon couldn't be found. --- eos | 2 +- gui/builtinStatsViews/targetingMiscViewFull.py | 7 ++++--- gui/itemStats.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/eos b/eos index 61bb6cf13..7cfbc8ff2 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit 61bb6cf132acb549c5722d231ef7c21ac9058e9a +Subproject commit 7cfbc8ff29b43d8a029553d3e51cbe1fa22d294b diff --git a/gui/builtinStatsViews/targetingMiscViewFull.py b/gui/builtinStatsViews/targetingMiscViewFull.py index ec172e3e5..1c6f45eb3 100644 --- a/gui/builtinStatsViews/targetingMiscViewFull.py +++ b/gui/builtinStatsViews/targetingMiscViewFull.py @@ -130,9 +130,10 @@ class TargetingMiscViewFull(StatsView): elif labelName is "labelSensorStr": label.SetToolTip(wx.ToolTip("Type: %s - %.1f" % (fit.scanType, value))) elif labelName is "labelFullSigRadius": - label.SetToolTip(wx.ToolTip("Probe Size: %.3f" % - ( float(fit.ship.getModifiedItemAttr("signatureRadius")) - / fit.scanStrength) )) + label.SetToolTip(wx.ToolTip("Probe Size: %.3f" % fit.probeSize)) + elif labelName is "labelFullWarpSpeed": + label.SetToolTip(wx.ToolTip("Max Warp Distance: %.1f AU" % + fit.maxWarpDistance)) elif fit is not None: label.SetToolTip(wx.ToolTip("%.1f" % value)) self._cachedValues[counter] = value diff --git a/gui/itemStats.py b/gui/itemStats.py index 6890c9079..3aaab545e 100644 --- a/gui/itemStats.py +++ b/gui/itemStats.py @@ -569,7 +569,8 @@ class ItemAffectedBy (wx.Panel): if afflictorType == Ship: itemIcon = self.imageList.Add(bitmapLoader.getBitmap("ship_small", "icons")) elif baseAfflictor.item.icon: - itemIcon = self.imageList.Add(bitmapLoader.getBitmap(baseAfflictor.item.icon.iconFile, "pack")) + bitmap = bitmapLoader.getBitmap(baseAfflictor.item.icon.iconFile, "pack") + itemIcon = self.imageList.Add(bitmap) if bitmap else -1 else: itemIcon = -1