From: <Ult...@us...> - 2009-02-07 20:33:22
|
Revision: 1018 http://opengate.svn.sourceforge.net/opengate/?rev=1018&view=rev Author: Ultrasick Date: 2009-02-07 20:33:19 +0000 (Sat, 07 Feb 2009) Log Message: ----------- adding forgotten files Added Paths: ----------- trunk/data/gui/config.ini trunk/data/gui/index.py Added: trunk/data/gui/config.ini =================================================================== --- trunk/data/gui/config.ini (rev 0) +++ trunk/data/gui/config.ini 2009-02-07 20:33:19 UTC (rev 1018) @@ -0,0 +1,5 @@ +[user] +username: +password: +[display] +show startup video: true \ No newline at end of file Property changes on: trunk/data/gui/config.ini ___________________________________________________________________ Added: svn:eol-style + native Added: trunk/data/gui/index.py =================================================================== --- trunk/data/gui/index.py (rev 0) +++ trunk/data/gui/index.py 2009-02-07 20:33:19 UTC (rev 1018) @@ -0,0 +1,70 @@ +# -*- coding: cp1252 -*- + +from __future__ import division +import gtk +from sys import path + +# load different variables +execfile(path[0] + '/scripts/main/variables.py') + +# load different functions +execfile(path[0] + '/scripts/main/functions.py') + +# show window +window = gtk.Window() +window.set_title('Opengate') +#window.fullscreen() +window.show() + +# exit program, if window is closed +window.connect('delete_event', gtk.main_quit) + +def show_screen(screen_name, show_loading_screen = false): + # set screen container global + global screen + + # stop running animations + try: + screen.laser_beam_animation + + # stop laser beam and turning logo animation + gobject.source_remove(screen.laser_beam_animation) + gobject.source_remove(screen.turn_logo_animation) + + screen.air_lock_animation + + # stop air lock animation + gobject.source_remove(screen.air_lock_animation) + except: + pass + + # try to destroy the previous screen + try: + screen.destroy() + except: + pass + + # show "screen"-container + screen = gtk.Fixed() + window.add(screen) + screen.show() + + if show_loading_screen: + # show loading screen + execfile(path[0] + '/scripts/screens/loading/index.py') + + # define different styles (if a style file exists) + if check.isfile(path[0] + '/scripts/screens/' + screen_name + '/styles.rc'): + gtk.rc_parse(path[0] + '/scripts/screens/' + screen_name + '/styles.rc') + + # show screen + execfile(path[0] + '/scripts/screens/' + screen_name + '/index.py') + +# show first screen +if display['show startup video']=='true': + show_screen('startup') +else: + show_screen('options') + +# enter main loop +gtk.main() \ No newline at end of file Property changes on: trunk/data/gui/index.py ___________________________________________________________________ Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |