コード例 #1
0
 public void Activate()
 {
     foreach (var cmd in this.consoleCommands)
     {
         ConVarManager.SetValue(cmd.Key, cmd.Value);
     }
 }
コード例 #2
0
        private void EnabledOnValueChange(object sender, SwitcherEventArgs e)
        {
            if (e.NewValue)
            {
                if (e.OldValue)
                {
                    //todo delete
                    if (AppDomain.CurrentDomain.GetAssemblies().Any(x => !x.GlobalAssemblyCache && x.GetName().Name.Contains("Zoomhack")))
                    {
                        Hud.DisplayWarning("O9K.Hud // ZoomHack is already included in O9K.Hud");
                    }
                }

                foreach (var cmd in this.consoleCommands)
                {
                    ConVarManager.SetValue(cmd.Key, cmd.Value);
                }

                this.zoom.ValueChange += this.ZoomOnValueChange;
                this.key.ValueChange  += this.KeyOnValueChange;
            }
            else
            {
                this.key.ValueChange    -= this.KeyOnValueChange;
                this.zoom.ValueChange   -= this.ZoomOnValueChange;
                InputManager.MouseWheel -= this.OnMouseWheel;

                ConVarManager.SetValue("dota_camera_distance", GameData.DefaultZoom);
            }
        }
コード例 #3
0
ファイル: ZoomHack.cs プロジェクト: ihatevim/Divine.Plugins
        public ZoomHack(RootMenu rootMenu)
        {
            var zoomHackMenu = rootMenu.CreateMenu("Zoom Hack");

            ZoomKeyItem    = zoomHackMenu.CreateHoldKey("Key", Key.LeftCtrl);
            ZoomSliderItem = zoomHackMenu.CreateSlider("Camera Distance", DefaultZoomValue, MinZoomValue, MaxZoomValue);

            ConVarManager.SetValue("r_farz", 18000);

            ZoomSliderItem.ValueChanged += OnZoomSliderValueChanged;
            InputManager.MouseWheel     += OnInputManagerMouseWheel;

            GameManager.ExecuteCommand("dota_camera_disable_zoom true");
        }
コード例 #4
0
 private void ZoomOnValueChange(object sender, SliderEventArgs e)
 {
     ConVarManager.SetValue("dota_camera_distance", e.NewValue);
 }
コード例 #5
0
ファイル: ZoomHack.cs プロジェクト: ihatevim/Divine.Plugins
        /*public void Dispose()
         * {
         *  Game.ExecuteCommand("dota_camera_disable_zoom false");
         *
         *  ZoomVar.SetValue(DefaultZoomValue);
         *
         *  ZoomSliderItem.PropertyChanged -= ZoomSliderItemChanged;
         *  InputManage.Value.MouseWheel -= InputManagerMouseWheel;
         * }*/

        private void OnZoomSliderValueChanged(MenuSlider slider, SliderEventArgs e)
        {
            ConVarManager.SetValue("dota_camera_distance", e.NewValue);
        }
コード例 #6
0
        /*public void Dispose()
         * {
         *  Weather.SetValue(0);
         *
         *  WeatherItem.PropertyChanged -= WeatherItemChanged;
         * }*/

        private void OnWeatherValueChanged(MenuSelector selector, SelectorEventArgs e)
        {
            ConVarManager.SetValue("cl_weather", Array.IndexOf(WeatherNames, e.NewValue));
        }
コード例 #7
0
 private void ParticleHackItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
 {
     ConVarManager.SetValue("dota_use_particle_fow", !e.Value);
 }
コード例 #8
0
 private void FilteringItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
 {
     ConVarManager.SetValue("fow_client_nofiltering", e.Value);
 }
コード例 #9
0
        /*public void Dispose()
         * {
         *  Fog.SetValue(1);
         *  Filtering.SetValue(0);
         *  ParticleHack.SetValue(1);
         *
         *  FogItem.PropertyChanged -= FogItemChanged;
         *  FilteringItem.PropertyChanged -= FilteringItemChanged;
         *  ParticleHackItem.PropertyChanged -= ParticleHackItemChanged;
         * }*/

        private void FogItemChanged(MenuSwitcher switcher, SwitcherEventArgs e)
        {
            ConVarManager.SetValue("fog_enable", !e.Value);
        }