
; Display information about structure to build


	_x1 = 0.9475
	_x2 = 1.1525
	_y1 = 0.35
	_y2 = 0.6432
	
	_rangeX = 0.0925
	_rangeY = 0.0733
	
	_overTime  = 0
	_displayed = false
	

	#loop
	~0.1

	_condition = "MSX > _x1 && MSX < _x2   &&    MSY > _y1 && MSY < _y2"
	if (call _condition)  then  {_overTime=_overTime+1}  else  {_overTime=0}
	? _displayed  && _overTime > 0  ||  _overTime >= 15 : goto "Identify"
	
	#Hide
	_displayed = false
	{ctrlShow [_x,false]} forEach [1000,1001]
	goto "loop"
	
	
	

	
	
	
	#Identify
	_array = BUILDINGS
	? MSX > 1.04 : _array = UNITS
	
	_i=1
	#CheckRow
	? _y1 + _rangeX*_i  > MSY : goto "Display"
	? _i < 4 : _i=_i+1; goto "CheckRow"
	player groupchat "error"
	~2
	goto "loop"
	
	
	#Display
	_item = _array select (_i-1)
	? _item == "none" :  _overTime=0; goto "hide"
	
	_text = format ["%1\n$%2", _item, (_item call findProperty) select 1]
	_displayed = true
	{ctrlShow [_x,true]} forEach [1000,1001]
	ctrlSetText [1000, _text]
	goto "loop"
	
	
	
	
	