From bca5ae4f979438e7ae9dd3a23f07c251b3225d29 Mon Sep 17 00:00:00 2001 From: Sam Foster Date: Tue, 7 Mar 2023 03:02:47 -0600 Subject: [PATCH] Prevent buttons from displaying in play-only mode, suppress debug option --- durdraw/durdraw_ui_curses.py | 7 ++++--- durdraw/main.py | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/durdraw/durdraw_ui_curses.py b/durdraw/durdraw_ui_curses.py index e13f97c..c96862e 100644 --- a/durdraw/durdraw_ui_curses.py +++ b/durdraw/durdraw_ui_curses.py @@ -78,10 +78,11 @@ def __init__(self, app): self.testWindowSize() self.realmaxY,self.realmaxX = self.realstdscr.getmaxyx() #self.statusBar = StatusBar(self.stdscr, x=self.realmaxY - 2, y=0) - self.statusBar = StatusBar(self, x=self.statusBarLineNum, y=0) #self.gui.add_widget(self.statusBar) - for button in self.statusBar.buttons: - self.gui.add_button(button) + if self.appState.playOnlyMode is False: + self.statusBar = StatusBar(self, x=self.statusBarLineNum, y=0) + for button in self.statusBar.buttons: + self.gui.add_button(button) self.setWindowTitle("Durdraw") self.statusBarLineNum = self.realmaxY - 2 diff --git a/durdraw/main.py b/durdraw/main.py index 5f14c75..974764b 100644 --- a/durdraw/main.py +++ b/durdraw/main.py @@ -61,7 +61,7 @@ def main(): parser.add_argument("-u", "--undosize", help="Set the number of undo history states - default is 100. More requires more RAM, less saves RAM.", nargs=1, type=int) parser.add_argument("-V", "--version", help="Show version number and exit", action="store_true") - parser.add_argument("--debug", action="store_true") + parser.add_argument("--debug", action="store_true", help=argparse.SUPPRESS) args = parser.parse_args() if args.version: print(DUR_VER)