Add tooltip and also a minimal version of the view (for future state).

This commit is contained in:
Ebag333
2017-02-15 19:11:32 -08:00
parent 13996d7770
commit eb97a1c11c
2 changed files with 116 additions and 6 deletions

View File

@@ -53,22 +53,24 @@ class OutgoingViewFull(StatsView):
counter = 0
rr_list = [
("RemoteArmor", "Armor RR", "armorActive"),
("RemoteShield", "Shield RR", "shieldActive"),
("RemoteHull", "Hull RR", "hullActive"),
("RemoteCapacitor", "Capacitor RR", "capacitorInfo"),
("RemoteArmor", "Armor:", "armorActive", "Armor hitpoints per second repaired remotely."),
("RemoteShield", "Shield:", "shieldActive", "Shield hitpoints per second repaired remotely."),
("RemoteHull", "Hull:", "hullActive", "Hull hitpoints per second repaired remotely."),
("RemoteCapacitor", "Capacitor:", "capacitorInfo", "Capacitor GJ/s per second transferred remotely."),
]
for outgoingType, label, image in rr_list:
for outgoingType, label, image, tooltip in rr_list:
baseBox = wx.BoxSizer(wx.VERTICAL)
baseBox.Add(BitmapLoader.getStaticBitmap("%s_big" % image, parent, "gui"), 0, wx.ALIGN_CENTER)
if "Capacitor" in label:
if "Capacitor" in outgoingType:
lbl = wx.StaticText(parent, wx.ID_ANY, u"0 GJ/s")
else:
lbl = wx.StaticText(parent, wx.ID_ANY, u"0 HP/s")
lbl.SetToolTip(wx.ToolTip(tooltip))
setattr(self, "label%s" % outgoingType, lbl)
baseBox.Add(lbl, 0, wx.ALIGN_CENTER)