1010 os .environ ["SDL_MOUSEDEV" ] = "/dev/input/touchscreen"
1111 os .environ ["SDL_MOUSEDRV" ] = "TSLIB"
1212
13- #############################
14- ## Global display settings ##
13+ #####################################################
14+ ## Global display settings ##
1515
1616
1717# colors R G B
8080## Screen layouts ##
8181###########################
8282
83+ ## Global display settings ##
84+ #####################################################
85+
86+
87+ #############################
88+ ## Global Functions ##
8389
90+ # Create button
8491class Button (object ):
8592 text = ""
8693 xpo = ""
@@ -128,13 +135,6 @@ def draw(self):
128135 screen .canvas .blit (label ,(self .xpo ,self .ypo + 7 ))
129136
130137
131- ## Global display settings ##
132- #############################
133-
134-
135- #############################
136- ## Global Functions ##
137-
138138# Initialis the screen
139139def screen ():
140140 pygame .font .init ()
@@ -155,7 +155,7 @@ def border(color):
155155 if color == tron_blu :
156156 pygame .draw .rect (screen .canvas , tron_blu , (0 ,0 ,screen_x - 1 ,screen_y - 1 ),8 )
157157 pygame .draw .rect (screen .canvas , tron_whi , (2 ,2 ,screen_x - 5 ,screen_y - 5 ),2 )
158- if color == tron_ora :
158+ elif color == tron_ora :
159159 pygame .draw .rect (screen .canvas , tron_ora , (0 ,0 ,screen_x - 1 ,screen_y - 1 ),8 )
160160 pygame .draw .rect (screen .canvas , tron_yel , (2 ,2 ,screen_x - 5 ,screen_y - 5 ),2 )
161161 else :
0 commit comments