Add ammo display when relevant as well as icons for the stats

This commit is contained in:
cncfanatics
2010-10-04 16:26:05 +02:00
parent 1ee8f481d6
commit c5e69816fa
5 changed files with 30 additions and 10 deletions

View File

@@ -41,7 +41,10 @@ class ItemStatsDialog(wx.Dialog):
item = getattr(victim, "item", None)
if item is None:
item = victim
victim = None
if item.icon is not None:
self.SetIcon(wx.IconFromBitmap(bitmapLoader.getBitmap(item.icon.iconFile, "pack")))
self.SetTitle("Item Stats: %s" % item.name)
self.SetMinSize((500, 300))
@@ -118,7 +121,7 @@ class ItemParams (wx.Panel):
for name, attr in attrs.iteritems():
index = self.paramList.InsertStringItem(sys.maxint, name)
self.paramList.SetStringItem(index, 1, str(attr))
self.paramList.SetStringItem(index, 1, str(attr) if stuff is not None else str(attr.value))
self.Layout()
###########################################################################