
local He = 1003
local She = 1004
local frame = 0;
speed= 1;
SemiOpenPlushes();

function gameinput (sender,obj_id,attachedID)

	-- if sender==7 then
		-- flags.rotate1=false

	-- return;end;
------------------------------------------------------------------------------------------------------------------
	if sender==33 then
		if plushes_were_closed then
		flags.cton= false;
			clear_satelite_leaf("museum");
			
		else
			DrawSkipButton();
		end;
	end;
	
	if sender==30 then
	SetCurrentLeaf("museum",10,0);
	flags.comics2=true;
	return;end
-------------------------------------------------------------------------------------------------------------------
	if sender == 29 then 
	BlockCursor(false)

		if frame == 0 and obj_id == She then
			flags.cton = false
		return; end;
		if frame == 1 and obj_id == She then
			MakeMessage(He,"52");
		return; end;
		if frame == 2 and obj_id == He then
			DeleteDialog(He,-400,60,She,1024,600)
		return; end;
		if frame == 3 and obj_id == She then
			MakeMessage(He,"51");
			-- DeleteDialog(He,-400,60,She,1024,600)
		return; end;	
		if frame == 4 and obj_id == He then
			DeleteDialog(He,-400,60,She,1024,600)
			-- DeleteDialog(Doctor,-400,60,together,1024,600)
		return; end;
	return; end;
-------------------------------------------------------------------------------------------------------------------
	if sender==15 then
		if obj_id == 1008 then
			speciale_action(2,1006,true);
		return; end;
		if obj_id == 1006 then
			CloseSemiPlushes();
		return; end;
	return; end;
	if sender==28 then
		BlockCursor(false);
		if frame == 0 then
			if obj_id == 1006 then
				speciale_action(2,1005,true);
				speciale_action(2,1008,true);
					speciale_action(2,1000);
	speciale_action(2,1001);
			return; end;
		if obj_id == She then
			MakeMessage(She,"51");
		return; end;
		if obj_id == top_plush_id then
			MoveObjectX(1006,-583,0,2)
			MoveObjectX(1007,-583,0,2);
			MoveObjectX(1005,537-583,537,2);
			MoveObjectX(1008,549-583,549,2);
			MoveObjectX(1000,74-583 ,74,2);
			MoveObjectX(1001,444-583,444,2);
playeffect("078")
		return; end;
		return; end;
		if frame == 2 and obj_id == He then
			CloseSemiPlushes();
		return; end;
	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 obj_id == skip_id then
			BlockCursor(false)
			CloseSemiPlushes();
		end;
	return;end;


	if sender == 6 then

		 if not flags.cton then
				frame = frame + 1;
			if frame == 1 then
				DeleteMessage()	
			return; end;	
			if frame == 2 then
				DeleteMessage()	
				flags.cton= true;
			return; end;
			if frame == 3 then -- 1-й клик
				DeleteMessage()		
			return;end;	
			if frame == 4 then -- 1-й клик
				DeleteMessage()		
				flags.cton= true;
			return;end;

		return;end;
	return; end;

end
