From b3320f637c51edb5f390c2ef4d1d4d906c16b59b Mon Sep 17 00:00:00 2001 From: Corollax Date: Sat, 30 Oct 2010 19:37:37 -0500 Subject: [PATCH] Added scan resolution lock time calculation Some common values are included, but the table looks like shite. I'm not sure how to format it properly when the text isn't monospaced. Someone else will need to take a look at it. For the time being, it works. --- eos | 2 +- .../targetingmiscViewFull.py | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/eos b/eos index 8bbf8c874..6f953b310 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit 8bbf8c874a1b2208754eed9e4cc80167041e2968 +Subproject commit 6f953b310344fe78cbb569670abb587e2c7dd67e diff --git a/gui/builtinStatsViews/targetingmiscViewFull.py b/gui/builtinStatsViews/targetingmiscViewFull.py index e53d046b8..c2d9d7d23 100644 --- a/gui/builtinStatsViews/targetingmiscViewFull.py +++ b/gui/builtinStatsViews/targetingmiscViewFull.py @@ -114,13 +114,22 @@ class TargetingMiscViewFull(StatsView): value = value if value is not None else 0 if self._cachedValues[counter] != value: label.SetLabel("%s %s" %(formatAmount(value, prec, lowest, highest), unit)) - if labelName is not "labelSensorStr": + # Tooltip stuff + RADII = [("Pod",25), ("Interceptor",33), ("Frigate",38), + ("Destroyer", 83), ("Cruiser", 130), + ("Battlecruiser", 265), ("Battleship",420)] + if labelName is "labelScanRes": + lockTime = "Lock Times\n" + for size, radius in RADII: + lockTime += "%s [%d]: %.1fs\n" % (size, radius, + fit.calculateLockTime(radius)) + label.SetToolTip(wx.ToolTip(lockTime)) + elif labelName is "labelSensorStr": + label.SetToolTip(wx.ToolTip("Type: %s - %.1f" % (fit.scanType, value))) + elif fit is not None: label.SetToolTip(wx.ToolTip("%.1f" % value)) - else: - if fit is not None: - label.SetToolTip(wx.ToolTip("Type: %s - %.1f" % (fit.scanType, value))) self._cachedValues[counter] = value - counter += 1 + counter += 1 self.panel.Layout() self.headerPanel.Layout()