Example #1
0
    def fill_info(self, box):
        self.add_label("<big><big>%s</big></big>" % self.sheet.name, box)
        self.add_label("<small>%s %s %s</small>" % (self.sheet.gender, 
            self.sheet.race, self.sheet.bloodLine), box)
        self.add_label("", box, markup=False)
        self.add_label("<small><b>Corp:</b> %s</small>" % self.sheet.corporationName, box)
        self.add_label("<small><b>Balance:</b> %s ISK</small>" % 
                util.comma(self.sheet.balance), box)

        self.live_sp_val = self.controller.get_sp(self.uid, self.char_id)
        self.live_sp = self.add_label("<small><b>Total SP:</b> %s</small>" %
                util.comma(int(self.live_sp_val)), box)
        
        self.spps = self.controller.get_spps(self.uid, self.char_id)[0]
Example #2
0
    def get_skills(self):
        self.clear()
        
        key_id = self.controller.charid2key_id(self.charID)

        self.sheet = self.controller.get_char_sheet(key_id, self.charID)
        
        skilltree = self.controller.get_skill_tree()

        for g in skilltree.skillGroups:

            skills_trained_in_this_group = False

            for skill in g.skills:

                trained = self.sheet.skills.Get(skill.typeID, False)
                
                if trained:

                    if not skills_trained_in_this_group:

                        #TODO: add as a heading/category
                        skills_trained_in_this_group = True
                    
                    # add row for this skill
                    liter = self.append()
                    self.set(liter, self.C_NAME, "%s" % skill.typeName,
                                      self.C_RANK, "<small>(Rank %d)</small>" % skill.rank,
                                      self.C_SKILLPOINTS, "SP: %s" % util.comma(trained.skillpoints),
                                      self.C_LEVEL, "Level %d" % trained.level)
 def MacroSignature(self, name, args):
     s = self.MacroName(name)
     if len(args):
         # Functional signature
         s = "%s("
         for arg in args:
             s += "%s%s" % (arg, util.comma(arg, args))
         s += ")"
     return s
Example #4
0
 def MacroSignature(self, name, args):
     s = self.MacroName(name)
     if len(args):
         # Functional signature
         s = "%s("; 
         for arg in args:
             s += "%s%s" % (arg, util.comma(arg, args))
         s += ")"
     return s    
Example #5
0
    def update_live_sp(self):
        self.live_sp_val = self.live_sp_val + self.spps * (self.UPDATE_INTERVAL / 1000)
        self.live_sp.set_label("<small><b>Total SP:</b> %s</small>" %
                                util.comma(int(self.live_sp_val)))

        return True
Example #6
0
 def test_comma(self):
     for number in NUMBERS.keys():
         self.assertEqual(util.comma(number), NUMBERS[number])