/[adonthell]/adonthell/test/inputtest.py
ViewVC logotype

Diff of /adonthell/test/inputtest.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by ksterker, Mon Aug 23 06:33:47 2004 UTC revision 1.5 by ksterker, Mon Nov 1 17:41:30 2004 UTC
# Line 1  Line 1 
1  from adonthell import gfx, input, main  from adonthell import gfx, input, main
2  import sys, time  import sys, time
3    
4  class InputtestApp:  class InputtestApp (main.AdonthellApp):
5      def __init__ (self, app):      def __init__ (self):
6            main.AdonthellApp.__init__(self)
7          self.Letsexit = 0          self.Letsexit = 0
         self.App = app  
8                    
9      ## Callback fonction to handle keyboard events.      ## Callback fonction to handle keyboard events.
10      ## It will be passed a keyboard_event as a parameter      ## It will be passed a keyboard_event as a parameter
# Line 31  class InputtestApp: Line 31  class InputtestApp:
31    
32      def main (self):      def main (self):
33          ## Initialize the gfx and input systems          ## Initialize the gfx and input systems
34          self.App.init_modules (main.app.GFX | main.app.INPUT)          self.init_modules (main.app.GFX | main.app.INPUT)
35    
36          ## Set us a nice window          ## Set us a nice window
37          gfx.screen.set_video_mode(640, 480)          gfx.screen.set_video_mode(640, 480)
# Line 55  class InputtestApp: Line 55  class InputtestApp:
55          return 0          return 0
56    
57  if __name__ == '__main__':  if __name__ == '__main__':
58      myApp = main.AdonthellApp ()      app = InputtestApp ()
59      inputtest = InputtestApp (myApp)      app.init (app.main)
     myApp.init (inputtest.main)  
60    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26