Fix numerous typos/bugs in previous commit.

This commit is contained in:
Ray 2009-03-25 16:46:06 -04:00
parent 9146758c5e
commit 01bc1cebf1
2 changed files with 7 additions and 5 deletions

View File

@ -178,6 +178,7 @@ class Hud:
if not type(w) == int: # how do we get pure ints in this list?? if not type(w) == int: # how do we get pure ints in this list??
(x, y) = loc[adj[i]] (x, y) = loc[adj[i]]
w.relocate(x, y) w.relocate(x, y)
[aw.relocate(self.table.x, self.table.y) for aw in self.aux_windows]
return True return True
@ -204,7 +205,6 @@ class Hud:
def reposition_windows(self, *args): def reposition_windows(self, *args):
if self.stat_windows != {} and len(self.stat_windows) > 0: if self.stat_windows != {} and len(self.stat_windows) > 0:
(x.window.move(x.x, x.y) for x in self.stat_windows.itervalues() if type(x) != int) (x.window.move(x.x, x.y) for x in self.stat_windows.itervalues() if type(x) != int)
[aw.relocate(self.hud.x, self.hud.y) for aw in self.aux_windows]
return True return True
def debug_stat_windows(self, *args): def debug_stat_windows(self, *args):

View File

@ -440,12 +440,14 @@ 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] - hud.table.x, self.positions[i][1] - hud.table.y) self.rel_positions[i] = (self.positions[i][0] - self.hud.table.x, self.positions[i][1] - self.hud.table.y)
def relocate(self, x, y): def relocate(self, x, y):
for i, w in self.m_windows.iteritems(): for i, w in self.m_windows.iteritems():
self.positons[i] = (x + self.rel_positions[i][0], y + self.rel_positions[i][1]) self.positions[i] = (x + self.rel_positions[i][0], y + self.rel_positions[i][1])
self.m_windows.move(self.positions[i]) print "x, y =", x, y
print "rel_pos =", self.rel_positions
w.move(self.positions[i][0], self.positions[i][0])
def expose_all(self): def expose_all(self):
for (i, cards) in self.hud.cards.iteritems(): for (i, cards) in self.hud.cards.iteritems():