function mini_create ()
  show_help_wnd=true;
  init_mini(1);
   -- create_mini(1002,45,45,92,118,653,4,2);

  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("daus_vhod",19,0);  
  flags.nohints=false;    
    if flags.minicomplete20 then
      playeffect("29");      
      DeleteElement("gr",225);
      StopEmiter("pu4ok1");       
      Set_Cursor(11,3)    
      CreateWindow(150,250,"204",nil,nil,250,30);
      --playeffect("01");      
      flags.vhod=true;
      savegame(SaveLevel());
    return; end;
  return; end;
    if sender==26 then
  if id==100 then
  set_visible_object(5001,true)
  end;
  return;end;
  if sender==10 then
    flags.minicomplete20=true;
    StartTimer(2100,1)
BlockCursor(true);
  return; end;
  if sender==37 then
     skipping=true;
  return;end;
  if sender==36 and id==2100 then
    clear_satelite_leaf("daus_vhod");
  return;end;  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"1",100,"messageinfo",30,50)
      --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==6 then
    if helpbtn then
       CreateWindow(200,200,"1",100,"messageinfo",30,50)
          playeffect("11");    
      helpbtn=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.minicomplete20 then
        finish_mini_game(true);
      return;end;  
    return;end;
  if id==650 then
      playeffect("17");  
    finish_mini_game(false);
    clear_satelite_leaf("daus_vhod");
    DeleteResource("m20_close"         );
    DeleteResource("m20_fon"           );
    DeleteResource("otli4"       );
    DeleteResource("m20_lenta"           );
  return;end;
  
  if id>=654 and id<=672 then
  if  not obj[id] then
    speciale_action(2,id-1);
    fcounter=fcounter-1;
    obj[id]=true;
    set_pos_in_img(673,(fcounter-1)*30,0,30,34);
    playeffect("chik");
    if fcounter<1 then 
      finish_mini_game(true);
    return;end;
  return;end;  
  return;end;
  return; end;

end;
function mini_delete ()

end;