function mini_create ()
  --show_help_wnd=true;
  init_mini(1);
  create_mini(2,9,9,131072,0,"",323,305,73,82,95,109);
end;
function gameinput (sender,id,attachedID)

  if sender==30 then
  BlockCursor(false);
    setcurentleaf("number9",13,1);
      flags.nohints=false;
      if flags.minicomplete7 then
        playeffect("29");
        setcolor(225,0,0,0,0.5,1);
        -- setcolor(225,1,0,0,1,1);
        collaps_obj(225,0,0,10,0);

        savegame(SaveLevel());
      return;end;
  return;end;
  if sender==10 then
      SetAlfaValue(305,0);
    SetAlfaValue(306,0);
    SetAlfaValue(307,0);
    SetAlfaValue(308,0);
    SetAlfaValue(309,0);
    SetAlfaValue(310,0);
    SetAlfaValue(311,0);
    SetAlfaValue(312,0);
    SetAlfaValue(313,0);
      flags.proideno= true
      set_visible_object(5000,false);
    set_visible_object(5001,false);
    set_visible_object(5100,false);
    speciale_action(2,6000,true);

  speciale_action(2,304,true);
  speciale_action(2,316,true);
  speciale_action(2,317,true);
  speciale_action(2,314,true);
  speciale_action(2,319,true);
  speciale_action(2,315,true);
  speciale_action(2,318,true);
  speciale_action(2,320,true);
  speciale_action(2,321,true);
  speciale_action(2,322,true);
  speciale_action(2,323,true);
  speciale_action(2,324,true);
  speciale_action(2,325,true);
  speciale_action(2,326,true);
  speciale_action(2,327,true);
  speciale_action(2,328,true);
  speciale_action(2,329,true);
  speciale_action(2,330,true);
  speciale_action(2,331,true);
  speciale_action(2,333,true);
  speciale_action(2,332,true);
  speciale_action(2,334,true);
  speciale_action(2,335,true);
  speciale_action(2,400,true);
  speciale_action(2,303,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==36 and id==2100 then
    clear_satelite_leaf("number9");    
  return;end;  
  if sender==100 then
    if not help then
    if not flags.proideno then
      CreateWindow(200,200,"3",100,"messageinfo",30,50)
      
      --playeffect("01");
      help=true;
        end;
    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,"3",100,"messageinfo",30,50)
        playeffect("11");
      helpbtn=false;
  
    end;
  if flags.object then
    speciale_action(2,333);  
    flags.object= false;
  return; end;
return; end;
  if sender==1 then
    if id==6000 then
      helpbtn=true;
    return;end
    if id==303 then
    speciale_action(2,399);
        
    return; end;  
    if id==399 then
    StartTimer(2100,2)
        flags.minicomplete7=true;
      BlockCursor(true);  
    return; end;
    
    if id==333 then
    flags.object=true;
      check_mini_game_zamok(323,0,4);
playeffect("chpok");      
      speciale_action(2,333);    
    return; end;
    if id == 323 then  

      check_mini_game_zamok(323,0,2);
      playeffect("chik");
    elseif  id == 324 then
      check_mini_game_zamok(324,1,2);
      playeffect("chik");
    --//кнопка 2
    elseif id == 325 then
      check_mini_game_zamok(325,2,2);
      playeffect("chik");
    elseif  id == 326 then
      check_mini_game_zamok(326,3,2);
      playeffect("chik");    
    --//кнопка 3
    elseif id == 327 then
      check_mini_game_zamok(327,4,2);
      playeffect("chik");
    elseif id == 328 then
      check_mini_game_zamok(328,5,1);
      playeffect("chik");
    elseif id == 329 then
      check_mini_game_zamok(329,6,2);
      playeffect("chik");
    elseif id == 330 then
      check_mini_game_zamok(330,7,2);
      playeffect("chik");
    elseif id == 331 then
      check_mini_game_zamok(331,8,2);
      playeffect("chik");
    end;
    if id==5000 and skipping then
      if not flags.minicomplete7 then
        finish_mini_game(true);
      return;end;  
    return;end;
    if id == 301 then
        playeffect("17");  
      if not flags.minicomplete7 then
        finish_mini_game(false);      
        DeleteResource(    "m7_close"    );
        DeleteResource(    "keis"    );
        -- DeleteResource(    "m7_kvitanciya"  );  
        DeleteResource(    "m7_lenta"    );
        DeleteResource(    "m7_otkrit"    );
        DeleteResource(    "m7_podsvetka"  );
        -- DeleteResource(    "m7_vvod"    );  
        -- DeleteResource(    "m7_vvod1"    );
        -- DeleteResource(    "m7_sbros1"    );
        -- DeleteResource(    "m7_sbros"    );
        -- DeleteResource(     "m7_kolco"      );
        DeleteResource(    "m7_zakrit"    );  
        -- DeleteResource(    "m7_kvitanciya2"    );  
        clear_satelite_leaf("number9");        
      return; end;
    end;
  return; end;      
end;
function mini_delete ()

end;