public PD2Settings() { //General isEnabled = true; //Effects //// Background bg_enabled = true; assault_color = Color.FromArgb(158, 205, 255); winters_color = Color.FromArgb(221, 99, 33); assault_fade_color = Color.FromArgb(255, 255, 255); assault_speed_mult = 1.0f; assault_animation_enabled = true; ambient_color = Color.FromArgb(158, 205, 255); low_suspicion_color = Color.FromArgb(0, 0, 0, 255); medium_suspicion_color = Color.FromArgb(255, 0, 0, 255); high_suspicion_color = Color.FromArgb(255, 255, 0, 0); bg_show_suspicion = true; suspicion_effect_type = PercentEffectType.Progressive; bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(255, 0, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ammo ammo_enabled = true; ammo_color = Color.FromArgb(0, 0, 255); noammo_color = Color.FromArgb(255, 0, 0); ammo_effect_type = PercentEffectType.Progressive; ammo_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// States downed_color = Color.White; arrested_color = Color.DarkRed; //// Swan Song swansong_enabled = true; swansong_color = Color.FromArgb(158, 205, 255); swansong_speed_mult = 1.0f; //// Lighting Areas lighting_areas = new List <ColorZone>(); }
public PD2Settings() { //General isEnabled = true; Layers = new System.Collections.ObjectModel.ObservableCollection <Settings.Layers.Layer> { new Settings.Layers.Layer("Payday 2 Flashbang", new Payday_2.Layers.PD2FlashbangLayerHandler()), new Settings.Layers.Layer("Health Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 255, 0), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPlayer/Health/Current", _MaxVariablePath = "LocalPlayer/Health/Max" }, }), new Settings.Layers.Layer("Ammo Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 0, 255), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPlayer/Weapons/SelectedWeapon/Current_Clip", _MaxVariablePath = "LocalPlayer/Weapons/SelectedWeapon/Max_Clip" }, }), new Settings.Layers.Layer("Payday 2 States", new Payday_2.Layers.PD2StatesLayerHandler()), new Settings.Layers.Layer("Payday 2 Background", new Payday_2.Layers.PD2BackgroundLayerHandler()) }; //Effects //// Background bg_enabled = true; assault_color = Color.FromArgb(158, 205, 255); winters_color = Color.FromArgb(221, 99, 33); assault_fade_color = Color.FromArgb(255, 255, 255); assault_speed_mult = 1.0f; assault_animation_enabled = true; ambient_color = Color.FromArgb(158, 205, 255); low_suspicion_color = Color.FromArgb(0, 0, 0, 255); medium_suspicion_color = Color.FromArgb(255, 0, 0, 255); high_suspicion_color = Color.FromArgb(255, 255, 0, 0); bg_show_suspicion = true; suspicion_effect_type = PercentEffectType.Progressive; bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(255, 0, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ammo ammo_enabled = true; ammo_color = Color.FromArgb(0, 0, 255); noammo_color = Color.FromArgb(255, 0, 0); ammo_effect_type = PercentEffectType.Progressive; ammo_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// States downed_color = Color.White; arrested_color = Color.DarkRed; //// Swan Song swansong_enabled = true; swansong_color = Color.FromArgb(158, 205, 255); swansong_speed_mult = 1.0f; //// Lighting Areas lighting_areas = new List <ColorZone>(); }
private void PercentEffect(Color foregroundColor, Color backgroundColor, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType effectType = PercentEffectType.Progressive) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double progress = progress_total * keys.Count(); for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (effectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, Color.FromArgb( (Int32)Math.Min((Int32)foregroundColor.R * progress_total + (Int32)backgroundColor.R * (1.0 - progress_total), 255), (Int32)Math.Min((Int32)foregroundColor.G * progress_total + (Int32)backgroundColor.G * (1.0 - progress_total), 255), (Int32)Math.Min((Int32)foregroundColor.B * progress_total + (Int32)backgroundColor.B * (1.0 - progress_total), 255) )); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Color.FromArgb( (Int32)Math.Min((Int32)foregroundColor.R * percent + (Int32)backgroundColor.R * (1.0 - percent), 255), (Int32)Math.Min((Int32)foregroundColor.G * percent + (Int32)backgroundColor.G * (1.0 - percent), 255), (Int32)Math.Min((Int32)foregroundColor.B * percent + (Int32)backgroundColor.B * (1.0 - percent), 255) )); } else if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; default: if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; } } }
/// <summary> /// Draws a percent effect on the layer bitmap using a FreeFormObject and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="freeform">The FreeFormObject that the progress effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> public void PercentEffect(ColorSpectrum spectrum, Settings.FreeFormObject freeform, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } using (Graphics g = Graphics.FromImage(colormap)) { float x_pos = (float)Math.Round((freeform.X + Effects.grid_baseline_x) * Effects.editor_to_canvas_width); float y_pos = (float)Math.Round((freeform.Y + Effects.grid_baseline_y) * Effects.editor_to_canvas_height); float width = (float)(freeform.Width * Effects.editor_to_canvas_width); float height = (float)(freeform.Height * Effects.editor_to_canvas_height); if (width < 3) { width = 3; } if (height < 3) { height = 3; } if (percentEffectType == PercentEffectType.AllAtOnce) { Rectangle rect = new Rectangle((int)x_pos, (int)y_pos, (int)width, (int)height); PointF rotatePoint = new PointF(x_pos + (width / 2.0f), y_pos + (height / 2.0f)); Matrix myMatrix = new Matrix(); myMatrix.RotateAt(freeform.Angle, rotatePoint, MatrixOrder.Append); g.Transform = myMatrix; g.FillRectangle(new SolidBrush(spectrum.GetColorAt((float)progress_total)), rect); } else { double progress = progress_total * width; Rectangle rect = new Rectangle((int)x_pos, (int)y_pos, (int)progress, (int)height); PointF rotatePoint = new PointF(x_pos + (width / 2.0f), y_pos + (height / 2.0f)); Matrix myMatrix = new Matrix(); myMatrix.RotateAt(freeform.Angle, rotatePoint, MatrixOrder.Append); g.Transform = myMatrix; LinearGradientBrush brush = spectrum.ToLinearGradient(width, 0, x_pos, 0); g.FillRectangle(brush, rect); } } }
/// <summary> /// Draws a percent effect on the layer bitmap using DeviceKeys keys and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="keys">The array of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> public void PercentEffect(ColorSpectrum spectrum, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double progress = progress_total * keys.Count(); for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (percentEffectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, spectrum.GetColorAt((float)progress_total)); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Utils.ColorUtils.MultiplyColorByScalar(spectrum.GetColorAt((float)i / (float)keys.Count()), percent)); } else if (i < (int)progress) { SetOneKey(current_key, spectrum.GetColorAt((float)i / (float)keys.Count())); } break; default: if (i < (int)progress) { SetOneKey(current_key, spectrum.GetColorAt((float)i / (float)keys.Count())); } break; } } }
public DesktopSettings() { isEnabled = true; Layers = new System.Collections.ObjectModel.ObservableCollection <Settings.Layers.Layer>() { new Settings.Layers.Layer("Shortcut Assistant", new Settings.Layers.ShortcutAssistantLayerHandler() { Properties = new Settings.Layers.ShortcutAssistantLayerHandlerProperties() }), new Settings.Layers.Layer("CPU Usage", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 205, 255), _SecondaryColor = Color.FromArgb(0, 65, 80), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPCInfo/CPUUsage", _MaxVariablePath = "100" }, }), new Settings.Layers.Layer("RAM Usage", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(255, 80, 0), _SecondaryColor = Color.FromArgb(90, 30, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPCInfo/MemoryUsed", _MaxVariablePath = "LocalPCInfo/MemoryTotal" }, }), new Settings.Layers.Layer("Interactive Layer", new Settings.Layers.InteractiveLayerHandler() { Properties = new Settings.Layers.InteractiveLayerHandlerProperties() { _InteractiveEffect = InteractiveEffects.Wave_Filled, _PrimaryColor = Color.FromArgb(0, 255, 0), _RandomPrimaryColor = true, _SecondaryColor = Color.FromArgb(255, 0, 0), _RandomSecondaryColor = true, _EffectSpeed = 5.0f, _EffectWidth = 2, _TriggerOnMouseClick = false } } ) }; //Effects //// CPU cpu_usage_enabled = true; cpu_used_color = Color.FromArgb(0, 205, 255); cpu_free_color = Color.FromArgb(0, 65, 80); cpu_free_color_transparent = false; cpu_usage_effect_type = PercentEffectType.Progressive_Gradual; cpu_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ram ram_usage_enabled = true; ram_used_color = Color.FromArgb(255, 80, 0); ram_free_color = Color.FromArgb(90, 30, 0); ram_free_color_transparent = false; ram_usage_effect_type = PercentEffectType.Progressive_Gradual; ram_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// Shortcuts Assistant shortcuts_assistant_enabled = true; shortcuts_assistant_bim_bg = false; ctrl_key_color = Color.Red; ctrl_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.X, Devices.DeviceKeys.Y, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.A, Devices.DeviceKeys.Z }); win_key_color = Color.Blue; win_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.R, Devices.DeviceKeys.E, Devices.DeviceKeys.M, Devices.DeviceKeys.D, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.TAB }); alt_key_color = Color.Yellow; alt_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F4, Devices.DeviceKeys.E, Devices.DeviceKeys.V, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.TAB }); //// Lighting Areas lighting_areas = new List <ColorZone>(); //// Interactive Effects interactive_effects_enabled = false; interactive_effect_type = InteractiveEffects.None; interactive_effect_primary_color = Color.FromArgb(0, 255, 0); interactive_effects_random_primary_color = false; interactive_effect_secondary_color = Color.FromArgb(255, 0, 0); interactive_effects_random_secondary_color = false; interactive_effect_speed = 1.0f; interactive_effect_width = 2; interactive_effects_mouse_clicking = false; }
public CSGOSettings() { //General first_time_installed = false; isEnabled = true; //Effects //// Background bg_team_enabled = true; ct_color = Color.FromArgb(158, 205, 255); t_color = Color.FromArgb(221, 99, 33); ambient_color = Color.FromArgb(158, 205, 255); bg_enable_dimming = true; bg_dim_after = 15; //seconds bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(255, 0, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ammo ammo_enabled = true; ammo_color = Color.FromArgb(0, 0, 255); noammo_color = Color.FromArgb(255, 0, 0); ammo_effect_type = PercentEffectType.Progressive; ammo_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// Bomb bomb_enabled = true; bomb_flash_color = Color.FromArgb(255, 0, 0); bomb_primed_color = Color.FromArgb(0, 255, 0); bomb_display_winner_color = true; bomb_gradual = true; bomb_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.NUM_LOCK, Devices.DeviceKeys.NUM_SLASH, Devices.DeviceKeys.NUM_ASTERISK, Devices.DeviceKeys.NUM_MINUS, Devices.DeviceKeys.NUM_SEVEN, Devices.DeviceKeys.NUM_EIGHT, Devices.DeviceKeys.NUM_NINE, Devices.DeviceKeys.NUM_PLUS, Devices.DeviceKeys.NUM_FOUR, Devices.DeviceKeys.NUM_FIVE, Devices.DeviceKeys.NUM_SIX, Devices.DeviceKeys.NUM_ONE, Devices.DeviceKeys.NUM_TWO, Devices.DeviceKeys.NUM_THREE, Devices.DeviceKeys.NUM_ZERO, Devices.DeviceKeys.NUM_PERIOD, Devices.DeviceKeys.NUM_ENTER }); bomb_peripheral_use = true; //// Kills Indicator kills_indicator = true; kills_regular_color = Color.FromArgb(0, 255, 0); kills_headshot_color = Color.FromArgb(255, 80, 0); kills_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.G1, Devices.DeviceKeys.G2, Devices.DeviceKeys.G3, Devices.DeviceKeys.G4, Devices.DeviceKeys.G5 }); //// Lighting Areas lighting_areas = new List <ColorZone>(); //// Burning burning_enabled = true; burning_color = Color.FromArgb(255, 70, 0); burning_animation = true; burning_peripheral_use = true; //// Flashbang flashbang_enabled = true; flash_color = Color.FromArgb(255, 255, 255); flashbang_peripheral_use = true; ////Typing Keys typing_enabled = true; typing_color = Color.FromArgb(0, 255, 0); typing_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.TILDE, Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS, Devices.DeviceKeys.BACKSPACE, Devices.DeviceKeys.TAB, Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.R, Devices.DeviceKeys.T, Devices.DeviceKeys.Y, Devices.DeviceKeys.U, Devices.DeviceKeys.I, Devices.DeviceKeys.O, Devices.DeviceKeys.P, Devices.DeviceKeys.CLOSE_BRACKET, Devices.DeviceKeys.OPEN_BRACKET, Devices.DeviceKeys.BACKSLASH, Devices.DeviceKeys.CAPS_LOCK, Devices.DeviceKeys.A, Devices.DeviceKeys.S, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.G, Devices.DeviceKeys.H, Devices.DeviceKeys.J, Devices.DeviceKeys.K, Devices.DeviceKeys.L, Devices.DeviceKeys.SEMICOLON, Devices.DeviceKeys.APOSTROPHE, Devices.DeviceKeys.HASHTAG, Devices.DeviceKeys.ENTER, Devices.DeviceKeys.LEFT_SHIFT, Devices.DeviceKeys.BACKSLASH_UK, Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.N, Devices.DeviceKeys.M, Devices.DeviceKeys.COMMA, Devices.DeviceKeys.PERIOD, Devices.DeviceKeys.FORWARD_SLASH, Devices.DeviceKeys.RIGHT_SHIFT, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.LEFT_WINDOWS, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.SPACE, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.RIGHT_WINDOWS, Devices.DeviceKeys.APPLICATION_SELECT, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.ESC }); }
/// <summary> /// Draws a percent effect on the layer bitmap using a FreeFormObject and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="freeform">The FreeFormObject that the progress effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> /// <returns>Itself</returns> public EffectLayer PercentEffect(ColorSpectrum spectrum, Settings.FreeFormObject freeform, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive, double flash_past = 0.0, bool flash_reversed = false) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double flash_amount = 1.0; if (flash_past > 0.0) { if ((flash_reversed && progress_total >= flash_past) || (!flash_reversed && progress_total <= flash_past)) { flash_amount = Math.Sin((Utils.Time.GetMillisecondsSinceEpoch() % 1000.0D) / 1000.0D * Math.PI); } } using (Graphics g = Graphics.FromImage(colormap)) { float x_pos = (float)Math.Round((freeform.X + Effects.grid_baseline_x) * Effects.editor_to_canvas_width); float y_pos = (float)Math.Round((freeform.Y + Effects.grid_baseline_y) * Effects.editor_to_canvas_height); float width = (float)(freeform.Width * Effects.editor_to_canvas_width); float height = (float)(freeform.Height * Effects.editor_to_canvas_height); if (width < 3) { width = 3; } if (height < 3) { height = 3; } if (percentEffectType == PercentEffectType.AllAtOnce) { Rectangle rect = new Rectangle((int)x_pos, (int)y_pos, (int)width, (int)height); PointF rotatePoint = new PointF(x_pos + (width / 2.0f), y_pos + (height / 2.0f)); Matrix myMatrix = new Matrix(); myMatrix.RotateAt(freeform.Angle, rotatePoint, MatrixOrder.Append); g.Transform = myMatrix; g.FillRectangle(new SolidBrush(spectrum.GetColorAt((float)progress_total, 1.0f, flash_amount)), rect); } else { double progress = progress_total * width; Rectangle rect = new Rectangle((int)x_pos, (int)y_pos, (int)progress, (int)height); PointF rotatePoint = new PointF(x_pos + (width / 2.0f), y_pos + (height / 2.0f)); Matrix myMatrix = new Matrix(); myMatrix.RotateAt(freeform.Angle, rotatePoint, MatrixOrder.Append); g.Transform = myMatrix; LinearGradientBrush brush = spectrum.ToLinearGradient(width, 0, x_pos, 0, flash_amount); g.FillRectangle(brush, rect); } return(this); } }
/// <summary> /// Draws a percent effect on the layer bitmap using an array of DeviceKeys keys and solid colors. /// </summary> /// <param name="foregroundColor">The foreground color, used as a "Progress bar color"</param> /// <param name="backgroundColor">The background color</param> /// <param name="keys">The array of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> /// <returns>Itself</returns> public EffectLayer PercentEffect(Color foregroundColor, Color backgroundColor, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive, double flash_past = 0.0, bool flash_reversed = false) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double progress = progress_total * keys.Count(); if (flash_past > 0.0) { if ((flash_reversed && progress_total >= flash_past) || (!flash_reversed && progress_total <= flash_past)) { foregroundColor = Utils.ColorUtils.BlendColors(backgroundColor, foregroundColor, Math.Sin((Utils.Time.GetMillisecondsSinceEpoch() % 1000.0D) / 1000.0D * Math.PI)); } } for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (percentEffectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, Utils.ColorUtils.BlendColors(backgroundColor, foregroundColor, progress_total)); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Utils.ColorUtils.BlendColors(backgroundColor, foregroundColor, percent)); } else if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; default: if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; } } return(this); }
/// <summary> /// Draws a percent effect on the layer bitmap using DeviceKeys keys and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="keys">The array of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> /// <returns>Itself</returns> public EffectLayer PercentEffect(ColorSpectrum spectrum, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive, double flash_past = 0.0, bool flash_reversed = false) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double progress = progress_total * keys.Count(); double flash_amount = 1.0; if (flash_past > 0.0) { if ((flash_reversed && progress_total >= flash_past) || (!flash_reversed && progress_total <= flash_past)) { flash_amount = Math.Sin((Utils.Time.GetMillisecondsSinceEpoch() % 1000.0D) / 1000.0D * Math.PI); } } for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (percentEffectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, spectrum.GetColorAt((float)progress_total, 1.0f, flash_amount)); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Utils.ColorUtils.MultiplyColorByScalar(spectrum.GetColorAt((float)i / (float)(keys.Count() - 1), 1.0f, flash_amount), percent) ); } else if (i < (int)progress) { SetOneKey(current_key, spectrum.GetColorAt((float)i / (float)(keys.Count() - 1), 1.0f, flash_amount)); } break; default: if (i < (int)progress) { SetOneKey(current_key, spectrum.GetColorAt((float)i / (float)(keys.Count() - 1), 1.0f, flash_amount)); } break; } } return(this); }
/// <summary> /// Draws a percent effect on the layer bitmap using a KeySequence and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="sequence">The sequence of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> /// <returns>Itself</returns> public EffectLayer PercentEffect(ColorSpectrum spectrum, Settings.KeySequence sequence, double value, double total = 1.0D, PercentEffectType percentEffectType = PercentEffectType.Progressive, double flash_past = 0.0, bool flash_reversed = false) { if (sequence.type == KeySequenceType.Sequence) { PercentEffect(spectrum, sequence.keys.ToArray(), value, total, percentEffectType, flash_past, flash_reversed); } else { PercentEffect(spectrum, sequence.freeform, value, total, percentEffectType, flash_past, flash_reversed); } return(this); }
public override void Reset() { base.Reset(); Layers = new System.Collections.ObjectModel.ObservableCollection <Layer>() { new Layer("Dota 2 Respawn", new Layers.Dota2RespawnLayerHandler()), new Layer("Health Indicator", new PercentLayerHandler() { Properties = new PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 255, 0), _SecondaryColor = Color.FromArgb(0, 60, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "Hero/Health", _MaxVariablePath = "Hero/MaxHealth" }, }) { Logics = new System.Collections.ObjectModel.ObservableCollection <LogicItem>() { } }, new Layer("Mana Indicator", new PercentLayerHandler() { Properties = new PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 125, 255), _SecondaryColor = Color.FromArgb(0, 0, 60), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "Hero/Mana", _MaxVariablePath = "Hero/MaxMana" }, }) { Logics = new System.Collections.ObjectModel.ObservableCollection <LogicItem>() { } }, new Layer("Dota 2 Ability Keys", new Layers.Dota2AbilityLayerHandler()), new Layer("Dota 2 Item Keys", new Layers.Dota2ItemLayerHandler()), new Layer("Dota 2 Hero Ability Effects", new Layers.Dota2HeroAbilityEffectsLayerHandler()), new Layer("Dota 2 Killstreaks", new Layers.Dota2KillstreakLayerHandler()), new Layer("Dota 2 Background", new Layers.Dota2BackgroundLayerHandler()) }; //Effects //// Background bg_team_enabled = true; radiant_color = Color.FromArgb(0, 140, 30); dire_color = Color.FromArgb(200, 0, 0); ambient_color = Color.FromArgb(140, 190, 230); bg_enable_dimming = true; bg_dim_after = 15; //seconds bg_respawn_glow = true; bg_respawn_glow_color = Color.FromArgb(255, 255, 255); bg_display_killstreaks = true; bg_killstreaks_lines = true; bg_killstreakcolors = new List <Color>() { Color.FromArgb(0, 0, 0), //No Streak Color.FromArgb(0, 0, 0), //First kill Color.FromArgb(255, 255, 255), //Double Kill Color.FromArgb(0, 255, 0), //Killing Spree Color.FromArgb(128, 0, 255), //Dominating Color.FromArgb(255, 100, 100), //Mega Kill Color.FromArgb(255, 80, 0), //Unstoppable Color.FromArgb(130, 180, 130), //Wicked Sick Color.FromArgb(255, 0, 255), //Monster Kill Color.FromArgb(255, 0, 0), //Godlike Color.FromArgb(255, 80, 0) //Godlike+ }; bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(0, 60, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); health_blink_threshold = 0.0D; //// Mana mana_enabled = true; mana_color = Color.FromArgb(0, 125, 255); nomana_color = Color.FromArgb(0, 0, 60); mana_effect_type = PercentEffectType.Progressive_Gradual; mana_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); mana_blink_threshold = 0.0D; mimic_respawn_timer = true; mimic_respawn_timer_color = Color.FromArgb(255, 0, 0); mimic_respawn_timer_respawning_color = Color.FromArgb(255, 170, 0); //// Abilities abilitykeys_enabled = true; ability_can_use_color = Color.FromArgb(0, 255, 0); ability_can_not_use_color = Color.FromArgb(255, 0, 0); ability_keys = new List <Devices.DeviceKeys>() { Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.R }; //// Items items_enabled = true; items_empty_color = Color.FromArgb(0, 0, 0); items_on_cooldown_color = Color.FromArgb(0, 0, 0); items_no_charges_color = Color.FromArgb(150, 150, 150); items_color = Color.FromArgb(255, 255, 255); items_use_item_color = true; items_keys = new List <Devices.DeviceKeys>() { Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.N, Devices.DeviceKeys.INSERT, Devices.DeviceKeys.HOME, Devices.DeviceKeys.PAGE_UP, Devices.DeviceKeys.DELETE, Devices.DeviceKeys.END, Devices.DeviceKeys.PAGE_DOWN }; // Lighting Areas lighting_areas = new List <ColorZone>(); }
public override void Reset() { base.Reset(); Layers = new System.Collections.ObjectModel.ObservableCollection <Layer>() { new Layer("Ctrl Shortcuts", new ShortcutAssistantLayerHandler() { Properties = new ShortcutAssistantLayerHandlerProperties() { _PrimaryColor = Color.Red, _ShortcutKeys = new Keybind[] { new Keybind(new Keys[] { Keys.LControlKey, Keys.X }), new Keybind(new Keys[] { Keys.LControlKey, Keys.C }), new Keybind(new Keys[] { Keys.LControlKey, Keys.V }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Z }), new Keybind(new Keys[] { Keys.LControlKey, Keys.F4 }), new Keybind(new Keys[] { Keys.LControlKey, Keys.A }), new Keybind(new Keys[] { Keys.LControlKey, Keys.D }), new Keybind(new Keys[] { Keys.LControlKey, Keys.R }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Y }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Right }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Left }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Down }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Up }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LMenu, Keys.Tab }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LShiftKey, Keys.Up }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LShiftKey, Keys.Down }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LShiftKey, Keys.Left }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LShiftKey, Keys.Right }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Escape }), new Keybind(new Keys[] { Keys.LControlKey, Keys.LShiftKey, Keys.Escape }), new Keybind(new Keys[] { Keys.LControlKey, Keys.Escape }), new Keybind(new Keys[] { Keys.LControlKey, Keys.F }) } } }), new Layer("Win Shortcuts", new ShortcutAssistantLayerHandler() { Properties = new ShortcutAssistantLayerHandlerProperties() { _PrimaryColor = Color.Blue, _ShortcutKeys = new Keybind[] { new Keybind(new Keys[] { Keys.LWin, Keys.L }), new Keybind(new Keys[] { Keys.LWin, Keys.D }), new Keybind(new Keys[] { Keys.LWin, Keys.B }), new Keybind(new Keys[] { Keys.LWin, Keys.A }), new Keybind(new Keys[] { Keys.LWin, Keys.LMenu, Keys.D }), new Keybind(new Keys[] { Keys.LWin, Keys.E }), new Keybind(new Keys[] { Keys.LWin, Keys.G }), new Keybind(new Keys[] { Keys.LWin, Keys.I }), new Keybind(new Keys[] { Keys.LWin, Keys.M }), new Keybind(new Keys[] { Keys.LWin, Keys.P }), new Keybind(new Keys[] { Keys.LWin, Keys.R }), new Keybind(new Keys[] { Keys.LWin, Keys.S }), new Keybind(new Keys[] { Keys.LWin, Keys.Up }), new Keybind(new Keys[] { Keys.LWin, Keys.Down }), new Keybind(new Keys[] { Keys.LWin, Keys.Left }), new Keybind(new Keys[] { Keys.LWin, Keys.Right }), new Keybind(new Keys[] { Keys.LWin, Keys.Home }), new Keybind(new Keys[] { Keys.LWin, Keys.D }) } } }), new Layer("Alt Shortcuts", new ShortcutAssistantLayerHandler() { Properties = new ShortcutAssistantLayerHandlerProperties() { _PrimaryColor = Color.Yellow, _ShortcutKeys = new Keybind[] { new Keybind(new Keys[] { Keys.LMenu, Keys.Tab }), new Keybind(new Keys[] { Keys.LMenu, Keys.F4 }), new Keybind(new Keys[] { Keys.LMenu, Keys.Space }), new Keybind(new Keys[] { Keys.LMenu, Keys.Left }), new Keybind(new Keys[] { Keys.LMenu, Keys.Right }), new Keybind(new Keys[] { Keys.LMenu, Keys.PageUp }), new Keybind(new Keys[] { Keys.LMenu, Keys.PageDown }), new Keybind(new Keys[] { Keys.LMenu, Keys.Tab }), } } }), new Layer("CPU Usage", new PercentLayerHandler() { Properties = new PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 205, 255), _SecondaryColor = Color.FromArgb(0, 65, 80), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPCInfo/CPUUsage", _MaxVariablePath = "100" }, }), new Layer("RAM Usage", new PercentLayerHandler() { Properties = new PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(255, 80, 0), _SecondaryColor = Color.FromArgb(90, 30, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPCInfo/MemoryUsed", _MaxVariablePath = "LocalPCInfo/MemoryTotal" }, }), new Layer("Interactive Layer", new InteractiveLayerHandler() { Properties = new InteractiveLayerHandlerProperties() { _InteractiveEffect = InteractiveEffects.Wave_Filled, _PrimaryColor = Color.FromArgb(0, 255, 0), _RandomPrimaryColor = true, _SecondaryColor = Color.FromArgb(255, 0, 0), _RandomSecondaryColor = true, _EffectSpeed = 5.0f, _EffectWidth = 2 } } ) }; //Effects //// CPU cpu_usage_enabled = true; cpu_used_color = Color.FromArgb(0, 205, 255); cpu_free_color = Color.FromArgb(0, 65, 80); cpu_free_color_transparent = false; cpu_usage_effect_type = PercentEffectType.Progressive_Gradual; cpu_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ram ram_usage_enabled = true; ram_used_color = Color.FromArgb(255, 80, 0); ram_free_color = Color.FromArgb(90, 30, 0); ram_free_color_transparent = false; ram_usage_effect_type = PercentEffectType.Progressive_Gradual; ram_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// Shortcuts Assistant shortcuts_assistant_enabled = true; shortcuts_assistant_bim_bg = false; ctrl_key_color = Color.Red; ctrl_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.X, Devices.DeviceKeys.Y, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.A, Devices.DeviceKeys.Z }); win_key_color = Color.Blue; win_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.R, Devices.DeviceKeys.E, Devices.DeviceKeys.M, Devices.DeviceKeys.D, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.TAB }); alt_key_color = Color.Yellow; alt_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F4, Devices.DeviceKeys.E, Devices.DeviceKeys.V, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.TAB }); //// Lighting Areas lighting_areas = new List <ColorZone>(); //// Interactive Effects interactive_effects_enabled = false; interactive_effect_type = InteractiveEffects.None; interactive_effect_primary_color = Color.FromArgb(0, 255, 0); interactive_effects_random_primary_color = false; interactive_effect_secondary_color = Color.FromArgb(255, 0, 0); interactive_effects_random_secondary_color = false; interactive_effect_speed = 1.0f; interactive_effect_width = 2; interactive_effects_mouse_clicking = false; }
public Dota2Settings() { //General first_time_installed = false; isEnabled = true; //Effects //// Background bg_team_enabled = true; radiant_color = Color.FromArgb(0, 140, 30); dire_color = Color.FromArgb(200, 0, 0); ambient_color = Color.FromArgb(140, 190, 230); bg_enable_dimming = true; bg_dim_after = 15; //seconds bg_respawn_glow = true; bg_respawn_glow_color = Color.FromArgb(255, 255, 255); bg_display_killstreaks = true; bg_killstreaks_lines = true; bg_killstreakcolors = new List <Color>() { Color.FromArgb(0, 0, 0), //No Streak Color.FromArgb(0, 0, 0), //First kill Color.FromArgb(255, 255, 255), //Double Kill Color.FromArgb(0, 255, 0), //Killing Spree Color.FromArgb(128, 0, 255), //Dominating Color.FromArgb(255, 100, 100), //Mega Kill Color.FromArgb(255, 80, 0), //Unstoppable Color.FromArgb(130, 180, 130), //Wicked Sick Color.FromArgb(255, 0, 255), //Monster Kill Color.FromArgb(255, 0, 0), //Godlike Color.FromArgb(255, 80, 0) //Godlike+ }; bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(0, 60, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Mana mana_enabled = true; mana_color = Color.FromArgb(0, 125, 255); nomana_color = Color.FromArgb(0, 0, 60); mana_effect_type = PercentEffectType.Progressive_Gradual; mana_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); mimic_respawn_timer = true; mimic_respawn_timer_color = Color.FromArgb(255, 0, 0); mimic_respawn_timer_respawning_color = Color.FromArgb(255, 170, 0); //// Abilities abilitykeys_enabled = true; ability_can_use_color = Color.FromArgb(0, 255, 0); ability_can_not_use_color = Color.FromArgb(255, 0, 0); ability_keys = new List <Devices.DeviceKeys>() { Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.R }; //// Items items_enabled = true; items_empty_color = Color.FromArgb(0, 0, 0); items_on_cooldown_color = Color.FromArgb(0, 0, 0); items_no_charges_color = Color.FromArgb(150, 150, 150); items_color = Color.FromArgb(255, 255, 255); items_use_item_color = true; items_keys = new List <Devices.DeviceKeys>() { Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.V, Devices.DeviceKeys.INSERT, Devices.DeviceKeys.HOME, Devices.DeviceKeys.PAGE_UP, Devices.DeviceKeys.DELETE, Devices.DeviceKeys.END, Devices.DeviceKeys.PAGE_DOWN }; // Lighting Areas lighting_areas = new List <ColorZone>(); }
/// <summary> /// Draws a percent effect on the layer bitmap using a KeySequence with solid colors. /// </summary> /// <param name="foregroundColor">The foreground color, used as a "Progress bar color"</param> /// <param name="backgroundColor">The background color</param> /// <param name="sequence">The sequence of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> public void PercentEffect(Color foregroundColor, Color backgroundColor, Settings.KeySequence sequence, double value, double total = 1.0D, PercentEffectType percentEffectType = PercentEffectType.Progressive) { if (sequence.type == KeySequenceType.Sequence) { PercentEffect(foregroundColor, backgroundColor, sequence.keys.ToArray(), value, total, percentEffectType); } else { PercentEffect(foregroundColor, backgroundColor, sequence.freeform, value, total, percentEffectType); } }
private void PercentEffect(Color foregroundColor, Color backgroundColor, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType effectType = PercentEffectType.Progressive) { double progress_total = value / total; if (progress_total < 0.0) progress_total = 0.0; else if (progress_total > 1.0) progress_total = 1.0; double progress = progress_total * keys.Count(); for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (effectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, Color.FromArgb( (Int32)Math.Min((Int32)foregroundColor.R * progress_total + (Int32)backgroundColor.R * (1.0 - progress_total), 255), (Int32)Math.Min((Int32)foregroundColor.G * progress_total + (Int32)backgroundColor.G * (1.0 - progress_total), 255), (Int32)Math.Min((Int32)foregroundColor.B * progress_total + (Int32)backgroundColor.B * (1.0 - progress_total), 255) )); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Color.FromArgb( (Int32)Math.Min((Int32)foregroundColor.R * percent + (Int32)backgroundColor.R * (1.0 - percent), 255), (Int32)Math.Min((Int32)foregroundColor.G * percent + (Int32)backgroundColor.G * (1.0 - percent), 255), (Int32)Math.Min((Int32)foregroundColor.B * percent + (Int32)backgroundColor.B * (1.0 - percent), 255) )); } else if (i < (int)progress) SetOneKey(current_key, foregroundColor); else SetOneKey(current_key, backgroundColor); break; default: if (i < (int)progress) SetOneKey(current_key, foregroundColor); else SetOneKey(current_key, backgroundColor); break; } } }
/// <summary> /// Draws a percent effect on the layer bitmap using a KeySequence and a ColorSpectrum. /// </summary> /// <param name="spectrum">The ColorSpectrum to be used as a "Progress bar"</param> /// <param name="sequence">The sequence of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> public void PercentEffect(ColorSpectrum spectrum, Settings.KeySequence sequence, double value, double total = 1.0D, PercentEffectType percentEffectType = PercentEffectType.Progressive) { if (sequence.type == KeySequenceType.Sequence) { PercentEffect(spectrum, sequence.keys.ToArray(), value, total, percentEffectType); } else { PercentEffect(spectrum, sequence.freeform, value, total, percentEffectType); } }
public TERSettings() { //General isEnabled = true; Layers = new System.Collections.ObjectModel.ObservableCollection <Settings.Layers.Layer> { new Settings.Layers.Layer("Health Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 255, 0), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ESC, Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12, Devices.DeviceKeys.TILDE, Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS, Devices.DeviceKeys.BACKSPACE, Devices.DeviceKeys.TAB, Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.R, Devices.DeviceKeys.T, Devices.DeviceKeys.Y, Devices.DeviceKeys.U, Devices.DeviceKeys.I, Devices.DeviceKeys.O, Devices.DeviceKeys.P, Devices.DeviceKeys.OPEN_BRACKET, Devices.DeviceKeys.CLOSE_BRACKET, Devices.DeviceKeys.BACKSLASH, Devices.DeviceKeys.CAPS_LOCK, Devices.DeviceKeys.A, Devices.DeviceKeys.S, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.G, Devices.DeviceKeys.H, Devices.DeviceKeys.J, Devices.DeviceKeys.K, Devices.DeviceKeys.L, Devices.DeviceKeys.SEMICOLON, Devices.DeviceKeys.APOSTROPHE, Devices.DeviceKeys.ENTER, Devices.DeviceKeys.LEFT_SHIFT, Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.N, Devices.DeviceKeys.M, Devices.DeviceKeys.COMMA, Devices.DeviceKeys.PERIOD, Devices.DeviceKeys.FORWARD_SLASH, Devices.DeviceKeys.RIGHT_SHIFT, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.LEFT_WINDOWS, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.SPACE, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.RIGHT_WINDOWS, Devices.DeviceKeys.APPLICATION_SELECT, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.G1, Devices.DeviceKeys.G2, Devices.DeviceKeys.G3, Devices.DeviceKeys.G4, Devices.DeviceKeys.G5, Devices.DeviceKeys.G6, Devices.DeviceKeys.G7, Devices.DeviceKeys.G8, Devices.DeviceKeys.G9, Devices.DeviceKeys.G10, Devices.DeviceKeys.G11, Devices.DeviceKeys.G12, Devices.DeviceKeys.G13, Devices.DeviceKeys.G14, Devices.DeviceKeys.G15, Devices.DeviceKeys.G16, Devices.DeviceKeys.G17, Devices.DeviceKeys.G18, Devices.DeviceKeys.G19, Devices.DeviceKeys.G20, Devices.DeviceKeys.ADDITIONALLIGHT1, Devices.DeviceKeys.ADDITIONALLIGHT2, Devices.DeviceKeys.ADDITIONALLIGHT3, Devices.DeviceKeys.ADDITIONALLIGHT4, Devices.DeviceKeys.ADDITIONALLIGHT5, Devices.DeviceKeys.ADDITIONALLIGHT6, Devices.DeviceKeys.ADDITIONALLIGHT7, Devices.DeviceKeys.ADDITIONALLIGHT8, Devices.DeviceKeys.ADDITIONALLIGHT9, Devices.DeviceKeys.ADDITIONALLIGHT10 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPlayer/Health/Current", _MaxVariablePath = "LocalPlayer/Health/Max" }, }), new Settings.Layers.Layer("Mana Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 255, 255), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.PRINT_SCREEN, Devices.DeviceKeys.SCROLL_LOCK, Devices.DeviceKeys.PAUSE_BREAK, Devices.DeviceKeys.INSERT, Devices.DeviceKeys.HOME, Devices.DeviceKeys.PAGE_UP, Devices.DeviceKeys.DELETE, Devices.DeviceKeys.END, Devices.DeviceKeys.PAGE_DOWN, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.BRIGHTNESS_SWITCH, Devices.DeviceKeys.LOCK_SWITCH, Devices.DeviceKeys.MEDIA_PLAY_PAUSE, Devices.DeviceKeys.MEDIA_PLAY, Devices.DeviceKeys.MEDIA_PAUSE, Devices.DeviceKeys.MEDIA_STOP, Devices.DeviceKeys.MEDIA_PREVIOUS, Devices.DeviceKeys.MEDIA_NEXT, Devices.DeviceKeys.VOLUME_MUTE, Devices.DeviceKeys.VOLUME_UP, Devices.DeviceKeys.NUM_LOCK, Devices.DeviceKeys.NUM_SLASH, Devices.DeviceKeys.NUM_ASTERISK, Devices.DeviceKeys.NUM_MINUS, Devices.DeviceKeys.NUM_SEVEN, Devices.DeviceKeys.NUM_EIGHT, Devices.DeviceKeys.NUM_NINE, Devices.DeviceKeys.NUM_PLUS, Devices.DeviceKeys.NUM_FOUR, Devices.DeviceKeys.NUM_FIVE, Devices.DeviceKeys.NUM_SIX, Devices.DeviceKeys.NUM_ONE, Devices.DeviceKeys.NUM_TWO, Devices.DeviceKeys.NUM_THREE, Devices.DeviceKeys.NUM_ENTER, Devices.DeviceKeys.NUM_ZERO, Devices.DeviceKeys.NUM_PERIOD }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "LocalPlayer/Mana/Current", _MaxVariablePath = "LocalPlayer/Mana/Max" }, }), new Settings.Layers.Layer("Terraria Background", new Terraria.Layers.TERBackgroundLayerHandler()) }; //Effects //// Background bg_enabled = true; // assault_color = Color.FromArgb(158, 205, 255); // winters_color = Color.FromArgb(221, 99, 33); // assault_fade_color = Color.FromArgb(255, 255, 255); // assault_speed_mult = 1.0f; // assault_animation_enabled = true; ambient_color = Color.FromArgb(158, 205, 255); // low_suspicion_color = Color.FromArgb(0, 0, 0, 255); // medium_suspicion_color = Color.FromArgb(255, 0, 0, 255); // high_suspicion_color = Color.FromArgb(255, 255, 0, 0); // bg_show_suspicion = true; // suspicion_effect_type = PercentEffectType.Progressive; bg_peripheral_use = true; //// Health health_enabled = true; // gold_health_color = Color.FromArgb(255, 215, 0); health_color = Color.FromArgb(255, 0, 0); // hurt_color = Color.FromArgb(255, 0, 0); health_effect_type = PercentEffectType.Progressive_Gradual; //health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ESC, Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12, Devices.DeviceKeys.TILDE, Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS, Devices.DeviceKeys.BACKSPACE, Devices.DeviceKeys.TAB, Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.R, Devices.DeviceKeys.T, Devices.DeviceKeys.Y, Devices.DeviceKeys.U, Devices.DeviceKeys.I, Devices.DeviceKeys.O, Devices.DeviceKeys.P, Devices.DeviceKeys.OPEN_BRACKET, Devices.DeviceKeys.CLOSE_BRACKET, Devices.DeviceKeys.BACKSLASH, Devices.DeviceKeys.CAPS_LOCK, Devices.DeviceKeys.A, Devices.DeviceKeys.S, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.G, Devices.DeviceKeys.H, Devices.DeviceKeys.J, Devices.DeviceKeys.K, Devices.DeviceKeys.L, Devices.DeviceKeys.SEMICOLON, Devices.DeviceKeys.APOSTROPHE, Devices.DeviceKeys.ENTER, Devices.DeviceKeys.LEFT_SHIFT, Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.N, Devices.DeviceKeys.M, Devices.DeviceKeys.COMMA, Devices.DeviceKeys.PERIOD, Devices.DeviceKeys.FORWARD_SLASH, Devices.DeviceKeys.RIGHT_SHIFT, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.LEFT_WINDOWS, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.SPACE, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.RIGHT_WINDOWS, Devices.DeviceKeys.APPLICATION_SELECT, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.G1, Devices.DeviceKeys.G2, Devices.DeviceKeys.G3, Devices.DeviceKeys.G4, Devices.DeviceKeys.G5, Devices.DeviceKeys.G6, Devices.DeviceKeys.G7, Devices.DeviceKeys.G8, Devices.DeviceKeys.G9, Devices.DeviceKeys.G10, Devices.DeviceKeys.G11, Devices.DeviceKeys.G12, Devices.DeviceKeys.G13, Devices.DeviceKeys.G14, Devices.DeviceKeys.G15, Devices.DeviceKeys.G16, Devices.DeviceKeys.G17, Devices.DeviceKeys.G18, Devices.DeviceKeys.G19, Devices.DeviceKeys.G20, Devices.DeviceKeys.ADDITIONALLIGHT1, Devices.DeviceKeys.ADDITIONALLIGHT2, Devices.DeviceKeys.ADDITIONALLIGHT3, Devices.DeviceKeys.ADDITIONALLIGHT4, Devices.DeviceKeys.ADDITIONALLIGHT5, Devices.DeviceKeys.ADDITIONALLIGHT6, Devices.DeviceKeys.ADDITIONALLIGHT7, Devices.DeviceKeys.ADDITIONALLIGHT8, Devices.DeviceKeys.ADDITIONALLIGHT9, Devices.DeviceKeys.ADDITIONALLIGHT10 }); //// Ammo mana_enabled = true; mana_color = Color.FromArgb(255, 0, 0); // noammo_color = Color.FromArgb(255, 0, 0); mana_effect_type = PercentEffectType.Progressive_Gradual; //mana_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); mana_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.PRINT_SCREEN, Devices.DeviceKeys.SCROLL_LOCK, Devices.DeviceKeys.PAUSE_BREAK, Devices.DeviceKeys.INSERT, Devices.DeviceKeys.HOME, Devices.DeviceKeys.PAGE_UP, Devices.DeviceKeys.DELETE, Devices.DeviceKeys.END, Devices.DeviceKeys.PAGE_DOWN, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.BRIGHTNESS_SWITCH, Devices.DeviceKeys.LOCK_SWITCH, Devices.DeviceKeys.MEDIA_PLAY_PAUSE, Devices.DeviceKeys.MEDIA_PLAY, Devices.DeviceKeys.MEDIA_PAUSE, Devices.DeviceKeys.MEDIA_STOP, Devices.DeviceKeys.MEDIA_PREVIOUS, Devices.DeviceKeys.MEDIA_NEXT, Devices.DeviceKeys.VOLUME_MUTE, Devices.DeviceKeys.VOLUME_UP, Devices.DeviceKeys.NUM_LOCK, Devices.DeviceKeys.NUM_SLASH, Devices.DeviceKeys.NUM_ASTERISK, Devices.DeviceKeys.NUM_MINUS, Devices.DeviceKeys.NUM_SEVEN, Devices.DeviceKeys.NUM_EIGHT, Devices.DeviceKeys.NUM_NINE, Devices.DeviceKeys.NUM_PLUS, Devices.DeviceKeys.NUM_FOUR, Devices.DeviceKeys.NUM_FIVE, Devices.DeviceKeys.NUM_SIX, Devices.DeviceKeys.NUM_ONE, Devices.DeviceKeys.NUM_TWO, Devices.DeviceKeys.NUM_THREE, Devices.DeviceKeys.NUM_ENTER, Devices.DeviceKeys.NUM_ZERO, Devices.DeviceKeys.NUM_PERIOD }); //// States // downed_color = Color.White; // arrested_color = Color.DarkRed; //// Swan Song // swansong_enabled = true; // swansong_color = Color.FromArgb(158, 205, 255); // swansong_speed_mult = 1.0f; //// Lighting Areas lighting_areas = new List <ColorZone>(); }
/// <summary> /// Draws a percent effect on the layer bitmap using an array of DeviceKeys keys and solid colors. /// </summary> /// <param name="foregroundColor">The foreground color, used as a "Progress bar color"</param> /// <param name="backgroundColor">The background color</param> /// <param name="keys">The array of keys that the percent effect will be drawn on</param> /// <param name="value">The current progress value</param> /// <param name="total">The maxiumum progress value</param> /// <param name="percentEffectType">The percent effect type</param> public void PercentEffect(Color foregroundColor, Color backgroundColor, Devices.DeviceKeys[] keys, double value, double total, PercentEffectType percentEffectType = PercentEffectType.Progressive) { double progress_total = value / total; if (progress_total < 0.0) { progress_total = 0.0; } else if (progress_total > 1.0) { progress_total = 1.0; } double progress = progress_total * keys.Count(); for (int i = 0; i < keys.Count(); i++) { Devices.DeviceKeys current_key = keys[i]; switch (percentEffectType) { case (PercentEffectType.AllAtOnce): SetOneKey(current_key, Utils.ColorUtils.BlendColors(backgroundColor, foregroundColor, progress_total)); break; case (PercentEffectType.Progressive_Gradual): if (i == (int)progress) { double percent = (double)progress - i; SetOneKey(current_key, Utils.ColorUtils.BlendColors(backgroundColor, foregroundColor, percent)); } else if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; default: if (i < (int)progress) { SetOneKey(current_key, foregroundColor); } else { SetOneKey(current_key, backgroundColor); } break; } } }
public DesktopSettings() { isEnabled = true; //Effects //// CPU cpu_usage_enabled = true; cpu_used_color = Color.FromArgb(0, 205, 255); cpu_free_color = Color.FromArgb(0, 65, 80); cpu_free_color_transparent = false; cpu_usage_effect_type = PercentEffectType.Progressive_Gradual; cpu_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ram ram_usage_enabled = true; ram_used_color = Color.FromArgb(255, 80, 0); ram_free_color = Color.FromArgb(90, 30, 0); ram_free_color_transparent = false; ram_usage_effect_type = PercentEffectType.Progressive_Gradual; ram_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// Shortcuts Assistant shortcuts_assistant_enabled = true; shortcuts_assistant_bim_bg = false; ctrl_key_color = Color.Red; ctrl_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.X, Devices.DeviceKeys.Y, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.A, Devices.DeviceKeys.Z }); win_key_color = Color.Blue; win_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.R, Devices.DeviceKeys.E, Devices.DeviceKeys.M, Devices.DeviceKeys.D, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.TAB }); alt_key_color = Color.Yellow; alt_key_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F4, Devices.DeviceKeys.E, Devices.DeviceKeys.V, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.TAB }); //// Lighting Areas lighting_areas = new List <ColorZone>(); //// Interactive Effects interactive_effects_enabled = false; interactive_effect_type = InteractiveEffects.None; interactive_effect_primary_color = Color.FromArgb(0, 255, 0); interactive_effects_random_primary_color = false; interactive_effect_secondary_color = Color.FromArgb(255, 0, 0); interactive_effects_random_secondary_color = false; interactive_effect_speed = 1.0f; interactive_effect_width = 2; interactive_effects_mouse_clicking = false; }
public CSGOSettings() { //General first_time_installed = false; isEnabled = true; Layers = new System.Collections.ObjectModel.ObservableCollection <Settings.Layers.Layer>() { new Settings.Layers.Layer("CSGO Typing Indicator", new Layers.CSGOTypingIndicatorLayerHandler()), new Settings.Layers.Layer("CSGO Kills Indicator", new Layers.CSGOKillIndicatorLayerHandler()), new Settings.Layers.Layer("CSGO Flashbang Effect", new Layers.CSGOFlashbangLayerHandler()), new Settings.Layers.Layer("Health Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 255, 0), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive_Gradual, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }), _BlinkThreshold = 0.0, _BlinkDirection = false, _VariablePath = "Player/State/Health", _MaxVariablePath = "100" }, }), new Settings.Layers.Layer("Ammo Indicator", new Settings.Layers.PercentLayerHandler() { Properties = new Settings.Layers.PercentLayerHandlerProperties() { _PrimaryColor = Color.FromArgb(0, 0, 255), _SecondaryColor = Color.FromArgb(255, 0, 0), _PercentType = PercentEffectType.Progressive, _Sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }), _BlinkThreshold = 0.15, _BlinkDirection = false, _VariablePath = "Player/Weapons/ActiveWeapon/AmmoClip", _MaxVariablePath = "Player/Weapons/ActiveWeapon/AmmoClipMax" }, }), new Settings.Layers.Layer("CSGO Bomb Effect", new Layers.CSGOBombLayerHandler()), new Settings.Layers.Layer("CSGO Burning Effect", new Layers.CSGOBurningLayerHandler()), new Settings.Layers.Layer("CSGO Background", new Layers.CSGOBackgroundLayerHandler()) }; //Effects //// Background bg_team_enabled = true; ct_color = Color.FromArgb(158, 205, 255); t_color = Color.FromArgb(221, 99, 33); ambient_color = Color.FromArgb(158, 205, 255); bg_enable_dimming = true; bg_dim_after = 15; //seconds bg_peripheral_use = true; //// Health health_enabled = true; healthy_color = Color.FromArgb(0, 255, 0); hurt_color = Color.FromArgb(255, 0, 0); health_effect_type = PercentEffectType.Progressive_Gradual; health_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.F1, Devices.DeviceKeys.F2, Devices.DeviceKeys.F3, Devices.DeviceKeys.F4, Devices.DeviceKeys.F5, Devices.DeviceKeys.F6, Devices.DeviceKeys.F7, Devices.DeviceKeys.F8, Devices.DeviceKeys.F9, Devices.DeviceKeys.F10, Devices.DeviceKeys.F11, Devices.DeviceKeys.F12 }); //// Ammo ammo_enabled = true; ammo_color = Color.FromArgb(0, 0, 255); noammo_color = Color.FromArgb(255, 0, 0); ammo_effect_type = PercentEffectType.Progressive; ammo_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS }); //// Bomb bomb_enabled = true; bomb_flash_color = Color.FromArgb(255, 0, 0); bomb_primed_color = Color.FromArgb(0, 255, 0); bomb_display_winner_color = true; bomb_gradual = true; bomb_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.NUM_LOCK, Devices.DeviceKeys.NUM_SLASH, Devices.DeviceKeys.NUM_ASTERISK, Devices.DeviceKeys.NUM_MINUS, Devices.DeviceKeys.NUM_SEVEN, Devices.DeviceKeys.NUM_EIGHT, Devices.DeviceKeys.NUM_NINE, Devices.DeviceKeys.NUM_PLUS, Devices.DeviceKeys.NUM_FOUR, Devices.DeviceKeys.NUM_FIVE, Devices.DeviceKeys.NUM_SIX, Devices.DeviceKeys.NUM_ONE, Devices.DeviceKeys.NUM_TWO, Devices.DeviceKeys.NUM_THREE, Devices.DeviceKeys.NUM_ZERO, Devices.DeviceKeys.NUM_PERIOD, Devices.DeviceKeys.NUM_ENTER }); bomb_peripheral_use = true; //// Kills Indicator kills_indicator = true; kills_regular_color = Color.FromArgb(0, 255, 0); kills_headshot_color = Color.FromArgb(255, 80, 0); kills_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.G1, Devices.DeviceKeys.G2, Devices.DeviceKeys.G3, Devices.DeviceKeys.G4, Devices.DeviceKeys.G5 }); //// Lighting Areas lighting_areas = new List <ColorZone>(); //// Burning burning_enabled = true; burning_color = Color.FromArgb(255, 70, 0); burning_animation = true; burning_peripheral_use = true; //// Flashbang flashbang_enabled = true; flash_color = Color.FromArgb(255, 255, 255); flashbang_peripheral_use = true; ////Typing Keys typing_enabled = true; typing_color = Color.FromArgb(0, 255, 0); typing_sequence = new KeySequence(new Devices.DeviceKeys[] { Devices.DeviceKeys.TILDE, Devices.DeviceKeys.ONE, Devices.DeviceKeys.TWO, Devices.DeviceKeys.THREE, Devices.DeviceKeys.FOUR, Devices.DeviceKeys.FIVE, Devices.DeviceKeys.SIX, Devices.DeviceKeys.SEVEN, Devices.DeviceKeys.EIGHT, Devices.DeviceKeys.NINE, Devices.DeviceKeys.ZERO, Devices.DeviceKeys.MINUS, Devices.DeviceKeys.EQUALS, Devices.DeviceKeys.BACKSPACE, Devices.DeviceKeys.TAB, Devices.DeviceKeys.Q, Devices.DeviceKeys.W, Devices.DeviceKeys.E, Devices.DeviceKeys.R, Devices.DeviceKeys.T, Devices.DeviceKeys.Y, Devices.DeviceKeys.U, Devices.DeviceKeys.I, Devices.DeviceKeys.O, Devices.DeviceKeys.P, Devices.DeviceKeys.CLOSE_BRACKET, Devices.DeviceKeys.OPEN_BRACKET, Devices.DeviceKeys.BACKSLASH, Devices.DeviceKeys.CAPS_LOCK, Devices.DeviceKeys.A, Devices.DeviceKeys.S, Devices.DeviceKeys.D, Devices.DeviceKeys.F, Devices.DeviceKeys.G, Devices.DeviceKeys.H, Devices.DeviceKeys.J, Devices.DeviceKeys.K, Devices.DeviceKeys.L, Devices.DeviceKeys.SEMICOLON, Devices.DeviceKeys.APOSTROPHE, Devices.DeviceKeys.HASHTAG, Devices.DeviceKeys.ENTER, Devices.DeviceKeys.LEFT_SHIFT, Devices.DeviceKeys.BACKSLASH_UK, Devices.DeviceKeys.Z, Devices.DeviceKeys.X, Devices.DeviceKeys.C, Devices.DeviceKeys.V, Devices.DeviceKeys.B, Devices.DeviceKeys.N, Devices.DeviceKeys.M, Devices.DeviceKeys.COMMA, Devices.DeviceKeys.PERIOD, Devices.DeviceKeys.FORWARD_SLASH, Devices.DeviceKeys.RIGHT_SHIFT, Devices.DeviceKeys.LEFT_CONTROL, Devices.DeviceKeys.LEFT_WINDOWS, Devices.DeviceKeys.LEFT_ALT, Devices.DeviceKeys.SPACE, Devices.DeviceKeys.RIGHT_ALT, Devices.DeviceKeys.RIGHT_WINDOWS, Devices.DeviceKeys.APPLICATION_SELECT, Devices.DeviceKeys.RIGHT_CONTROL, Devices.DeviceKeys.ARROW_UP, Devices.DeviceKeys.ARROW_LEFT, Devices.DeviceKeys.ARROW_DOWN, Devices.DeviceKeys.ARROW_RIGHT, Devices.DeviceKeys.ESC }); }