From: pin Date: Tue, 16 Feb 2010 14:34:54 +0000 (+0000) Subject: début refactoring. X-Git-Url: https://scm.cri.mines-paristech.fr/git/minwii.git/commitdiff_plain/f223b232a3718ef4546bad705f9d06b50cae6fe6?ds=inline début refactoring. git-svn-id: https://svn.cri.ensmp.fr/svn/minwii/trunk@33 fe552daf-6dbe-4428-90eb-1537e0879342 --- diff --git a/src/app/minwii.py b/src/app/minwii.py index 15e24dc..721031d 100755 --- a/src/app/minwii.py +++ b/src/app/minwii.py @@ -5,3 +5,12 @@ l'application winwii $Id$ $URL$ """ + +from pgu import gui as pguGui +from widgets import Home + +class MinWii(pguGui.Desktop): + + def __init__(self) : + pguGui.Desktop.__init__(self) + self.run(Home()) \ No newline at end of file diff --git a/src/app/start.py b/src/app/start.py index ee96981..11f2905 100755 --- a/src/app/start.py +++ b/src/app/start.py @@ -9,11 +9,17 @@ $URL$ def main() : import pygame - from gui import PGUConfiguration + from minwii import MinWii + pygame.init() modeResolution = (1024,768) - window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN) - pgu = PGUConfiguration(window) + window = pygame.display.set_mode(modeResolution) + MinWii() + # from gui.PGUConfiguration import PGUConfiguration + # pygame.init() + # modeResolution = (1024,768) + # window = pygame.display.set_mode(modeResolution)#,pygame.FULLSCREEN) + # pgu = PGUConfiguration(window) pygame.quit() if __name__ == "__main__" : @@ -23,7 +29,5 @@ if __name__ == "__main__" : minwiipath = realpath(__file__).split(sep) minwiipath = minwiipath[:-2] minwiipath = sep.join(minwiipath) - - sys.path.append(minwiipath) - print sys.path + sys.path.insert(1, minwiipath) main() \ No newline at end of file diff --git a/src/app/widgets.py b/src/app/widgets.py new file mode 100755 index 0000000..e70ce5d --- /dev/null +++ b/src/app/widgets.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +""" +widgets minwii. + +$Id$ +$URL$ +""" +from pgu.gui import Table + +class Home(Table) : + def __init__(self,**params): + Table.__init__(self,**params) + \ No newline at end of file diff --git a/src/gui/constants.py b/src/gui/constants.py index df13903..f280b5f 100755 --- a/src/gui/constants.py +++ b/src/gui/constants.py @@ -1,4 +1,4 @@ -from songs.Song import Song,loadSongFromMidi +from songs.Song import Song#,loadSongFromMidi from dataTools.odict import OrderedDict joyNames = ["PPJoy Virtual joystick 1", "PPJoy Virtual joystick 2", "PPJoy Virtual joystick 3", "PPJoy Virtual joystick 4"]