From 2a7900586cd9e6ba6e2153a5de16159e4236e9f1 Mon Sep 17 00:00:00 2001 From: adrienmalin <41926238+adrienmalin@users.noreply.github.com> Date: Wed, 2 Oct 2019 02:28:49 +0200 Subject: [PATCH] Autorepeat in conf --- TetrArcade.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TetrArcade.py b/TetrArcade.py index f774f9a..3d4acb8 100644 --- a/TetrArcade.py +++ b/TetrArcade.py @@ -190,6 +190,10 @@ class TetrArcade(tetrislogic.TetrisLogic, arcade.Window): "pause": "ESCAPE", "fullscreen": "F11", } + self.conf["AUTO-REPEAT"] = { + "delay": 0.3, + "period": 0.01 + } self.load_conf() if not os.path.exists(USER_PROFILE_DIR): os.makedirs(USER_PROFILE_DIR) @@ -241,6 +245,9 @@ class TetrArcade(tetrislogic.TetrisLogic, arcade.Window): }, } + self.AUTOREPEAT_DELAY = float(self.conf["AUTO-REPEAT"]["delay"]) + self.AUTOREPEAT_PERIOD = float(self.conf["AUTO-REPEAT"]["period"]) + controls_text = ( "\n\n\nCONTROLS\n\n" + "\n".join(