translate attributeID stuff
This commit is contained in:
@@ -309,12 +309,17 @@ class ItemParams (wx.Panel):
|
||||
group = service.Market.getInstance().getGroup(value)
|
||||
return "%s (%d)" % (group.name, value) if group is not None else str(value)
|
||||
|
||||
def attributeIDCallback():
|
||||
attribute = service.Attribute.getInstance().getAttributeInfo(value)
|
||||
return "%s (%d)" % (attribute.name.capitalize(), value)
|
||||
|
||||
trans = {"Inverse Absolute Percent": (lambda: (1-value)*100, unitName),
|
||||
"Milliseconds": (lambda: value / 1000.0, unitName),
|
||||
"Volume": (lambda: value, u"m\u00B3"),
|
||||
"Sizeclass": (lambda: value, ""),
|
||||
"typeID": (itemIDCallback, ""),
|
||||
"groupID": (groupIDCallback,"")}
|
||||
"groupID": (groupIDCallback,""),
|
||||
"attributeID": (attributeIDCallback, "")}
|
||||
|
||||
override = trans.get(unitDisplayName)
|
||||
if override is not None:
|
||||
|
||||
Reference in New Issue
Block a user