function mini_create ()
  show_help_wnd=true;
  init_mini(1);
  create_mini(21,5,3,5,false,103,68,134,94,588); -- Корова бык
  -- create_mini(8128);
  -- finish_mini_game(true);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

  if sender==30 then
  BlockCursor(false);
    setcurentleaf("barton_zal",1,1);
      flags.nohints=false;
    if flags.minicomplete11 then  
      Set_Cursor(62,3);
      collaps_obj(35,0,0,0,0);
      setcolor(35,0,0,0,0.5,1);
      StopEmiter("Svet");
      speciale_action(2,701,true)    
      speciale_action(4,701)    
      playeffect("paper");
      set_visible_object(68,false)
    return; end;
  return; end;
      if sender==36 and id==2100 then
    clear_satelite_leaf("barton_zal");
  return;end;
  if sender==10 then
    flags.minicomplete11=true;
  StartTimer(2100,1)
  BlockCursor(true);

  return; end;
    if sender==26 then
  if id==100 then
  set_visible_object(5001,true)
  end;
  return;end;
  if sender==37 then
     skipping=true;
  return;end;  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"1",100,"messageinfo",30,30)
      --playeffect("01");
      help=true;
    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 id==6000 then
      helpbtn=true;
    return;end
    if id==5000 and skipping then
      if not flags.minicomplete11 then
        finish_mini_game(true);
      return;end;  
    return;end;
  if id==580 then
      playeffect("17");  
    finish_mini_game(false);
    clear_satelite_leaf("barton_zal");
    DeleteResource(    "m11_close"  );
    DeleteResource(    "m11_notes"  );
    DeleteResource(    "m11_marks"  );
    DeleteResource(    "m11_klyu4i");
    DeleteResource(    "m11_fon"  );
    DeleteResource(    "teni"  );

  return;end;
  if id>=588 and id<=592
    then
      fGame=true;
      add_to_mouse(id);
--      mousepresed=true;
      objectid=id;
      speciale_action(2,id-5)
    return; end  
  return; end;
  if sender==6 --Отпустили левую кнопку мышки
  then
      if helpbtn then
       CreateWindow(200,200,"1",100,"messageinfo",30,30)
           playeffect("11");  
      helpbtn=false;
    end;
    if fGame==true
      then
              playeffect("KeyIns");
        playeffect(9);
        RemoveFromMouse(objectid);  
      speciale_action(2,objectid-5)
      check_mini_game_CAB(objectid);
      fGame=false;
      objectid=0;
    
    return;end;  
  return; end;  
end;
function mini_delete ()

end;