Esempio n. 1
0
File: gmenu.py Progetto: onze/goLive
	def __init__(self,*args,**kwargs):
		DirectObject.__init__(self)
		kwargs['fill']=165,255,121
		kwargs['layout']=HLayout
		Frame.__init__(self,*args,**kwargs)
		self.read_keys_from_config()
		#'type','unit','conf'
		self.state='type'
		self.launch_btn=Button(	pref_w=self.h*2,
										pref_h=self.h,
										p3dobject=DirectButton(	geom=(self.resources['cancel_btn']),
																		borderWidth=(0,0),
																		command=self.cancel),
										parent=self)
		self.accept(self.keys['cancel']+'-up',self.cancel)
		#graphical aspect: [cancel_btn | unit_type_panel | unit_selection_panel | unit_configuration_panel | launch_btn]
		self.type_pan=UnitTypePanel(self)
		self.type_pan.focus()
		self.sel_pan=UnitSelectionPanel(self)
		self.sel_pan.request('Blank')
		self.conf_pan=UnitConfigurationPanel(self)
		self.conf_pan.request('Blank')
		Spacer(parent=self)
		self.launch_btn=Button(	pref_w=self.h*2,
							    pref_h=self.h,
								p3dobject=DirectButton(geom=(self.resources['launch_btn']),
														borderWidth=(0,0),
														command=self.launch_unit),
								parent=self)
		self.accept('enter-up',self.launch_unit)
		self.accept(self.keys['launch']+'-up',self.launch_unit)
		self.accept('mouse3-up',self.launch_unit)
Esempio n. 2
0
	def __init__(self,*args,**kwargs):
		kwargs['layout']=layout.HLayout
		Frame.__init__(self,*args,**kwargs)
		res=loader.loadModel('data/gui/game_setup.egg')
		self.resources = {	'start_btn':res.find('**/game_setup.start_btn')}
		#default config =P
		self.config=dict(default.game_conf)
Esempio n. 3
0
File: gmenu.py Progetto: onze/goLive
	def __init__(self,gmenu):
		Frame.__init__(self,layout=HLayout,parent=gmenu)		
		self.gmenu=gmenu
		self.buttons=[]
		self.key_focus=[]
Esempio n. 4
0
	def __init__(self,*args,**kwargs):
		kwargs['fill']=160,160,160
		kwargs['layout']=HLayout
		Frame.__init__(self,*args,**kwargs)
Esempio n. 5
0
 def __init__(self,*args,**kwargs):
    kwargs['layout']=VLayout
    Frame.__init__(self,*args,**kwargs)
    self.process_server_input=pstat(self.process_server_input)
    #to be set as soon as a connection is done with the server
    self.pid=None