From 5a5e79fedf8137c8c59d46d62530c894612b40c6 Mon Sep 17 00:00:00 2001 From: Corollax Date: Tue, 26 Oct 2010 10:30:04 -0500 Subject: [PATCH 1/3] Swapped drone and launcher resource information Had to make sure that calibration wasn't on the same line as active drones. Could probably still use some editing on text buffering, but this is pretty much what we wanted. Awesome. --- gui/builtinStatsViews/resourcesViewFull.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/builtinStatsViews/resourcesViewFull.py b/gui/builtinStatsViews/resourcesViewFull.py index 3a38b166c..df72a5b7d 100644 --- a/gui/builtinStatsViews/resourcesViewFull.py +++ b/gui/builtinStatsViews/resourcesViewFull.py @@ -58,8 +58,8 @@ class ResourcesViewFull(StatsView): base.Add(sizer, 0, wx.ALIGN_CENTER) #Turrets & launcher hardslots display - tooltipText = {"turret":"Turret hardpoints", "launcher":"Launcher hardpoints", "drones":"Drones active", "calibration":"Calibration"} - for type in ("turret", "launcher", "drones", "calibration"): + tooltipText = {"turret":"Turret hardpoints", "drones":"Drones active", "launcher":"Launcher hardpoints", "calibration":"Calibration"} + for type in ("turret", "drones", "launcher", "calibration"): outerBox = wx.BoxSizer(wx.VERTICAL) box = wx.BoxSizer(wx.HORIZONTAL) @@ -72,7 +72,7 @@ class ResourcesViewFull(StatsView): sizer.Add(outerBox, 0, wx.ALIGN_CENTER) - suffix = {'turret':'Hardpoints', 'launcher':'Hardpoints', 'drones':'Active', 'calibration':'Points'} + suffix = {'turret':'Hardpoints', 'drones':'Active', 'launcher':'Hardpoints', 'calibration':'Points'} lbl = wx.StaticText(parent, wx.ID_ANY, "0") setattr(self, "label%sUsed%s%s" % (panel.capitalize(), type.capitalize(), suffix[type].capitalize()), lbl) box.Add(lbl, 0, wx.ALIGN_CENTER) @@ -137,10 +137,10 @@ class ResourcesViewFull(StatsView): stats = (("label%sUsedTurretHardpoints", lambda: fit.getHardpointsUsed(Hardpoint.TURRET), 0, 0, 0), ("label%sTotalTurretHardpoints", lambda: fit.ship.getModifiedItemAttr('turretSlotsLeft'), 0, 0, 0), - ("label%sUsedLauncherHardpoints", lambda: fit.getHardpointsUsed(Hardpoint.MISSILE), 0, 0, 0), - ("label%sTotalLauncherHardpoints", lambda: fit.ship.getModifiedItemAttr('launcherSlotsLeft'), 0, 0, 0), ("label%sUsedDronesActive", lambda: fit.activeDrones, 0, 0, 0), ("label%sTotalDronesActive", lambda: fit.maxActiveDrones, 0, 0, 0), + ("label%sUsedLauncherHardpoints", lambda: fit.getHardpointsUsed(Hardpoint.MISSILE), 0, 0, 0), + ("label%sTotalLauncherHardpoints", lambda: fit.ship.getModifiedItemAttr('launcherSlotsLeft'), 0, 0, 0), ("label%sUsedCalibrationPoints", lambda: fit.calibrationUsed, 0, 0, 0), ("label%sTotalCalibrationPoints", lambda: fit.ship.getModifiedItemAttr('upgradeCapacity'), 0, 0, 0), ("label%sUsedPg", lambda: fit.pgUsed, 4, 0, 9), From a2ace99a72be08de1c840c06a169c19eb3de1dee Mon Sep 17 00:00:00 2001 From: Corollax Date: Tue, 26 Oct 2010 10:38:14 -0500 Subject: [PATCH 2/3] Added some buffer space around the resources tabs. Looks much better. Just had to change one value. --- gui/builtinStatsViews/resourcesViewFull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/builtinStatsViews/resourcesViewFull.py b/gui/builtinStatsViews/resourcesViewFull.py index df72a5b7d..2b024e811 100644 --- a/gui/builtinStatsViews/resourcesViewFull.py +++ b/gui/builtinStatsViews/resourcesViewFull.py @@ -50,7 +50,7 @@ class ResourcesViewFull(StatsView): panel = "full" sizer = wx.FlexGridSizer(2, 2) - sizer.SetMinSize(wx.Size(27 + self.getTextExtentW("400/400"), 0)) + sizer.SetMinSize(wx.Size(50 + self.getTextExtentW("400/400"), 0)) for i in xrange(3): sizer.AddGrowableCol(i + 1) From 31e738f43a08fd9788605a885930e15ed1f82f16 Mon Sep 17 00:00:00 2001 From: Corollax Date: Tue, 26 Oct 2010 10:44:39 -0500 Subject: [PATCH 3/3] Just a bit more fine tuning. This is a good. Just trying to compromise so space isn't wasted. --- gui/builtinStatsViews/resourcesViewFull.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/builtinStatsViews/resourcesViewFull.py b/gui/builtinStatsViews/resourcesViewFull.py index 2b024e811..f602392c3 100644 --- a/gui/builtinStatsViews/resourcesViewFull.py +++ b/gui/builtinStatsViews/resourcesViewFull.py @@ -50,7 +50,7 @@ class ResourcesViewFull(StatsView): panel = "full" sizer = wx.FlexGridSizer(2, 2) - sizer.SetMinSize(wx.Size(50 + self.getTextExtentW("400/400"), 0)) + sizer.SetMinSize(wx.Size(36 + self.getTextExtentW("400/400"), 0)) for i in xrange(3): sizer.AddGrowableCol(i + 1)