
local help=false;

function mini_create ()
	show_help_wnd=true;
	init_mini(1);
	create_mini(28,1006,5,"32412",3,3,618,200);   
end;
flags.mini=true;
function gameinput (sender,id,attachedID)
MiniInterfaceHandler( sender, id );

if sender==26 then
BlockCursor(false);
RemoveWindow(8,2.8,"DestroyMyWindow1")
function DestroyMyWindow1()
	DestroyWindow()
	StartTimer(100,0.00001);
end


if help then
help=false;
else

return;end;
if flags.mini1_complete then
finish_mini_game(true);
return;end;




return;end;


-------------------------	



if sender==33 then	
CreateWindow(CWX,CWY,"666",4232,nil,100,230);	
end;


if sender ==36 then
if id==100 then
mini_game_PlaySequence();
check_mini_game_Sequence(objectid,false);
BlockCursor(true);
return;end;

if id==600 then
  CreateWindow(CWX,CWY,"700",4634,nil,100,230);
return;end;




if id==602 then
		return;end;
if id==601 then
mini_game_PlaySequence();
check_mini_game_Sequence(objectid,false);
BlockCursor(true);
return;end;


		
return;end;

	if sender==30 then	
		if mini_start then
			StopAllEffects()
			setstatemenu()
			mini_start=false;
			StopMusic()
		return;end
		BlockCursor(false)
		delete_tree_leaf("Root",nazvlevela);	
		NextLevel(30)
	return;end
	if sender==10 then		
			mini_start=false;
			flags.mini20=true
			leafobj={2234}
			GetRenderTarget(2234,"rendertar");	
			minigg=true;
			levelnext=27;
			BlockCursor(true)
			del_object_from_game(obj.dragonfly.id)
	return; end;

	
	
	if sender==1 then			
		
		MiniInterfaceHandler( sender, id );
		
		if id == obj.mini_skip.id then
			finish_mini_game(true);						
				flags.mini1_complete = true ;
				
		elseif obj_id == obj.mini_help.id then
			CreateWindow(CWX,CWY,"666",3453,nil,100,230);
			BlockCursor(true);
			help=true;
		end;
		
		if id>=1006 and id<=1010 then		
			mousepressed=true;
			objectid=id;
			playeffect("131")
			check_mini_game_Sequence(id,true);		
			
		return;end;
	
	return;end;	
		
		if sender==6 then
		if mousepressed then			
			mousepressed=false;
			check_mini_game_Sequence(objectid,false);
		return;end;
	return;end;
	
end;

function PlayResult(nCount,Param1)
  if Param1==0x2000000A then
  StartTimer(600,0.5);

		--StartTimer(101,1);
return;
    end;
  if Param1==0x2000000B then
   
     StartTimer(601,0.5);
	
return;    
    end;
  if Param1==0x20000001 then  
    StartTimer(602,0.5);
 
   flags.mini1_complete=true;
 --  StartTimer(103,2);
	
      return;
    end;
 if Param1==0x20000002 then

end;

	
	 if Param1==0x20000003   then
  

    end;
	
mini_game_PlaySequence();
check_mini_game_Sequence(objectid,false);
BlockCursor(true);
end;
function PlayingFinished(nCount)
BlockCursor(false);
end;