Mercurial > libervia-backend
diff frontends/src/primitivus/primitivus @ 687:af0d08a84cc6
primitivus card_game: bug fix and improvement
- changeset 56f8a9c99194 introduced a bug because it connected all the list widgets to the parameter change callback. This is not OK because the Tarot is using a list form that is not a parameter.
- some list processing was raising an error when the data is not initialized
- display the "choose contrat" dialog with valign='top' to allow the user see his hand while taking the decision.
author | souliane <souliane@mailoo.org> |
---|---|
date | Mon, 28 Oct 2013 19:04:49 +0100 |
parents | 59c9a7ff903d |
children | f7878ad3c846 |
line wrap: on
line diff
--- a/frontends/src/primitivus/primitivus Mon Oct 28 18:49:01 2013 +0100 +++ b/frontends/src/primitivus/primitivus Mon Oct 28 19:04:49 2013 +0100 @@ -321,10 +321,10 @@ #we still have popup to show, we display it self.showPopUp(next_popup) - def showPopUp(self, pop_up_widget, perc_width=40, perc_height=40): + def showPopUp(self, pop_up_widget, perc_width=40, perc_height=40, valign='middle'): "Show a pop-up window if possible, else put it in queue" - if not isinstance(self.loop.widget,urwid.Overlay): - display_widget = urwid.Overlay(pop_up_widget, self.main_widget, 'center', ('relative', perc_width), 'middle', ('relative', perc_height)) + if not isinstance(self.loop.widget, urwid.Overlay): + display_widget = urwid.Overlay(pop_up_widget, self.main_widget, 'center', ('relative', perc_width), valign, ('relative', perc_height)) self.loop.widget = display_widget self.redraw() else: