From 9dd5c402d83c01500e5c28d91c14e580cbf8662a Mon Sep 17 00:00:00 2001 From: Corollax Date: Mon, 29 Nov 2010 00:53:53 -0600 Subject: [PATCH] Various refinements to tooltips Implemented a Probe Size tooltip for signature radius that gives the TargetSize. If it's < 1.08, you're unprobeable :) --- gui/builtinStatsViews/targetingMiscViewFull.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/gui/builtinStatsViews/targetingMiscViewFull.py b/gui/builtinStatsViews/targetingMiscViewFull.py index bbbbe83d4..0734a7f14 100644 --- a/gui/builtinStatsViews/targetingMiscViewFull.py +++ b/gui/builtinStatsViews/targetingMiscViewFull.py @@ -99,7 +99,7 @@ class TargetingMiscViewFull(StatsView): stats = (("labelTargets", lambda: fit.maxTargets, 3, 0, 0, ""), ("labelRange", lambda: fit.maxTargetRange / 1000, 3, 0, 0, "km"), - ("labelScanRes", lambda: fit.ship.getModifiedItemAttr('scanResolution'), 3, 0, 0, "mm"), + ("labelScanRes", lambda: fit.ship.getModifiedItemAttr("scanResolution"), 3, 0, 0, "mm"), ("labelSensorStr", lambda: fit.scanStrength, 3, 0, 0, ""), ("labelCtrlRange", lambda: fit.extraAttributes["droneControlRange"] / 1000, 3, 0, 0, "km"), ("labelFullSpeed", lambda: fit.ship.getModifiedItemAttr("maxVelocity"), 3, 0, 0, "m/s"), @@ -120,15 +120,20 @@ class TargetingMiscViewFull(StatsView): ("Destroyer", 83), ("Cruiser", 130), ("Battlecruiser", 265), ("Battleship",420)] if labelName is "labelScanRes": - lockTime = "%s\n" % "Lock Times".center(28) + lockTime = "%s\n" % "Lock Times".center(26) for size, radius in RADII: - left = "%s [%d] " % (size, radius) - right = "% .1fs" % fit.calculateLockTime(radius) - lockTime += "%s\t%s\n" % (right,left) + left = "%.1fs" % fit.calculateLockTime(radius) + right = "%s [%d]" % (size, radius) + lockTime += "%5s\t%s\n" % (left,right) # print lockTime # THIS IS ALIGNED! label.SetToolTip(wx.ToolTip(lockTime)) elif labelName is "labelSensorStr": label.SetToolTip(wx.ToolTip("Type: %s - %.1f" % (fit.scanType, value))) + elif labelName is "labelFullSigRadius": + pass + label.SetToolTip(wx.ToolTip("Probe Size: %.1f" % + ( float(fit.ship.getModifiedItemAttr("signatureRadius")) + / fit.ship.getModifiedItemAttr("scanResolution")) )) elif fit is not None: label.SetToolTip(wx.ToolTip("%.1f" % value)) self._cachedValues[counter] = value