diff --git a/GTAChaos/Form1.Designer.cs b/GTAChaos/Form1.Designer.cs index 44435da..7515552 100644 --- a/GTAChaos/Form1.Designer.cs +++ b/GTAChaos/Form1.Designer.cs @@ -115,6 +115,7 @@ private void InitializeComponent() this.toolTipHandler = new System.Windows.Forms.ToolTip(this.components); this.timerMain = new System.Windows.Forms.Timer(this.components); this.buttonSwitchMode = new System.Windows.Forms.Button(); + this.buttonExperimentalClearActiveEffects = new System.Windows.Forms.Button(); this.tabs.SuspendLayout(); this.tabMain.SuspendLayout(); this.tabStream.SuspendLayout(); @@ -900,6 +901,7 @@ private void InitializeComponent() // tabExperimental // this.tabExperimental.BackColor = System.Drawing.Color.Transparent; + this.tabExperimental.Controls.Add(this.buttonExperimentalClearActiveEffects); this.tabExperimental.Controls.Add(this.buttonExperimentalRunEffect); this.tabExperimental.Controls.Add(this.textBoxExperimentalEffectName); this.tabExperimental.Controls.Add(this.checkBoxExperimental_RunEffectOnAutoStart); @@ -1058,6 +1060,16 @@ private void InitializeComponent() this.buttonSwitchMode.UseVisualStyleBackColor = true; this.buttonSwitchMode.Click += new System.EventHandler(this.ButtonSwitchMode_Click); // + // buttonExperimentalClearActiveEffects + // + this.buttonExperimentalClearActiveEffects.Location = new System.Drawing.Point(431, 236); + this.buttonExperimentalClearActiveEffects.Name = "buttonExperimentalClearActiveEffects"; + this.buttonExperimentalClearActiveEffects.Size = new System.Drawing.Size(113, 22); + this.buttonExperimentalClearActiveEffects.TabIndex = 16; + this.buttonExperimentalClearActiveEffects.Text = "Clear Active Effects"; + this.buttonExperimentalClearActiveEffects.UseVisualStyleBackColor = true; + this.buttonExperimentalClearActiveEffects.Click += new System.EventHandler(this.buttonExperimentalClearActiveEffects_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1188,6 +1200,7 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox checkBoxSettingsCheckForUpdatesAtLaunch; private System.Windows.Forms.Label label5; private System.Windows.Forms.ComboBox comboBoxSettingsStreamMode; + private System.Windows.Forms.Button buttonExperimentalClearActiveEffects; } } diff --git a/GTAChaos/Form1.cs b/GTAChaos/Form1.cs index b0c83ce..a9f8a75 100644 --- a/GTAChaos/Form1.cs +++ b/GTAChaos/Form1.cs @@ -1742,5 +1742,24 @@ private void UpdateStreamTab() } } } + + private void buttonExperimentalClearActiveEffects_Click(object sender, EventArgs e) + { + AbstractEffect effect = EffectDatabase.GetByID("clear_active_effects"); + + if (effect != null) + { + EffectDatabase.ShouldCooldown = false; + this.CallEffect(effect); + EffectDatabase.ShouldCooldown = true; + return; + } + + int duration = Config.GetEffectDuration(); + WebsocketHandler.INSTANCE.SendEffectToGame(this.textBoxExperimentalEffectName.Text, new + { + seed = RandomHandler.Next(9999999) + }, duration); + } } }