diff --git a/gui/builtinStatsViews/rechargeViewFull.py b/gui/builtinStatsViews/rechargeViewFull.py index c02cf466a..f3d3d5fab 100644 --- a/gui/builtinStatsViews/rechargeViewFull.py +++ b/gui/builtinStatsViews/rechargeViewFull.py @@ -48,25 +48,33 @@ class RechargeViewFull(StatsView): #Add an empty label first for correct alignment. sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, ""), 0) + toolTipText = {"shieldPassive" : "Passive Shield Recharge", "shieldActive" : "Active Shield Recharge", "armorActive" : "Armor repair amount", "hullActive" : "Hull repair amount"} for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"): - sizerTankStats.Add(bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons"), 0, wx.ALIGN_CENTER) + bitmap = bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons") + tooltip = wx.ToolTip(toolTipText[tankType]) + bitmap.SetToolTip(tooltip) + sizerTankStats.Add(bitmap, 0, wx.ALIGN_CENTER) + toolTipText = {"reinforced" : "Reinforced", "sustained" : "Sustained"} for stability in ("reinforced", "sustained"): - sizerTankStats.Add(bitmapLoader.getStaticBitmap("regen%s_big" % stability.capitalize(), contentPanel, "icons"), 0, wx.ALIGN_CENTER) - for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"): - if stability == "reinforced" and tankType == "shieldPassive": - sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, "")) - continue + bitmap = bitmapLoader.getStaticBitmap("regen%s_big" % stability.capitalize(), contentPanel, "icons") + tooltip = wx.ToolTip(toolTipText[stability]) + bitmap.SetToolTip(tooltip) + sizerTankStats.Add(bitmap, 0, wx.ALIGN_CENTER) + for tankType in ("shieldPassive", "shieldActive", "armorActive", "hullActive"): + if stability == "reinforced" and tankType == "shieldPassive": + sizerTankStats.Add(wx.StaticText(contentPanel, wx.ID_ANY, "")) + continue - tankTypeCap = tankType[0].capitalize() + tankType[1:] - lbl = wx.StaticText(contentPanel, wx.ID_ANY, "0.0", style = wx.ALIGN_RIGHT) - setattr(self, "labelTank%s%s" % (stability.capitalize(), tankTypeCap), lbl) + tankTypeCap = tankType[0].capitalize() + tankType[1:] + lbl = wx.StaticText(contentPanel, wx.ID_ANY, "0.0", style = wx.ALIGN_RIGHT) + setattr(self, "labelTank%s%s" % (stability.capitalize(), tankTypeCap), lbl) - box = wx.BoxSizer(wx.HORIZONTAL) - box.Add(lbl, 0, wx.EXPAND) - box.Add(wx.StaticText(contentPanel, wx.ID_ANY, " HP/s"), 0, wx.EXPAND) + box = wx.BoxSizer(wx.HORIZONTAL) + box.Add(lbl, 0, wx.EXPAND) + box.Add(wx.StaticText(contentPanel, wx.ID_ANY, " HP/s"), 0, wx.EXPAND) - sizerTankStats.Add(box, 0, wx.ALIGN_CENTRE) + sizerTankStats.Add(box, 0, wx.ALIGN_CENTRE) contentPanel.Layout() diff --git a/gui/builtinStatsViews/resistancesViewFull.py b/gui/builtinStatsViews/resistancesViewFull.py index 1f416f3b3..a35d62e62 100644 --- a/gui/builtinStatsViews/resistancesViewFull.py +++ b/gui/builtinStatsViews/resistancesViewFull.py @@ -78,8 +78,12 @@ class ResistancesViewFull(StatsView): # Add an empty label, then the rest. sizerResistances.Add(wx.StaticText(contentPanel, wx.ID_ANY), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 )) col+=1 + toolTipText = {"em" : "EM", "thermal" : "Thermal", "kinetic" : "Kinetic", "explosive" : "Explosive"} for damageType in ("em", "thermal", "kinetic", "explosive"): - sizerResistances.Add(bitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "icons"), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER) + bitmap = bitmapLoader.getStaticBitmap("%s_big" % damageType, contentPanel, "icons") + tooltip = wx.ToolTip(toolTipText[damageType]) + bitmap.SetToolTip(tooltip) + sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER) col+=1 self.stEHPs = wx.StaticText(contentPanel, wx.ID_ANY, "EHP", style = wx.DOUBLE_BORDER) self.stEHPs.SetToolTip(wx.ToolTip("Click to toggle between effective HP and raw HP")) @@ -93,9 +97,13 @@ class ResistancesViewFull(StatsView): gaugeColours=( ((38,133,198),(52,86,98)), ((198,38,38),(83,65,67)), ((163,163,163),(74,90,93)), ((198,133,38),(81,83,67)) ) + toolTipText = {"shield" : "Shield", "armor" : "Armor", "hull" : "Hull", "damagePattern" : "Damage Pattern"} for tankType in ("shield", "armor", "hull", "separator", "damagePattern"): if tankType != "separator": - sizerResistances.Add(bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons"), wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER) + bitmap = bitmapLoader.getStaticBitmap("%s_big" % tankType, contentPanel, "icons") + tooltip = wx.ToolTip(toolTipText[tankType]) + bitmap.SetToolTip(tooltip) + sizerResistances.Add(bitmap, wx.GBPosition( row, col ), wx.GBSpan( 1, 1 ), wx.ALIGN_CENTER) col+=1 else: