From 2ad071b3c1f081127003d1581bc3bbd2f5b485ca Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 17 Apr 2013 22:33:49 +0200 Subject: [PATCH] Use different window size for the editor --- erdslangetjie/__main__.py | 6 ++++++ erdslangetjie/constants.py | 2 -- erdslangetjie/editor/editor.py | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/erdslangetjie/__main__.py b/erdslangetjie/__main__.py index db6669e..9a609c6 100644 --- a/erdslangetjie/__main__.py +++ b/erdslangetjie/__main__.py @@ -10,12 +10,18 @@ from kivy.uix.label import Label from kivy.graphics import Color, Rectangle from kivy.utils import platform from kivy.clock import Clock +from kivy.config import Config from erdslangetjie.level import LevelList from erdslangetjie.data import load_image from erdslangetjie.player import ThePlayer, Nemesis +if platform() != 'android': + Config.set('graphics', 'width', '1026') + Config.set('graphics', 'height', '760') + + class GameWindow(RelativeLayout): def __init__(self, level_list, app): diff --git a/erdslangetjie/constants.py b/erdslangetjie/constants.py index 2b68d17..06d25fb 100644 --- a/erdslangetjie/constants.py +++ b/erdslangetjie/constants.py @@ -16,8 +16,6 @@ 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') diff --git a/erdslangetjie/editor/editor.py b/erdslangetjie/editor/editor.py index 4cfe183..afc480e 100644 --- a/erdslangetjie/editor/editor.py +++ b/erdslangetjie/editor/editor.py @@ -7,15 +7,22 @@ from kivy.app import App from kivy.uix.widget import Widget from kivy.uix.floatlayout import FloatLayout from kivy.graphics import Color, Rectangle +from kivy.utils import platform +from kivy.config import Config from erdslangetjie.data import filepath, load from erdslangetjie.level import Level +if platform() != 'android': + Config.set('graphics', 'width', '1326') + Config.set('graphics', 'height', '760') + + class EditorWindow(FloatLayout): def __init__(self, level): - super(EditorWindow, self).__init__(size=(800, 600)) + super(EditorWindow, self).__init__(size=(1326, 760)) if os.path.exists(filepath(level)): level_data = load(level) self.level = level -- 2.34.1