Ejemplo n.º 1
0
        public ZoomHack(MenuFactory MenuFactory, Lazy <IInputManager> inputmanager)
        {
            InputManage = inputmanager;

            var ZoomHackMenu = MenuFactory.Menu("Zoom Hack");

            ZoomKeyItem    = ZoomHackMenu.Item("Key", new KeyBind(0x11, KeyBindType.Press));
            ZoomSliderItem = ZoomHackMenu.Item("Camera Distance", new Slider(DefaultZoomValue, MinZoomValue, MaxZoomValue));

            ZoomVar = Game.GetConsoleVar("dota_camera_distance");
            ZoomVar.SetValue(ZoomSliderItem.Value);

            RVar = Game.GetConsoleVar("r_farz");
            RVar.SetValue(18000);

            ZoomSliderItem.PropertyChanged += ZoomSliderItemChanged;
            InputManage.Value.MouseWheel   += InputManagerMouseWheel;

            Game.ExecuteCommand("dota_camera_disable_zoom true");
        }
Ejemplo n.º 2
0
 private void ZoomSliderItemChanged(object sender, PropertyChangedEventArgs e)
 {
     ZoomVar.SetValue(ZoomSliderItem.Value);
     RVar.SetValue(2 * ZoomSliderItem.Value);
 }