X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=erdslangetjie%2Fconstants.py;h=c9f16e6b4c2a949efbc28fcd1274b48c8ee54f14;hb=034f4f8a7792ab7f4777d3a13e2ab139b3d7be4a;hp=f178afcd0f7a3b58ea0c77b42e5ffcca847eb483;hpb=3cc7c87e97930a9364f34cb7899487ad51486230;p=erdslangetjie.git diff --git a/erdslangetjie/constants.py b/erdslangetjie/constants.py index f178afc..c9f16e6 100644 --- a/erdslangetjie/constants.py +++ b/erdslangetjie/constants.py @@ -1,12 +1,27 @@ -from kivy.utils import platform -from kivy.config import Config +import kivy + +kivy.require('1.6.0') + +from kivy.logger import Logger, LoggerHistory QUIET = False # kivy logging - change for release +if QUIET: + for hdlr in Logger.handlers[:]: + if not isinstance(hdlr, LoggerHistory): + Logger.removeHandler(hdlr) + +from kivy.utils import platform +from kivy.config import Config + if platform() != 'android': TILE_SIZE = 38 - Config.set('graphics', 'width', '1026') - Config.set('graphics', 'height', '760') else: TILE_SIZE = 64 Config.set('graphics', 'fullscreen', 'auto') + +# Change here to tweak keyboard controls +LEFT = ('a', 'left') +RIGHT = ('d', 'right') +UP = ('w', 'up') +DOWN = ('s', 'down')