CommonClient.py UI: Server bar: allow connecting via pressing enter

This commit is contained in:
Fabian Dill 2021-11-01 21:43:17 +01:00
parent e64d5c5f17
commit 46590c3163
1 changed files with 2 additions and 0 deletions

View File

@ -164,6 +164,7 @@ class GameManager(App):
server_label = ServerLabel()
connect_layout.add_widget(server_label)
self.server_connect_bar = TextInput(text="archipelago.gg", size_hint_y=None, height=30, multiline=False)
self.server_connect_bar.bind(on_text_validate=self.connect_button_action)
connect_layout.add_widget(self.server_connect_bar)
self.server_connect_button = Button(text="Connect", size=(100, 30), size_hint_y=None, size_hint_x=None)
self.server_connect_button.bind(on_press=self.connect_button_action)
@ -221,6 +222,7 @@ class GameManager(App):
logging.getLogger("Client").exception("Uncaught exception",
exc_info=(exc_type, exc_value, exc_traceback))
return orig_hook(exc_type, exc_value, exc_traceback)
handle_exception._wrapped = True
sys.excepthook = handle_exception