Ejemplo n.º 1
0
        public void Dispose()
        {
            Game.ExecuteCommand("dota_camera_disable_zoom false");

            ZoomVar.SetValue(DefaultZoomValue);

            ZoomSliderItem.PropertyChanged -= ZoomSliderItemChanged;
            InputManage.Value.MouseWheel   -= InputManagerMouseWheel;
        }
Ejemplo n.º 2
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.º 3
0
        private void InputManagerMouseWheel(object sender, MouseWheelEventArgs e)
        {
            if (ZoomKeyItem.Value)
            {
                var ZoomValue = ZoomVar.GetInt();

                if (e.Delta < 0)
                {
                    ZoomValue += 50;
                    ZoomValue  = Math.Min(ZoomValue, MaxZoomValue);
                }
                else
                {
                    ZoomValue -= 50;
                    ZoomValue  = Math.Max(ZoomValue, MinZoomValue);
                }

                ZoomVar.SetValue(ZoomValue);

                ZoomSliderItem.Item.SetValue(new Slider(ZoomValue, MinZoomValue, MaxZoomValue));
            }
        }
Ejemplo n.º 4
0
 private void ZoomSliderItemChanged(object sender, PropertyChangedEventArgs e)
 {
     ZoomVar.SetValue(ZoomSliderItem.Value);
 }