Add "hudcolor" attribute to all <stat> definitions, drop font size to Sans 7, since i can't fit my stats in comfortably anymore
This commit is contained in:
		
							parent
							
								
									c815edaa9b
								
							
						
					
					
						commit
						f8749fe7fb
					
				|  | @ -114,6 +114,7 @@ class Game: | ||||||
|             stat.popup     = stat_node.getAttribute("popup") |             stat.popup     = stat_node.getAttribute("popup") | ||||||
|             stat.hudprefix = stat_node.getAttribute("hudprefix") |             stat.hudprefix = stat_node.getAttribute("hudprefix") | ||||||
|             stat.hudsuffix = stat_node.getAttribute("hudsuffix") |             stat.hudsuffix = stat_node.getAttribute("hudsuffix") | ||||||
|  |             stat.hudcolor  = stat_node.getAttribute("hudcolor") | ||||||
|              |              | ||||||
|             self.stats[stat.stat_name] = stat |             self.stats[stat.stat_name] = stat | ||||||
|              |              | ||||||
|  |  | ||||||
|  | @ -60,7 +60,7 @@ class Hud: | ||||||
|         self.stat_windows = {} |         self.stat_windows = {} | ||||||
|         self.popup_windows = {} |         self.popup_windows = {} | ||||||
|         self.aux_windows = [] |         self.aux_windows = [] | ||||||
|         self.font = pango.FontDescription("Sans 8") |         self.font = pango.FontDescription("Sans 7") | ||||||
| 
 | 
 | ||||||
| #	Set up a main window for this this instance of the HUD | #	Set up a main window for this this instance of the HUD | ||||||
|         self.main_window = gtk.Window() |         self.main_window = gtk.Window() | ||||||
|  | @ -215,6 +215,11 @@ class Hud: | ||||||
|                     this_stat = config.supported_games[self.poker_game].stats[self.stats[r][c]] |                     this_stat = config.supported_games[self.poker_game].stats[self.stats[r][c]] | ||||||
|                     number = Stats.do_stat(stat_dict, player = stat_dict[s]['player_id'], stat = self.stats[r][c]) |                     number = Stats.do_stat(stat_dict, player = stat_dict[s]['player_id'], stat = self.stats[r][c]) | ||||||
|                     statstring = this_stat.hudprefix + str(number[1]) + this_stat.hudsuffix |                     statstring = this_stat.hudprefix + str(number[1]) + this_stat.hudsuffix | ||||||
|  |                      | ||||||
|  |                     if this_stat.hudcolor != "": | ||||||
|  |                         self.label.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(self.colors['hudfgcolor'])) | ||||||
|  |                         self.stat_windows[stat_dict[s]['seat']].label[r][c].modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse(this_stat.hudcolor)) | ||||||
|  |                          | ||||||
|                     self.stat_windows[stat_dict[s]['seat']].label[r][c].set_text(statstring) |                     self.stat_windows[stat_dict[s]['seat']].label[r][c].set_text(statstring) | ||||||
|                     tip = stat_dict[s]['screen_name'] + "\n" + number[5] + "\n" + \ |                     tip = stat_dict[s]['screen_name'] + "\n" + number[5] + "\n" + \ | ||||||
|                           number[3] + ", " + number[4] |                           number[3] + ", " + number[4] | ||||||
|  | @ -361,7 +366,7 @@ class Stat_Window: | ||||||
| 
 | 
 | ||||||
|                 self.e_box[r][c].add(self.label[r][c]) |                 self.e_box[r][c].add(self.label[r][c]) | ||||||
|                 self.e_box[r][c].connect("button_press_event", self.button_press_cb) |                 self.e_box[r][c].connect("button_press_event", self.button_press_cb) | ||||||
| #                font = pango.FontDescription("Sans 8") |                 font = pango.FontDescription("Sans 7") | ||||||
|                 self.label[r][c].modify_font(font) |                 self.label[r][c].modify_font(font) | ||||||
| 
 | 
 | ||||||
| #        if not os.name == 'nt':  # seems to be a bug in opacity on windows | #        if not os.name == 'nt':  # seems to be a bug in opacity on windows | ||||||
|  | @ -564,7 +569,7 @@ if __name__== "__main__": | ||||||
|      |      | ||||||
|     c = Configuration.Config() |     c = Configuration.Config() | ||||||
|     #tables = Tables.discover(c) |     #tables = Tables.discover(c) | ||||||
|     t = Tables.discover_table_by_name(c, "Chelsea") |     t = Tables.discover_table_by_name(c, "Motorway") | ||||||
|     if t is None: |     if t is None: | ||||||
|         print "Table not found." |         print "Table not found." | ||||||
|     db = Database.Database(c, 'fpdb', 'holdem') |     db = Database.Database(c, 'fpdb', 'holdem') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user