diff orpg/player_list.py @ 2:d5e81dac98ff grumpy-goblin

Made some changes to the way the player list colors. Also fixed an annoyence with images and the Message box that no longer shows.
author sirebral
date Tue, 14 Jul 2009 20:52:56 -0500
parents 4385a7d0efd1
children 78407d627cba
line wrap: on
line diff
--- a/orpg/player_list.py	Tue Jul 14 16:51:10 2009 -0500
+++ b/orpg/player_list.py	Tue Jul 14 20:52:56 2009 -0500
@@ -516,23 +516,18 @@
         session = open_rpg.get_component("session")
         settings = open_rpg.get_component('settings')
         mode = settings.get_setting("ColorizeRoles")
-        if mode.lower() == "off":
+        if mode.lower() == "0":
             return
-        gmColor = settings.get_setting("GMRoleColor")
-        plColor = settings.get_setting("PlayerRoleColor")
-        lkColor = settings.get_setting("LurkerRoleColor")
         players = session.players
         for m in players.keys():
             item_list_location = self.FindItemData(-1,int(m))
             if item_list_location == -1: continue
             player_info = session.get_player_by_player_id(m)
             item = self.GetItem(item_list_location)
-            role = player_info[7].lower()
+            role = player_info[7]
             color = wx.GREEN
             if self.session.group_id != "0":
-		recycle_bin = {'lurker': lkColor, 'player': plColor, 'gm': gmColor }
-		item.SetTextColour(recycle_bin[role])
-		recycle_bin = {}
+                item.SetTextColour(settings.get_setting(role + "RoleColor"))
             self.SetItem(item)
 
     def reset(self):