Fix floats in skill tree, and fix typo - apparently I can't spell dependents x_x
This commit is contained in:
@@ -413,7 +413,7 @@ class SkillTreeView(wx.Panel):
|
||||
iconId = self.skillBookImageId
|
||||
childId = tree.AppendItem(root, name, iconId, data=wx.TreeItemData(id))
|
||||
level, dirty = sChar.getSkillLevel(char.ID, id)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, float) else level, 1)
|
||||
tree.SetItemText(childId, "Level %d" % int(level) if isinstance(level, float) else level, 1)
|
||||
if dirty:
|
||||
tree.SetItemTextColour(childId, wx.BLUE)
|
||||
|
||||
@@ -461,7 +461,7 @@ class SkillTreeView(wx.Panel):
|
||||
iconId = self.skillBookImageId
|
||||
childId = tree.AppendItem(root, name, iconId, data=wx.TreeItemData(id))
|
||||
level, dirty = sChar.getSkillLevel(char.ID, id)
|
||||
tree.SetItemText(childId, "Level %d" % level if isinstance(level, float) else level, 1)
|
||||
tree.SetItemText(childId, "Level %d" % int(level) if isinstance(level, float) else level, 1)
|
||||
if dirty:
|
||||
tree.SetItemTextColour(childId, wx.BLUE)
|
||||
|
||||
@@ -512,7 +512,7 @@ class SkillTreeView(wx.Panel):
|
||||
# grand = Skill (or "dummy" if not expanded)
|
||||
if self.skillTreeListCtrl.GetItemText(grand) != "dummy":
|
||||
lvl, dirty = sChar.getSkillLevel(char.ID, self.skillTreeListCtrl.GetPyData(grand))
|
||||
self.skillTreeListCtrl.SetItemText(grand, "Level {}".format(lvl) if not isinstance(lvl, basestring) else lvl, 1)
|
||||
self.skillTreeListCtrl.SetItemText(grand, "Level {}".format(int(lvl)) if not isinstance(lvl, basestring) else lvl, 1)
|
||||
if not dirty:
|
||||
self.skillTreeListCtrl.SetItemTextColour(grand, None)
|
||||
grand, cookie2 = self.skillTreeListCtrl.GetNextChild(child, cookie2)
|
||||
|
||||
@@ -192,8 +192,8 @@ class ItemStatsContainer(wx.Panel):
|
||||
self.nbContainer.AddPage(self.reqs, "Requirements")
|
||||
|
||||
if context == "Skill":
|
||||
self.dependants = ItemDependants(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.dependants, "Dependants")
|
||||
self.dependents = ItemDependents(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.dependents, "Dependents")
|
||||
|
||||
self.effects = ItemEffects(self.nbContainer, stuff, item)
|
||||
self.nbContainer.AddPage(self.effects, "Effects")
|
||||
@@ -766,7 +766,7 @@ class ItemRequirements(wx.Panel):
|
||||
self.skillIdHistory.append(skill.ID)
|
||||
|
||||
|
||||
class ItemDependants(wx.Panel):
|
||||
class ItemDependents(wx.Panel):
|
||||
def __init__(self, parent, stuff, item):
|
||||
wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user