case insensitive keyboard conf

This commit is contained in:
Adrien MALINGREY 2019-10-02 12:36:03 +02:00
parent 7fc342e061
commit 3015a36984

View File

@ -203,6 +203,8 @@ class TetrArcade(TetrisLogic, arcade.Window):
self.init_height = int(self.conf["WINDOW"]["height"])
self.init_fullscreen = self.conf["WINDOW"].getboolean("fullscreen")
for action, key in self.conf["KEYBOARD"].items():
self.conf["KEYBOARD"][action] = key.upper()
self.key_map = {
State.STARTING: {
getattr(arcade.key, self.conf["KEYBOARD"]["start"]): self.new_game,