From ca50f4387abd8d95187df51a483d24945fd9014d Mon Sep 17 00:00:00 2001 From: Eugenio Parodi Date: Thu, 7 Dec 2023 17:26:44 +0000 Subject: [PATCH] tuned the game for the release on itch.io --- .gitignore | 3 +++ demo/games/breakout/main.py | 18 +++++++++--------- demo/games/breakoutrl/main.py | 4 +++- tests/sandbox/.gitignore | 1 + 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 29efad6c..2cccf23f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ __pycache__/ # other tests/test.dummy.py *.swp +*.zip +*.tgz tmp profiler.* .vscode/* @@ -16,6 +18,7 @@ experiments sandbox !tests/sandbox node_modules +Varie # VizTracker default file result.json diff --git a/demo/games/breakout/main.py b/demo/games/breakout/main.py index 3799c2e5..7ddc48d5 100755 --- a/demo/games/breakout/main.py +++ b/demo/games/breakout/main.py @@ -32,14 +32,14 @@ import TermTk as ttk class BreakOutParams(): colors = { 'lines': [ - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FF0000"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FF0000"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FF8800"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FF8800"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#00FF00"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#00FF00"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FFFF00"), - ttk.TTkColor.fg("#000000")+ttk.TTkColor.bg("#FFFF00")], + ttk.TTkColor.fg("#FF0000"), + ttk.TTkColor.fg("#FF0000"), + ttk.TTkColor.fg("#FF8800"), + ttk.TTkColor.fg("#FF8800"), + ttk.TTkColor.fg("#00FF00"), + ttk.TTkColor.fg("#00FF00"), + ttk.TTkColor.fg("#FFFF00"), + ttk.TTkColor.fg("#FFFF00")], 'bar' : ttk.TTkColor.fg("#0088FF"), } delay: float = 0.05 @@ -145,7 +145,7 @@ class BreakOutDisplay(ttk.TTkWidget): for bx in range(lineBlocks): if self._blocks[by][bx]: canvas.drawText(pos=(bx*8,by+blocksOffset), - text='▁'*7, + text='▇'*7, color=colors['lines'][by]) canvas.drawText( diff --git a/demo/games/breakoutrl/main.py b/demo/games/breakoutrl/main.py index 51a5b0bc..dfba6fdd 100755 --- a/demo/games/breakoutrl/main.py +++ b/demo/games/breakoutrl/main.py @@ -114,7 +114,9 @@ root.layout().addItem(ttk.TTkLayout(),2,0) root.layout().addItem(ttk.TTkLayout(),0,2) root.layout().addItem(ttk.TTkLayout(),2,2) -winParams = WinParams(breakout, title="Params") +winParams = WinParams(breakout, + title="Params", + flags = ttk.TTkK.WindowFlag.WindowReduceButtonHint | ttk.TTkK.WindowFlag.WindowMinMaxButtonsHint) ttk.TTkHelper.overlay(None, winParams, 2, 2, toolWindow=True) winParams.resize(30,20) diff --git a/tests/sandbox/.gitignore b/tests/sandbox/.gitignore index 7c82b3cf..01df409d 100644 --- a/tests/sandbox/.gitignore +++ b/tests/sandbox/.gitignore @@ -1,3 +1,4 @@ *.tgz bin www +game