Merge branch 'master' of git://git.assembla.com/free_poker_tools.git

This commit is contained in:
eblade 2009-03-26 11:15:01 -04:00
commit 94a10bbfcf
2 changed files with 19 additions and 6 deletions

View File

@ -176,9 +176,15 @@ class Hud:
loc = self.config.get_locations(self.table.site, self.max) loc = self.config.get_locations(self.table.site, self.max)
# TODO: is stat_windows getting converted somewhere from a list to a dict, for no good reason? # TODO: is stat_windows getting converted somewhere from a list to a dict, for no good reason?
for i, w in enumerate(self.stat_windows): for i, w in enumerate(self.stat_windows):
(x, y) = loc[adj[i]] #<<<<<<< HEAD:pyfpdb/Hud.py
self.stat_windows[w].relocate(x, y) if not type(w) == int: # how do we get pure ints in this list??
(x, y) = loc[adj[i]]
w.relocate(x, y)
#=======
# (x, y) = loc[adj[i]]
# self.stat_windows[w].relocate(x, y)
#
#>>>>>>> 7c0d2eb6c664cfd8122b975e58438cfd158ee398:pyfpdb/Hud.py
return True return True
def on_button_press(self, widget, event): def on_button_press(self, widget, event):

View File

@ -39,15 +39,19 @@ import Database
class Aux_Window: class Aux_Window:
def __init__(self, hud, params, config): def __init__(self, hud, params, config):
self.hud = hud self.hud = hud
self.params = params
self.config = config self.config = config
def update_data(self, *parms): def update_data(self, *args):
pass pass
def update_gui(self, *parms): def update_gui(self, *args):
pass pass
def create(self, *parms): def create(self, *args):
pass
def relocate(self, *args):
pass pass
def save_layout(self, *args): def save_layout(self, *args):
@ -321,6 +325,7 @@ class Flop_Mucked(Aux_Window):
self.config = config # configuration object for this aux window to use self.config = config # configuration object for this aux window to use
self.params = params # dict aux params from config self.params = params # dict aux params from config
self.positions = {} # dict of window positions self.positions = {} # dict of window positions
# self.rel_positions = {} # dict of window positions, relative to the table origin
self.displayed_cards = False self.displayed_cards = False
self.timer_on = False # bool = Ture if the timeout for removing the cards is on self.timer_on = False # bool = Ture if the timeout for removing the cards is on
self.card_images = self.get_card_images() self.card_images = self.get_card_images()
@ -350,6 +355,7 @@ class Flop_Mucked(Aux_Window):
self.seen_cards[i] = gtk.image_new_from_pixbuf(self.card_images[('B', 'H')]) self.seen_cards[i] = gtk.image_new_from_pixbuf(self.card_images[('B', 'H')])
self.eb[i].add(self.seen_cards[i]) self.eb[i].add(self.seen_cards[i])
self.positions[i] = (int(x) + self.hud.table.x, int(y) + self.hud.table.y) self.positions[i] = (int(x) + self.hud.table.x, int(y) + self.hud.table.y)
# self.rel_positions[i] = (int(x), int(y))
self.m_windows[i].move(self.positions[i][0], self.positions[i][1]) self.m_windows[i].move(self.positions[i][0], self.positions[i][1])
self.m_windows[i].set_opacity(float(self.params['opacity'])) self.m_windows[i].set_opacity(float(self.params['opacity']))
self.m_windows[i].show_all() self.m_windows[i].show_all()
@ -434,6 +440,7 @@ class Flop_Mucked(Aux_Window):
def configure_event_cb(self, widget, event, i, *args): def configure_event_cb(self, widget, event, i, *args):
self.positions[i] = widget.get_position() self.positions[i] = widget.get_position()
# self.rel_positions[i] = (self.positions[i][0] - self.hud.table.x, self.positions[i][1] - self.hud.table.y)
def expose_all(self): def expose_all(self):
for (i, cards) in self.hud.cards.iteritems(): for (i, cards) in self.hud.cards.iteritems():