function mini_create ()
  show_help_wnd=true;
  init_mini(1);
   -- create_mini(1002,45,45,92,118,653,4,2);
  create_mini(24,false,4,8,"QQQQqqqq","4/4/4/4",false,652,319,109,113,113);

  -- finish_mini_game(true);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

  if sender==30 then
      setcurentleaf("daus_bar",19,1);
      flags.nohints=false;
    if flags.minicomplete22 then
      DeleteElement("gr",117);  
      playeffect("29");
      StopEmiter("moneti"); 
      Set_Cursor(58,3)
      CreateWindow(150,250,"205",1,nil,250,30);
      --playeffect("01");
    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.minicomplete22=true;
    StartTimer(2100,1);
    -- CreateWindow(200,250,"40",1,"m&i",63,107,"photo",246,13);
  return; end;

  if sender==37 then
     skipping=true;
  return;end;  
  if sender==36 and id==2100 then
  clear_satelite_leaf("daus_bar");
  return; end;
  
  if sender==100 then
    if not help then
      CreateWindow(200,200,"2",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==1 then
    if id==6000 then
      helpbtn=true;
    return;end
    if id==5000 and skipping then
      if not flags.minicomplete then
        finish_mini_game(true);
      return;end;  
    return;end;
  if id==650 then
      playeffect("17");  
    finish_mini_game(false);
    clear_satelite_leaf("daus_bar");
    DeleteResource("m22_close"         );
    DeleteResource("m22_fon"           );
    DeleteResource("m22_50"           );


  return;end;
  
    if id>=652 and id<=659 then --нажимаем на часть телеграммы
      add_to_mouse(id);
      mousepresed=true;
      objectid=id;
    return 0; end  

  return; end;
  
  if sender == 6 then    
      if helpbtn then
        CreateWindow(200,200,"2",100,"messageinfo",30,50)
           playeffect("11");    
      helpbtn=false;
    end;
    if mousepresed==true then
      for i=652,659,1 do
        setcolor(i,1,1,1,1);
      end;    
    playeffect("knock");
      RemoveFromMouse(objectid);
      check_mini_game_Queens(objectid);
      mousepresed=false;
      objectid=0;
      if not flags.minicomplete22 then
      qnsGetConflict("Fields");
      for i=1,8,1 do
         if Fields[i]==0 then
         return;end;
        setcolor(Fields[i],0.5,0.5,0.5,0.5);
      end;  
end;      
    end
  return; end;  
  
  
    
    
end;
function mini_delete ()

end;