From: Christian Heller Date: Mon, 8 Apr 2019 22:16:51 +0000 (+0200) Subject: Make popup key available from all window configurations. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/day_todos?a=commitdiff_plain;h=d78993c5566a9b206ab1ed835ebf7d4d19c66335;p=plomrogue2-experiments Make popup key available from all window configurations. --- diff --git a/new/example_client.py b/new/example_client.py index ee71241..4e61c51 100755 --- a/new/example_client.py +++ b/new/example_client.py @@ -532,6 +532,16 @@ class TUI: self.socket.send(''.join(self.to_send)) self.to_send[:] = [] self.to_update['edit'] = True + elif key == 't': + if not popup_widget.visible: + self.to_update['popup'] = True + popup_widget.visible = True + popup_widget.reconfigure() + draw_popup_if_visible = True + else: + popup_widget.visible = False + for w in top_widgets: + w.ensure_freshness(True) elif map_widget.visible: if key == 'w': self.socket.send('TASK:MOVE UPLEFT') @@ -545,16 +555,6 @@ class TUI: self.socket.send('TASK:MOVE DOWNLEFT') elif key == 'c': self.socket.send('TASK:MOVE DOWNRIGHT') - elif key == 't': - if not popup_widget.visible: - self.to_update['popup'] = True - popup_widget.visible = True - popup_widget.reconfigure() - draw_popup_if_visible = True - else: - popup_widget.visible = False - for w in top_widgets: - w.ensure_freshness(True) elif key == 'p': self.socket.send('GET_PICKABLE_ITEMS') self.item_pointer = 0