
function MessageFromMenu(nCount,Param1)
-- if Param1==2000029 then
	-- CreateWindow(200,200,"1",100,"messageinfo") 
-- return;end;
showoptons(0);
return;end;

function mini_create ()
show_help_wnd=true;
			init_mini(1);
	create_mini(8128);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

	if sender==8 then

		if obj==1003 then
			RemoveFromMouse(1003);
			SetObjectPosition(1003,410,146);	
		return;end;	
		if obj==1010 then
			RemoveFromMouse(1010);
			SetObjectPosition(1003,410,146);
			flags.powder=false;
			speciale_action(2,1003)
			speciale_action(2,1010);			
		return;end;
	
	return;end;
	
	
	if sender==16 then
		if not help then
			help=true;
			CreateWindow(200,200,"1",100,"messageinfo")
		end;		
	   BlockCursor(false);
	return;end;
	if sender==30 then
		setcurentleaf("photolab",4,0);
		DarkScreen(false);
		RemoveFromMouse(obj);
		--Emitters(true);
		--speciale_action(2,30,true);
		Set_Cursor(30,2);
		if flags.minicomplete then
		    StopEmiter("Powder")
			flags.minitext1=true;	
			speciale_action(2,30,true);			
			speciale_action(2,42,true);			
			--AddParticleToObject(7,"./particles/particle2.psi");
			Set_Cursor(42,2);
			Set_Cursor(27,3);

		return;end;
		-- loadresource("data\\2\\1\\0042.png","a0101",101);
		-- addactivobjecttogame(101,"a0101",0,2000,"","");
		-- AddElement("gr",101);
		-- MoveObjectToTree(101);	
		-- addactivobjecttogame(106,"a0106",0,2000,"","");		
		-- AddElement("gr",106);
		-- MoveObjectToTree(106);				
	return; end;
	
	if sender==36 then
	if id==2100 then
		BlockCursor(false)
	    clear_satelite_leaf("photolab");
		return;end;
	return;end;
	
	if sender==10 then
		RemoveFromMouse(attachedID)
		flags.minicomplete=true;
		playeffect("miniC");
		StartTimer(2100,2)
		BlockCursor(true)
	return; end;
	if sender==37 then
	   skipping=true;
	return;end;	
	
		if pause_state then
		if sender==1 or sender==6 or sender==14 then
			pause_state=false;
			set_visible_object(11111,false);
		end;	
	return;end;	
	if sender==1 then

		if id==6000 then
			CreateWindow(200,200,"1",100,"messageinfo") 
		return;end;
		if id==1004 then
			if attachedID==1003 then
				flags.powder=true;
				playeffect("Brush")
				RemoveFromMouse(1003);
				SetObjectPosition(1003,410,146);
				speciale_action(2,1003)
				speciale_action(2,1010);
				addObjectToMouse(1010);
				obj=1010;
			return;end;
		return;end;
		

			
		if flags.powder then 
		
			if id==1007 then
				if attachedID==1010 then
					if not f1 then
						f1=true;
						playeffect("Brush")
						speciale_action(2,1006,true)
						if ffingerprint then
							flags.powder=false;
							RemoveFromMouse(1010);
							SetObjectPosition(1010,410,146);
							speciale_action(2,1010)
							speciale_action(2,1003)					
						return;end;
						ffingerprint=true;
					return;end;
				return;end;	
			return;end;

			if id==1008 then
				if attachedID==1010 then
					if not f2 then
						f2=true;
						playeffect("Brush")
						speciale_action(2,1005,true)
						if ffingerprint then
							flags.powder=false;
							RemoveFromMouse(1010);
							SetObjectPosition(1010,410,146);
							speciale_action(2,1010)
							speciale_action(2,1003)
						return;end;
						ffingerprint=true;
					return;end;
				return;end;	
			return;end;	
			
			if attachedID==1010 then
				flags.powder=false;
				RemoveFromMouse(1010);
				SetObjectPosition(1010,410,146);	
				speciale_action(2,1010)
				speciale_action(2,1003)				
			return;end;
			
		return;end;				

		if attachedID==-1 then
		
			if id==5000 and skipping then
			playeffect("skip");
			if not flags.minicomplete then
				if not fingerprint1 then
					speciale_action(2,1001,true);
					fingerprint1=true;
				end;	
				if not fingerprint2 then
					speciale_action(2,1002,true);
					fingerprint2=true;
				end;					
				finish_mini_game(true);
				return;end;
			return;end;
			
			if id==1000 then
				playeffect("close");
				clear_satelite_leaf("photolab");
				finish_mini_game(false);
				DeleteResource("m1_btn");
				DeleteResource("m1_fingerprint1");
				DeleteResource("m1_fingerprint2");
				DeleteResource("m1_brush");
				DeleteResource("m1_powder");
				DeleteResource("m1_fingerprinton1");
				DeleteResource("m1_fingerprinton2");
				DeleteResource("m1_glass");
				DeleteResource("m1_pipe");
				DeleteResource("m1_bg");
				DeleteResource("m1_powderbrush");
			return;end;  
			
			if id==1003 then		
				addObjectToMouse(id);
				obj=id;
			return;end;

			if id==1005 then
				if not fingerprint1 then
					speciale_action(2,1005,true);
					speciale_action(2,1001,true);
					fingerprint1=true;
					if fingerprint2 then
						finish_mini_game(true);
					return;end;
				return;end;	
			return;end;

			if id==1006 then
				if not fingerprint2 then
					speciale_action(2,1006,true);
					speciale_action(2,1002,true);	
					fingerprint2=true;	
					if fingerprint1 then
						finish_mini_game(true);
					return;end;					
				return;end;
			return;end;		
			
			-- if id==1001 or id==1002 then
				-- if fingerprint1 and fingerprint2 then
					-- finish_mini_game(true);
				-- return;end;	
			-- return;end;		
			
		return;end;
		
		if attachedID==1003 then
			RemoveFromMouse(1003);
			SetObjectPosition(1003,410,146);			
		return;end;

		
	return;end;
end;
function mini_delete ()

end;