(self, stagenr=None)
Draws the GUI window for the passed stage nr
		
		arguments
		None
		
		keyword arguments
		stagenr		--	None for only the basic buttons, or a stage
						number for the basic buttons, as well as the
						stage specific buttons
		
		returns
		None			--	directly draws on self.disp
Draws the GUI window for the passed stage nr
		
		arguments
		None
		
		keyword arguments
		stagenr		--	None for only the basic buttons, or a stage
						number for the basic buttons, as well as the
						stage specific buttons
		
		returns
		None			--	directly draws on self.disp
Draws the GUI window for the passed stage nr arguments None keyword arguments stagenr -- None for only the basic buttons or a stage number for the basic buttons as well as the stage specific buttons returns None -- directly draws on self . disp
def draw_stage(self, stagenr=None):
		
		"""Draws the GUI window for the passed stage nr
		
		arguments
		None
		
		keyword arguments
		stagenr		--	None for only the basic buttons, or a stage
						number for the basic buttons, as well as the
						stage specific buttons
		
		returns
		None			--	directly draws on self.disp
		"""
		
		# clear display
		self.disp.fill(self.bgc)
		
		# universal buttons
		buttonstodraw = ['1','2','3','space','escape','t','r']
		activetodraw = []
		
		# stage specific buttons
		if stagenr == 1:
			title = "set pupil detection threshold"
			buttonstodraw.extend(['up','down'])
			activetodraw.extend(['1'])
		elif stagenr == 2:
			title = "select pupil and set pupil detection bounds"
			buttonstodraw.extend(['up','down'])
			activetodraw.extend(['2'])
		elif stagenr == 3:
			title = "confirmation"
			buttonstodraw.extend(['up','down'])
			activetodraw.extend(['3'])
		else:
			title = "loading, please wait..."

		# draw inactive buttons
		for buttname in buttonstodraw:
			self.draw_button(self.buttons[buttname]['inactive']['img'],self.buttons[buttname]['inactive']['pos'])
		
		# draw active buttons
		for buttname in activetodraw:
			self.draw_button(self.buttons[buttname]['active']['img'],self.buttons[buttname]['active']['pos'])
		
		# draw title
		titsize = self.font.size(title) # author note: LOL, 'titsize'!
		titpos = self.dispsize[0]/2-titsize[0]/2, self.dispsize[1]/2-(self.tracker.get_size()[1]/2+titsize[1])
		titsurf = self.font.render(title, True, self.fgc)
		self.disp.blit(titsurf,titpos)
def draw_stage ( self , stagenr = None ) : # clear display self . disp . fill ( self . bgc ) # universal buttons buttonstodraw = [ '1' , '2' , '3' , 'space' , 'escape' , 't' , 'r' ] activetodraw = [ ] # stage specific buttons if stagenr == 1 : title = "set pupil detection threshold" buttonstodraw . extend ( [ 'up' , 'down' ] ) activetodraw . extend ( [ '1' ] ) elif stagenr == 2 : title = "select pupil and set pupil detection bounds" buttonstodraw . extend ( [ 'up' , 'down' ] ) activetodraw . extend ( [ '2' ] ) elif stagenr == 3 : title = "confirmation" buttonstodraw . extend ( [ 'up' , 'down' ] ) activetodraw . extend ( [ '3' ] ) else : title = "loading, please wait..." # draw inactive buttons for buttname in buttonstodraw : self . draw_button ( self . buttons [ buttname ] [ 'inactive' ] [ 'img' ] , self . buttons [ buttname ] [ 'inactive' ] [ 'pos' ] ) # draw active buttons for buttname in activetodraw : self . draw_button ( self . buttons [ buttname ] [ 'active' ] [ 'img' ] , self . buttons [ buttname ] [ 'active' ] [ 'pos' ] ) # draw title titsize = self . font . size ( title ) # author note: LOL, 'titsize'! titpos = self . dispsize [ 0 ] / 2 - titsize [ 0 ] / 2 , self . dispsize [ 1 ] / 2 - ( self . tracker . get_size ( ) [ 1 ] / 2 + titsize [ 1 ] ) titsurf = self . font . render ( title , True , self . fgc ) self . disp . blit ( titsurf , titpos )