improve stats menu in HUD some more

This commit is contained in:
sqlcoder 2009-10-01 23:16:20 +01:00
parent b0037e545a
commit 61f384a886

View File

@ -177,7 +177,7 @@ class Hud:
item = gtk.CheckMenuItem(' All Levels') item = gtk.CheckMenuItem(' All Levels')
self.aggMenu.append(item) self.aggMenu.append(item)
item.connect("activate", self.set_aggregation, 10000) item.connect("activate", self.set_aggregation, 10000)
setattr(self, 'aggBBmultItemAll', item) setattr(self, 'aggBBmultItem10000', item)
# #
item = gtk.MenuItem('For Hero:') item = gtk.MenuItem('For Hero:')
self.aggMenu.append(item) self.aggMenu.append(item)
@ -253,14 +253,21 @@ class Hud:
print "Exception:",str(e) print "Exception:",str(e)
pass pass
def set_aggregation(self, widget): def set_aggregation(self, widget, val):
# try setting these to true all the time, and set the multiplier to 1 to turn agg off: # try setting these to true all the time, and set the multiplier to 1 to turn agg off:
self.hud_params['aggregate_ring'] = True self.hud_params['aggregate_ring'] = True
self.hud_params['aggregate_tour'] = True self.hud_params['aggregate_tour'] = True
self.hud_params['h_aggregate_ring'] = True
self.hud_params['h_aggregate_tour'] = True
if self.hud_params['agg_bb_mult'] != widget.ms: if self.hud_params['agg_bb_mult'] != val \
print 'set_aggregation', widget.ms and getattr(self, 'aggBBmultItem'+str(val)).get_active():
self.hud_params['agg_bb_mult'] = widget.ms print 'set_aggregation', val
self.hud_params['agg_bb_mult'] = val
self.hud_params['h_agg_bb_mult'] = val
for mult in ('1', '2', '3', '10', '10000'):
if mult != str(val):
getattr(self, 'aggBBmultItem'+mult).set_active(False)
def set_hud_style(self, widget, val): def set_hud_style(self, widget, val):
# try setting these to true all the time, and set the multiplier to 1 to turn agg off: # try setting these to true all the time, and set the multiplier to 1 to turn agg off: