From 57adebfcdc07647d78a38d5d4437c1fcf2ad067d Mon Sep 17 00:00:00 2001 From: Joe R Date: Tue, 17 Sep 2024 22:49:01 -0400 Subject: [PATCH] Add F5 as a shortcut for refreshing the display, to help with testing --- html-src/howtoplay.html | 1 + pysollib/ui/tktile/menubar.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/html-src/howtoplay.html b/html-src/howtoplay.html index 1f15acd3..82e5428b 100644 --- a/html-src/howtoplay.html +++ b/html-src/howtoplay.html @@ -129,4 +129,5 @@ to the main data/tiles or your home ~/.PySolFC/tiles directory.
  • Ctrl-I - Change table tile
  • Ctrl-U - Play the next music song
  • Ctrl-W - Select game, using old game select window +
  • F5 - Refresh the game layout diff --git a/pysollib/ui/tktile/menubar.py b/pysollib/ui/tktile/menubar.py index 5a147259..d0bcd27b 100644 --- a/pysollib/ui/tktile/menubar.py +++ b/pysollib/ui/tktile/menubar.py @@ -994,6 +994,8 @@ class PysolMenubarTkCommon: self._bindKey(ctrl, "Up", self.mSelectPrevGameById) self._bindKey(ctrl, "Down", self.mSelectNextGameById) + self._bindKey("", "F5", self.refresh) + if os.name == 'posix' and platform.system() != 'Darwin': self._bindKey('Alt-', 'F4', self.mQuit) @@ -2024,6 +2026,12 @@ Unsupported game for import. self.game.endGame(bookmark=1) self.game.quitGame(bookmark=1) + def refresh(self, *event): + self.app.updateCardset() + self.game.endGame(bookmark=1) + self.game.quitGame(bookmark=1) + + # # toolbar support #