From b3320f637c51edb5f390c2ef4d1d4d906c16b59b Mon Sep 17 00:00:00 2001 From: Corollax Date: Sat, 30 Oct 2010 19:37:37 -0500 Subject: [PATCH 1/2] 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() From 95aa251a6ef3fbd4b31b64e63089b74194bab205 Mon Sep 17 00:00:00 2001 From: Corollax Date: Sat, 30 Oct 2010 21:07:00 -0500 Subject: [PATCH 2/2] Improved tooltip formatting AMARRIAN SCORNED FSCKING PROPORTIONAL FSCKING FONTS --- gui/builtinStatsViews/targetingmiscViewFull.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gui/builtinStatsViews/targetingmiscViewFull.py b/gui/builtinStatsViews/targetingmiscViewFull.py index c2d9d7d23..9bcb97918 100644 --- a/gui/builtinStatsViews/targetingmiscViewFull.py +++ b/gui/builtinStatsViews/targetingmiscViewFull.py @@ -119,10 +119,12 @@ class TargetingMiscViewFull(StatsView): ("Destroyer", 83), ("Cruiser", 130), ("Battlecruiser", 265), ("Battleship",420)] if labelName is "labelScanRes": - lockTime = "Lock Times\n" + lockTime = "%s\n" % "Lock Times".center(28) for size, radius in RADII: - lockTime += "%s [%d]: %.1fs\n" % (size, radius, - fit.calculateLockTime(radius)) + left = "%s [%d]" % (size, radius) + right = "%.1fs" % fit.calculateLockTime(radius) + lockTime += "%-19s : %+5s\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)))