From e1080bdabe912ce17137a79988b04ff85c00cc03 Mon Sep 17 00:00:00 2001 From: pin Date: Wed, 3 Mar 2010 09:57:50 +0000 Subject: [PATCH 1/1] =?utf8?q?externalisation=20des=20param=C3=A8tres=20de?= =?utf8?q?=20configuration.=20en-t=C3=AAte=20pour=20ex=C3=A9cution=20direc?= =?utf8?q?te=20de=20start.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@59 fe552daf-6dbe-4428-90eb-1537e0879342 --- src/app/config.py | 16 ++++++++++++++++ src/app/start.py | 4 ++-- src/app/widgets/playingscreen.py | 16 ++++++++-------- 3 files changed, 26 insertions(+), 10 deletions(-) create mode 100755 src/app/config.py diff --git a/src/app/config.py b/src/app/config.py new file mode 100755 index 0000000..9e27584 --- /dev/null +++ b/src/app/config.py @@ -0,0 +1,16 @@ +""" +constantes de configuration + +$Id$ +$URL$ +""" + +# playingscreen +BORDER = 0 # 5px +FIRST_HUE = 0.6 +OFF_LUMINANCE = 0.2 +OFF_SATURATION = 1 +ON_TOP_LUMINANCE = 0.6 +ON_BOTTOM_LUMINANCE = 0.9 +ON_SATURATION = 1 +ON_COLUMN_OVERSIZING = 1.75 diff --git a/src/app/start.py b/src/app/start.py index d25e0a7..9cfbd40 100755 --- a/src/app/start.py +++ b/src/app/start.py @@ -13,8 +13,8 @@ def main() : from minwii import MinWii pygame.init() - #modeResolution = (1024,768) - modeResolution = (600,480) + modeResolution = (1024,768) + #modeResolution = (600,480) window = pygame.display.set_mode(modeResolution)#, pygame.FULLSCREEN) MinWii() # from gui.PGUConfiguration import PGUConfiguration diff --git a/src/app/widgets/playingscreen.py b/src/app/widgets/playingscreen.py index 9558770..af02bba 100755 --- a/src/app/widgets/playingscreen.py +++ b/src/app/widgets/playingscreen.py @@ -15,14 +15,14 @@ from math import floor import types # TODO : positionner cette constance en fonction de la résolution d'affichage # externaliser la conf. -BORDER = 0 # 5px -FIRST_HUE = 0.6 -OFF_LUMINANCE = 0.2 -OFF_SATURATION = 1 -ON_TOP_LUMINANCE = 0.6 -ON_BOTTOM_LUMINANCE = 0.9 -ON_SATURATION = 1 -ON_COLUMN_OVERSIZING = 1.75 +from config import BORDER +from config import FIRST_HUE +from config import OFF_LUMINANCE +from config import OFF_SATURATION +from config import ON_TOP_LUMINANCE +from config import ON_BOTTOM_LUMINANCE +from config import ON_SATURATION +from config import ON_COLUMN_OVERSIZING class _PlayingScreenBase(pygame.sprite.LayeredUpdates, EventHandlerMixin) : -- 2.20.1