
function gameinput (sender,obj_id,attachedID)
if sender==30 then
    -- ShowMenu(true);
    setcurentleaf("gallery",3,0);
    whole_darkness=false;
    DarkScreen(true);
    SetAlfa(503,0,1,1);
    speciale_action(4,503)
return;end;
  if sender==29 then -- отработал скейл
     if obj_id==3 then
      if frame==0 then
        setcolor(1100,1,1,1,1,1);
        speciale_action(2,16);
        -- speciale_action(2,11,true);
        Blocking = false;
        Blocking2 = false;
        BlockCursor(false);
      return; end;
     return;end;
  return;end;
if sender==28 then
  if endmap and not maincomics then
    --endmap= false;
    maincomics=true;
    speciale_action(2,6109,true,0.008);
  return; end;
  if obj_id==6106 and not endmap then  
    speciale_action(2,9999);
    speciale_action(2,6104);
    speciale_action(2,6200);
    StartAnimation(9999)
    setcolor(1103,0,0,0,1,1);
    maping=true;    
  return;end;
  if flags.skip then
        if obj_id==12 then      
          clear_satelite_leaf("gallery");
        return;end;
      return;end;
      if frame==6 then
        clear_satelite_leaf("gallery");
      return;end;
    if obj_id==1 then
      if frame==0 then
        speciale_action(2,11,true);        
        BlockCursor(false);
        MoveObjectX(2,1024,600,2);   
        MoveObjectX(3,-300,76,2);    
      return;end;  
    return;end;
    if obj_id==3 then
      if frame==0 then
        ScaleObject(3,1,1.1)
        setcolor(2,0.6,0.6,0.6,1); 
      return;end;  
    return;end;
      if frame==8 then
    SetAlfa(-33,1,0,2.5);
    clear_satelite_leaf("gallery");
  return;end
return;end;
if sender==16 then
    if obj_id<6140 and obj_id>=6109 then------------------------------------------------------
      speciale_action(2,obj_id+1,true,0.00001);-----------------------------------------------
    return; end;--------
    if obj_id==6140 then
      speciale_action(2,6037);
      speciale_action(2,6036);
      speciale_action(2,6017);
      speciale_action(2,6025);
      speciale_action(2,6047);
      speciale_action(2,6098);
      speciale_action(2,6099);
      speciale_action(2,6205,true,0.008);
    return; end;
  return; end;
  if sender==15 then
    if obj_id>6109 and obj_id<=6140 then
      speciale_action(2,obj_id-1,true,0.00001);
    return; end;
    if obj_id==6205 then
      speciale_action(2,6140,true,0.00001);
    return; end;
    if obj_id==6109 then  
      BlockCursor(true);
      Blocking= false
      MoveObjectY(1,-384,-200,2);
      MoveObjectY(12,768,768-200,2);
      SetAlfa(-33,1,0,2.5);
      addtexttogame(1100,161,618,"250",680); 
      setcolor(1100,1,1,1,0,1); 
      speciale_action(4,1100);  
    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==11 then
      MoveObjectY(1,-200,-385,2);
      MoveObjectY(12,610,768,2);
      MoveObjectX(2,600,1024,1.5);   
      MoveObjectX(3,76,-350,1.5);  
      addfade(-33,0);
      SetAlfa(-33,0,1,2)
      SetAlfa(16,1,0,0.1)
      SetAlfa(29,1,0,0.1)
      speciale_action(2,11);
      speciale_action(2,1100);
      flags.skip=true;
    return;end;    
  return;end;


if sender==6 then
  if map4 then
    if maping then
      maping=false;
      map4=false;
      MoveObjectY(6105,-3,-521,1);
      Blocking = true;
      MoveObjectY(6106,768-115,768+115,1);
      speciale_action(2,6104);
      speciale_action(2,6200);
      speciale_action(2,1103);
      speciale_action(2,9999);
      endmap=true;
    return;end;
    return;end;
    if not Blocking then
    if not Blocking2 then
    frame=frame+1;
    if frame==1  then 
      ScaleObject(3,1.1,1)
      setcolor(3,0.6,0.6,0.6,1);
      ScaleObject(2,1,1.1)
      setcolor(2,1,1,1,1); 
      speciale_action(2,29);
      speciale_action(2,16);
      set_text(1100,"251"); 
    return;end;
    if frame==2 then 
      ScaleObject(2,1.1,1)
      setcolor(2,0.6,0.6,0.6,1);
      ScaleObject(3,1,1.1)
      setcolor(3,1,1,1,1);  
      speciale_action(2,29);
      speciale_action(2,16);
      set_text(1100,"252"); 
    return;end;
    if frame==3 then 
      ScaleObject(3,1.1,1)
      setcolor(3,0.6,0.6,0.6,1);
      ScaleObject(2,1,1.1)
      setcolor(2,1,1,1,1); 
      speciale_action(2,29);
      speciale_action(2,16);
      set_text(1100,"253");
    return;end;
    if frame==4 then 
      ScaleObject(2,1.1,1)
      setcolor(2,0.6,0.6,0.6,1);
      ScaleObject(3,1,1.1)
      setcolor(3,1,1,1,1); 
      speciale_action(2,29);
      speciale_action(2,16);
      set_text(1100,"254");
    return;end;
    if frame==5 then 
      ScaleObject(3,1.1,1)
      setcolor(3,0.6,0.6,0.6,1);
      ScaleObject(2,1,1.1)
      setcolor(2,1,1,1,1); 
      speciale_action(2,29);
      speciale_action(2,16);
      set_text(1100,"255");
    return;end;
    if frame==6 then 
      MoveObjectY(1,-200,-385,2);
       MoveObjectY(12,610,768,2);
       speciale_action(2,11);
       speciale_action(2,2);
       speciale_action(2,3);
       speciale_action(2,29);
       setcolor(1100,1,1,1,0,1);  
        addfade(-33,0)
       SetAlfa(-33,0,1,2.5);
    return;end;    
    return;end;    
    return;end;    

return; end;
end;
