void Awake() { mm = modeManegerObj.GetComponent<ModeManegr>(); rcs = RedSlider.GetComponent<ColorSlider>(); gcs = GreenSlider.GetComponent<ColorSlider>(); bcs = BlueSlider.GetComponent<ColorSlider>(); }
private void initToolStrip() { toolStrip1.Items.Add("宽:"); widthNumeric = new NumericUpDown(); widthNumeric.Maximum = 2048; widthNumeric.ValueChanged += new EventHandler(WidthValueChanged); toolStrip1.Items.Add(new ToolStripControlHost(widthNumeric)); toolStrip1.Items.Add("高:"); heightNumeric = new NumericUpDown(); heightNumeric.Maximum = 2048; heightNumeric.ValueChanged += new EventHandler(HeightValueChanged); toolStrip1.Items.Add(new ToolStripControlHost(heightNumeric)); toolStrip1.Items.Add(new ToolStripSeparator()); sliderScaleScene = new ColorSlider(); sliderScaleScene.Maximum = 500; sliderScaleScene.Minimum = 1; toolStrip1.Items.Add(new ToolStripControlHost(sliderScaleScene)); sliderScaleScene.ValueChanged += new EventHandler(SlidersValueChanged); numericScaleScene = new NumericUpDown(); numericScaleScene.Maximum = 500; numericScaleScene.Minimum = 1; toolStrip1.Items.Add(new ToolStripControlHost(numericScaleScene)); numericScaleScene.ValueChanged += new EventHandler(NumericScaleSceneChanged); SetToolStripInfoByScene(); }
//MOVES THE COLOR SLIDER BELOW THE VIDEO IN TIME WITH THE VIDEO private void MoveSlider() { try { //GET THE MAIN WINDOW COLOR SLIDER ColorSlider video_slide_bar = Singleton.MAIN_WINDOW.GetColorSlider(); //IF AN INCREMENT OF THE VALUE OF THE SLIDER IS BEYOND 100 if (video_slide_bar.Value >= 100) { //SET THE TIME ELAPSED TO 00:00 SetLabelText(DEFAULT_TIME_LABEL_TEXT); //SET THE VALUE OF THE SLIDER TO 100 video_slide_bar.Value = 100; WORK_DONE = true; } else { //ELSE INCREMENT SLIDER VALUE BY 1 video_slide_bar.Value++; } } catch (Exception) { } }
private Tuple <ColorSlider, Label, Button> AddSlider(FlowLayoutPanel pnlHistogram, int parentWidth, int leftColWd, double value, string text, Color color, bool editColors) { int scrollWd = SystemInformation.VerticalScrollBarWidth; var slider = new ColorSlider(); slider.BarOuterColor = Color.Gray; slider.BarInnerColor = Color.LightGray; slider.ElapsedInnerColor = GetHiliteColor(color); slider.ElapsedOuterColor = color; slider.Minimum = 0; slider.Maximum = 100; slider.Value = (int)Math.Round(100.0 * value); slider.ValueChanged += slider_ValueChanged; var panel = new FlowLayoutPanel(); panel.FlowDirection = FlowDirection.LeftToRight; panel.ClientSize = new Size(0, PANEL_HGT); panel.Width = parentWidth - scrollWd - MARG; Button btn = null; if (!editColors) { var label = new Label(); label.Size = new Size(leftColWd, PANEL_HGT); label.Text = text; label.TextAlign = ContentAlignment.MiddleRight; label.Parent = panel; } else { btn = new Button(); btn.Size = new Size(leftColWd, BTN_HGT); btn.Text = text; btn.TextAlign = ContentAlignment.MiddleRight; btn.Parent = panel; btn.Click += btn_Click; } slider.Size = new Size(panel.Width - leftColWd - PCNT_LABEL_WD - 2 * MARG, PANEL_HGT); slider.Parent = panel; slider.Height = 35; panel.Parent = pnlHistogram; var lblPcnt = new Label(); lblPcnt.Size = new Size(PCNT_LABEL_WD, PANEL_HGT); lblPcnt.TextAlign = ContentAlignment.MiddleRight; lblPcnt.Text = string.Format("{0}%", slider.Value); lblPcnt.Parent = panel; return(new Tuple <ColorSlider, Label, Button>(slider, lblPcnt, btn)); }
void Awake() { RedSlider = GameObject.Find("RedSlider"); rcs = RedSlider.GetComponent<ColorSlider>(); GreenSlider = GameObject.Find("GreenSlider"); gcs = GreenSlider.GetComponent<ColorSlider>(); BlueSlider = GameObject.Find("BlueSlider"); bcs = BlueSlider.GetComponent<ColorSlider>(); sp = GetComponent<SpriteRenderer>(); }
/// <summary> /// Create a new color picker Option. /// </summary> /// <param name="fixedHeight"> /// Whether <c cref="Height">Height</c> should return the maximum possible height given the style, or the current height. /// Older versions of GMCM do not support options dynamically updating height. /// </param> /// <param name="getValue">A function that returns the current value in the underlying configuration object</param> /// <param name="setValue">A function that should save the given value to the underlying configuration object</param> /// <param name="showAlpha">Whether a slider should be shown for setting the Alpha channel or not</param> /// <param name="style">Specify which types of color picker to show</param> public ColorPickerOption(bool fixedHeight, Func <Color> getValue, Action <Color> setValue, bool showAlpha = true, ColorPickerStyle style = 0) { FixedHeight = fixedHeight; GetValue = getValue; SetValue = setValue; ShowAlpha = showAlpha; currentValue = getValue(); if (style == ColorPickerStyle.Default) { style = ColorPickerStyle.AllStyles | ColorPickerStyle.ToggleChooser; } EffectiveStyle = style; ShowStylePicker = (style.HasFlag(ColorPickerStyle.RadioChooser) || style.HasFlag(ColorPickerStyle.ToggleChooser)) && BitOperations.PopCount((uint)(style & ColorPickerStyle.AllStyles)) > 1; Action <IconButton> styleButtonClick = style.HasFlag(ColorPickerStyle.ToggleChooser) ? IconButton.ToggleSelected : StyleButtonRadio; bool defaultSelected = !style.HasFlag(ColorPickerStyle.RadioChooser); RGBStyleButton = new IconButton(rgbStripe, null, "RGB", styleButtonClick, defaultSelected && style.HasFlag(ColorPickerStyle.RGBSliders)); HSVStyleButton = new IconButton(smallColorWheel, null, "HSV", styleButtonClick, defaultSelected && style.HasFlag(ColorPickerStyle.HSVColorWheel)); HSLStyleButton = new IconButton(smallColorWheel, null, "HSL", styleButtonClick, defaultSelected && style.HasFlag(ColorPickerStyle.HSLColorWheel)); StyleButtons = new List <IconButton>(); if (style.HasFlag(ColorPickerStyle.RGBSliders)) { StyleButtons.Add(RGBStyleButton); } if (style.HasFlag(ColorPickerStyle.HSVColorWheel)) { StyleButtons.Add(HSVStyleButton); } if (style.HasFlag(ColorPickerStyle.HSLColorWheel)) { StyleButtons.Add(HSLStyleButton); } if (ShowStylePicker && style.HasFlag(ColorPickerStyle.RadioChooser)) { StyleButtons[0].Selected = true; } sliderR = new ColorSlider((b) => new Color((int)b, 0, 0, 255), currentValue.R, (b) => { currentValue.R = b; RGBChanged(); }); sliderG = new ColorSlider((b) => new Color(0, (int)b, 0, 255), currentValue.G, (b) => { currentValue.G = b; RGBChanged(); }); sliderB = new ColorSlider((b) => new Color(0, 0, (int)b, 255), currentValue.B, (b) => { currentValue.B = b; RGBChanged(); }); sliderA = new ColorSlider((b) => new Color(0, 0, 0, (int)b), currentValue.A, (b) => { currentValue.A = b; }); hsvWheel = new ColorWheel((h, s) => ColorUtil.FromHSV(h, s, vSlider.Value), HSVWheelChanged, 150); vSlider = new VerticalSlider((v) => ColorUtil.FromHSV(hsvWheel.HueRadians, hsvWheel.Saturation, v), VSliderChanged, 150); hslWheel = new ColorWheel((h, s) => ColorUtil.FromHSL(h, s, lSlider.Value), HSLWheelChanged, 150); lSlider = new VerticalSlider((v) => ColorUtil.FromHSL(hslWheel.HueRadians, hslWheel.Saturation, v), LSliderChanged, 150); ResetHSVWheel(); ResetHSLWheel(); }
public AlphaColorPicker() { Button pickerOpen; var vBox = new BoxContainer { Orientation = BoxContainer.LayoutOrientation.Vertical }; AddChild(vBox); vBox.AddChild(_colorSliderR = new ColorSlider(StyleNano.StyleClassSliderRed)); vBox.AddChild(_colorSliderG = new ColorSlider(StyleNano.StyleClassSliderGreen)); vBox.AddChild(_colorSliderB = new ColorSlider(StyleNano.StyleClassSliderBlue)); vBox.AddChild(_colorSliderA = new ColorSlider(StyleNano.StyleClassSliderWhite)); vBox.AddChild(pickerOpen = new Button { Text = "Palette" }); pickerOpen.OnPressed += _ => { if (_picker is null) { _picker = new PaletteColorPicker(); _picker.OpenToLeft(); _picker.PaletteList.OnItemSelected += args => { SetData((args.ItemList.GetSelected().First().Metadata as Color?) !.Value); ColorValueChanged(); }; } else { if (_picker.IsOpen) { _picker.Close(); } else { _picker.Open(); } } }; var colorValueChanged = ColorValueChanged; _colorSliderR.OnValueChanged += colorValueChanged; _colorSliderG.OnValueChanged += colorValueChanged; _colorSliderB.OnValueChanged += colorValueChanged; _colorSliderA.OnValueChanged += colorValueChanged; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ColorPickerMulti)); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.colorSlider1 = new Endogine.Editors.ColorSlider(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // pictureBox1 // this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.pictureBox1.Location = new System.Drawing.Point(0, 0); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(256, 256); this.pictureBox1.TabIndex = 2; this.pictureBox1.TabStop = false; this.pictureBox1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseDown); this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove); this.pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint); this.pictureBox1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseUp); // // colorSlider1 // this.colorSlider1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("colorSlider1.BackgroundImage"))); this.colorSlider1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.colorSlider1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.colorSlider1.Dragging = false; this.colorSlider1.Location = new System.Drawing.Point(262, 0); this.colorSlider1.MajorTicks = 10; this.colorSlider1.Max = 1F; this.colorSlider1.Min = 0F; this.colorSlider1.Name = "colorSlider1"; this.colorSlider1.Size = new System.Drawing.Size(46, 256); this.colorSlider1.StepSize = 0F; this.colorSlider1.TabIndex = 4; this.colorSlider1.Value = 0.5F; this.colorSlider1.ValueAs0to1 = 0.5F; this.colorSlider1.ValueChanged += new System.EventHandler(this.colorSlider1_ValueChanged); // // ColorPickerMulti // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.colorSlider1); this.Controls.Add(this.pictureBox1); this.Name = "ColorPickerMulti"; this.Size = new System.Drawing.Size(312, 258); this.Resize += new System.EventHandler(this.ColorPickerMulti_Resize); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); }
private void slider_ValueChanged(object sender, EventArgs e) { ColorSlider slider = (ColorSlider)sender; if (slider.Focused) { int index = _dictSliders[slider]; UpdateSliderLabel(index); int total = CurrentValueTotal; if (total != 100) { BalanceSliders(index, 100 - total); } } }
public void ChangeItem() { GetComponentInParent <PanelInit>().currentItem = currentItem; Slider[] sliders = GetComponentInParent <PanelInit>().GetComponentsInChildren <Slider>(); ColorSlider.UpdateSliders(currentItem.color, sliders); if (clothingItem.name.Contains("none")) { currentItem.enabled = false; } else { currentItem.enabled = true; currentItem.sprite = clothingItem.sprite; } }
public void CreateSliders() { ClearSliders(); if (viewModel.SelectedGradient != null) { foreach (var g in viewModel.SelectedGradient.LinearGradient.GradientStops) { var s = new ColorSlider(SlidersCanvas, g); s.MouseLeftButtonDown += ColorSliderMouseLeftButtonDown; s.MouseRightButtonDown += ColorSliderMouseRightButtonDown; sliders.Add(s); Canvas.SetLeft(s, s.CanvasLeftPosition); SlidersCanvas.Children.Add(s); } } }
private void ColorSliderMouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (sender is ColorSlider slider) { selectedSlider = slider; var color = selectedSlider.DrawingColor; ColorWheel.Color = color; ColorEditor.Color = color; foreach (var s in sliders) { s.IsSelected = false; } slider.IsSelected = true; e.Handled = true; } }
public void setPanel() { foreach (GameObject g in GameObject.FindGameObjectsWithTag("Panel")) { g.SetActive(false); } if (matchingPanel != null) { matchingPanel.SetActive(true); } foreach (Image i in matchingItems) { if (i.enabled) { GetComponentInParent <PanelInit> ().currentItem = i; Slider[] sliders = GetComponentInParent <PanelInit>().GetComponentsInChildren <Slider>(); ColorSlider.UpdateSliders(i.color, sliders); break; } } }
private void AddExtraSlider(string label, double value, int parentWidth, int leftColWd) { var panel = new FlowLayoutPanel(); panel.FlowDirection = FlowDirection.LeftToRight; panel.ClientSize = new Size(0, PANEL_HGT); panel.Width = parentWidth - SystemInformation.VerticalScrollBarWidth - MARG; var lbl = new Label(); lbl.Size = new Size(leftColWd, PANEL_HGT); lbl.Text = label; lbl.TextAlign = ContentAlignment.MiddleRight; lbl.Parent = panel; _extraSlider = new ColorSlider(); _extraSlider.BarOuterColor = Color.Gray; _extraSlider.BarInnerColor = Color.LightGray; _extraSlider.ElapsedInnerColor = GetHiliteColor(Color.Black); _extraSlider.ElapsedOuterColor = Color.Black; _extraSlider.Minimum = 0; _extraSlider.Maximum = 100; _extraSlider.Value = (int)Math.Round(100.0 * value); _extraSlider.ValueChanged += extraSlider_ValueChanged; _extraSlider.Size = new Size(panel.Width - leftColWd - PCNT_LABEL_WD - 2 * MARG, 35); _extraSlider.Parent = panel; _extraSliderLabel = new Label(); _extraSliderLabel.Size = new Size(PCNT_LABEL_WD, PANEL_HGT); _extraSliderLabel.TextAlign = ContentAlignment.MiddleRight; _extraSliderLabel.Text = string.Format("{0}%", _extraSlider.Value); _extraSliderLabel.Parent = panel; panel.Parent = this; panel.Location = new Point(10, pnlHistogram.Bounds.Bottom); }
public void SetPaintMetalnessByColorPicker(ColorSlider colorSlider) { Custamization.SetPaintMetalness(Instance.activePlayerVehicle, colorSlider.metalness); }
public void SetCarBodyColorByColorPicker(ColorSlider colorSlider) { Custamization.SetCarBodyColor(Instance.activePlayerVehicle, colorSlider.color); }
public void SetHeadlightColorByColorPicker(ColorSlider color) { Custamization.SetHeadlightsColor(Instance.activePlayerVehicle, color.color); }
public static void LoadMyMenu() { MyMainMenu = MainMenu.AddMenu(Name, Name + "id"); ComboMenu = MyMainMenu.AddSubMenu("Combo", "comoboid"); FarmMenu = MyMainMenu.AddSubMenu("Farm", "farmid"); MiscMenu = MyMainMenu.AddSubMenu("Misc", "miscid"); DrawingsMenu = MyMainMenu.AddSubMenu("Drawings", "drawid"); MyMainMenu.AddGroupLabel("Nautilus Addon"); MyMainMenu.AddLabel("More features INC :)"); var mana = HasMana; #region Combo Menu ComboMenu.AddGroupLabel("Combo"); ComboMenu.CreateCheckbox(Q, "combo"); ComboMenu.CreateCheckbox(W, "combo"); ComboMenu.CreateCheckbox(E, "combo"); ComboMenu.CreateCheckbox(R, "combo"); ComboMenu.AddGroupLabel("Harass"); if (mana) { ComboMenu.CreateSlider("harass", "Mana must be higher than ({0}%) to cast any harass spell", 30); } ComboMenu.CreateCheckbox(Q, "harass"); ComboMenu.CreateCheckbox(W, "harass"); ComboMenu.CreateCheckbox(E, "harass"); #endregion Combo Menu #region Farm Menu FarmMenu.AddGroupLabel("Last Hit"); FarmMenu.AddGroupLabel("Lane Clear"); if (mana) { FarmMenu.CreateSlider("laneclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 60); } FarmMenu.AddGroupLabel("Jungle Clear"); FarmMenu.CreateCheckbox(Q, "jungleclear"); FarmMenu.CreateCheckbox(W, "jungleclear"); FarmMenu.CreateCheckbox(E, "jungleclear"); if (mana) { FarmMenu.CreateSlider("jungleclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 25); } #endregion Farm Menu #region Misc Menu MiscMenu.AddGroupLabel("Killsteal"); MiscMenu.CreateCheckbox(R, "killsteal"); if (mana) { MiscMenu.CreateSlider("killsteal", "Mana must be higher than ({0}%) to cast any killsteal spell", 10); } MiscMenu.AddGroupLabel("Anti-Gapcloser"); if (mana) { MiscMenu.CreateSlider("antigapcloser", "Mana must be higher than ({0}%) to cast any antigapcloser spell", 10); } /*MiscMenu.CreateCheckbox("SmiteEnemyKS", "Ks with BlueSmite");*/ MiscMenu.CreateCheckbox("Mastery", "Mastery after kill enemy?"); /*MiscMenu.CreateCheckbox("SmiteMobsJG", "Allow Smite on JG Mobs");*/ #endregion Misc Menu #region Drawing Menu QColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.Q); WColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.W); EColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.E); RColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.R); DamageIndicatorColorSlider = new ColorSlider(DrawingsMenu, "damageindicator"); DrawingsMenu.CreateCheckbox("perDraw", "Draw Percentage"); DrawingsMenu.CreateCheckbox("statDraw", "Draw statistics", false); #endregion Drawing Menu }
private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.numR = new System.Windows.Forms.NumericUpDown(); this.numG = new System.Windows.Forms.NumericUpDown(); this.numB = new System.Windows.Forms.NumericUpDown(); this.panelColor1 = new System.Windows.Forms.Panel(); this.panelColor2 = new System.Windows.Forms.Panel(); this.panelColors = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.numHue = new System.Windows.Forms.NumericUpDown(); this.numSat = new System.Windows.Forms.NumericUpDown(); this.numLum = new System.Windows.Forms.NumericUpDown(); this.luminanceView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); this.saturationView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); this.lsView = new Fireball.Windows.Forms.ColorChooseControl.ColorPicker(); this.hueView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); ((System.ComponentModel.ISupportInitialize)(this.numR)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numG)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numB)).BeginInit(); this.panelColors.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); this.panel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numHue)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSat)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numLum)).BeginInit(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(386, 100); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(18, 13); this.label1.TabIndex = 5; this.label1.Text = "R:"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(386, 126); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(18, 13); this.label2.TabIndex = 5; this.label2.Text = "G:"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(386, 152); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(17, 13); this.label3.TabIndex = 5; this.label3.Text = "B:"; // // numR // this.numR.Location = new System.Drawing.Point(408, 98); this.numR.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.numR.Name = "numR"; this.numR.Size = new System.Drawing.Size(48, 20); this.numR.TabIndex = 6; this.numR.Value = new decimal(new int[] { 255, 0, 0, 0}); this.numR.ValueChanged += new System.EventHandler(this.numR_ValueChanged); // // numG // this.numG.Location = new System.Drawing.Point(408, 124); this.numG.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.numG.Name = "numG"; this.numG.Size = new System.Drawing.Size(48, 20); this.numG.TabIndex = 6; this.numG.ValueChanged += new System.EventHandler(this.numG_ValueChanged); // // numB // this.numB.Location = new System.Drawing.Point(408, 150); this.numB.Maximum = new decimal(new int[] { 255, 0, 0, 0}); this.numB.Name = "numB"; this.numB.Size = new System.Drawing.Size(48, 20); this.numB.TabIndex = 6; this.numB.ValueChanged += new System.EventHandler(this.numB_ValueChanged); // // panelColor1 // this.panelColor1.BackColor = System.Drawing.Color.Red; this.panelColor1.Location = new System.Drawing.Point(1, 1); this.panelColor1.Name = "panelColor1"; this.panelColor1.Size = new System.Drawing.Size(68, 34); this.panelColor1.TabIndex = 7; // // panelColor2 // this.panelColor2.BackColor = System.Drawing.Color.Red; this.panelColor2.Location = new System.Drawing.Point(1, 35); this.panelColor2.Name = "panelColor2"; this.panelColor2.Size = new System.Drawing.Size(68, 34); this.panelColor2.TabIndex = 7; // // panelColors // this.panelColors.BackColor = System.Drawing.SystemColors.ControlDark; this.panelColors.Controls.Add(this.panelColor1); this.panelColors.Controls.Add(this.panelColor2); this.panelColors.Location = new System.Drawing.Point(387, 5); this.panelColors.Name = "panelColors"; this.panelColors.Size = new System.Drawing.Size(70, 70); this.panelColors.TabIndex = 8; // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.ControlDark; this.panel1.Controls.Add(this.hueView); this.panel1.Location = new System.Drawing.Point(347, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(22, 258); this.panel1.TabIndex = 9; // // panel2 // this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; this.panel2.Controls.Add(this.lsView); this.panel2.Location = new System.Drawing.Point(3, 5); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(258, 258); this.panel2.TabIndex = 10; // // panel3 // this.panel3.BackColor = System.Drawing.SystemColors.ControlDark; this.panel3.Controls.Add(this.saturationView); this.panel3.Location = new System.Drawing.Point(274, 5); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(22, 258); this.panel3.TabIndex = 11; // // panel4 // this.panel4.BackColor = System.Drawing.SystemColors.ControlDark; this.panel4.Controls.Add(this.luminanceView); this.panel4.Location = new System.Drawing.Point(310, 5); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(22, 258); this.panel4.TabIndex = 12; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(386, 192); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(18, 13); this.label4.TabIndex = 5; this.label4.Text = "H:"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(386, 218); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(17, 13); this.label5.TabIndex = 5; this.label5.Text = "S:"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(386, 244); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(16, 13); this.label6.TabIndex = 5; this.label6.Text = "L:"; // // numHue // this.numHue.Location = new System.Drawing.Point(408, 190); this.numHue.Maximum = new decimal(new int[] { 359, 0, 0, 0}); this.numHue.Name = "numHue"; this.numHue.Size = new System.Drawing.Size(48, 20); this.numHue.TabIndex = 6; this.numHue.Value = new decimal(new int[] { 359, 0, 0, 0}); this.numHue.ValueChanged += new System.EventHandler(this.numHue_ValueChanged); // // numSat // this.numSat.DecimalPlaces = 1; this.numSat.Location = new System.Drawing.Point(408, 216); this.numSat.Name = "numSat"; this.numSat.Size = new System.Drawing.Size(48, 20); this.numSat.TabIndex = 6; this.numSat.Value = new decimal(new int[] { 100, 0, 0, 0}); this.numSat.ValueChanged += new System.EventHandler(this.numSat_ValueChanged); // // numLum // this.numLum.DecimalPlaces = 1; this.numLum.Location = new System.Drawing.Point(408, 242); this.numLum.Name = "numLum"; this.numLum.Size = new System.Drawing.Size(48, 20); this.numLum.TabIndex = 6; this.numLum.Value = new decimal(new int[] { 100, 0, 0, 0}); this.numLum.ValueChanged += new System.EventHandler(this.numLum_ValueChanged); // // luminanceView // this.luminanceView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.luminanceView.Location = new System.Drawing.Point(1, 1); this.luminanceView.Name = "luminanceView"; this.luminanceView.Size = new System.Drawing.Size(20, 256); this.luminanceView.TabIndex = 1; this.luminanceView.Value = 0F; // // saturationView // this.saturationView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.saturationView.Location = new System.Drawing.Point(1, 1); this.saturationView.Name = "saturationView"; this.saturationView.Size = new System.Drawing.Size(20, 256); this.saturationView.TabIndex = 1; this.saturationView.Value = 0F; // // lsView // this.lsView.Hue = 360F; this.lsView.Location = new System.Drawing.Point(1, 1); this.lsView.Luminance = 16.13725F; this.lsView.Name = "lsView"; this.lsView.Saturation = 1.019608F; this.lsView.Size = new System.Drawing.Size(256, 256); this.lsView.TabIndex = 0; // // hueView // this.hueView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.hueView.Location = new System.Drawing.Point(1, 1); this.hueView.Name = "hueView"; this.hueView.Size = new System.Drawing.Size(20, 256); this.hueView.TabIndex = 1; this.hueView.Value = 0F; // // ColorChooseControl // this.Controls.Add(this.panel4); this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.panelColors); this.Controls.Add(this.numLum); this.Controls.Add(this.numSat); this.Controls.Add(this.numB); this.Controls.Add(this.numHue); this.Controls.Add(this.numG); this.Controls.Add(this.label6); this.Controls.Add(this.numR); this.Controls.Add(this.label5); this.Controls.Add(this.label3); this.Controls.Add(this.label4); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "ColorChooseControl"; this.Size = new System.Drawing.Size(491, 300); ((System.ComponentModel.ISupportInitialize)(this.numR)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numG)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numB)).EndInit(); this.panelColors.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); this.panel3.ResumeLayout(false); this.panel4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numHue)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSat)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numLum)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public static void LoadMyMenu() { if (!SandboxConfig.IsBuddy) { Chat.Print("Sorry you are not buddy :("); return; } MyMainMenu = MainMenu.AddMenu(Name, Name + "id"); MyMainMenu.AddGroupLabel("Hu3"); MyMainMenu.AddLabel("Hu3Hu3"); ComboMenu = MyMainMenu.AddSubMenu("Combo", "comoboid" + Name); FarmMenu = MyMainMenu.AddSubMenu("Farm", "farmid" + Name); MiscMenu = MyMainMenu.AddSubMenu("Misc", "miscid" + Name); PredictionMenu = MyMainMenu.AddSubMenu("Prediction Rates", "prediction" + Name); DrawingsMenu = MyMainMenu.AddSubMenu("Drawings", "drawid" + Name); var mana = HasMana; #region Combo Menu ComboMenu.AddGroupLabel("Combo"); ComboMenu.CreateCheckbox(Q, "combo"); ComboMenu.CreateCheckbox(W, "combo"); ComboMenu.CreateCheckbox(E, "combo"); ComboMenu.CreateCheckbox(R, "combo"); ComboMenu.AddGroupLabel("Harass"); if (mana) { ComboMenu.CreateSlider("harass", "Mana must be higher than ({0}%) to cast any harass spell", 30); } ComboMenu.CreateCheckbox(Q, "harass"); ComboMenu.CreateCheckbox(W, "harass"); ComboMenu.CreateCheckbox(E, "harass"); ComboMenu.CreateCheckbox(R, "harass"); #endregion Combo Menu #region Farm Menu FarmMenu.AddGroupLabel("Last Hit"); FarmMenu.CreateCheckbox(Q, "lasthit"); FarmMenu.CreateCheckbox(E, "lasthit"); FarmMenu.CreateSlider("elasthit", "Minimum minions required to hit to cast the spell E", 2, 1, 6); if (mana) { FarmMenu.CreateSlider("lasthit", "Mana must be higher than ({0}%) to cast any last hit spell", 50); } FarmMenu.AddGroupLabel("Lane Clear"); FarmMenu.CreateCheckbox(Q, "laneclear"); FarmMenu.CreateCheckbox(E, "laneclear"); FarmMenu.CreateSlider("elaneclear", "Minimum minions required to hit to cast the spell E", 4, 1, 6); if (mana) { FarmMenu.CreateSlider("laneclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 60); } FarmMenu.AddGroupLabel("Jungle Clear"); FarmMenu.CreateCheckbox(Q, "jungleclear"); FarmMenu.CreateCheckbox(W, "jungleclear"); FarmMenu.CreateCheckbox(E, "jungleclear"); if (mana) { FarmMenu.CreateSlider("jungleclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 25); } #endregion Farm Menu #region Misc Menu MiscMenu.AddGroupLabel("Killsteal"); MiscMenu.CreateCheckbox(Q, "killsteal"); MiscMenu.CreateCheckbox(E, "killsteal"); MiscMenu.CreateCheckbox(R, "killsteal"); if (mana) { MiscMenu.CreateSlider("killsteal", "Mana must be higher than ({0}%) to cast any killsteal spell", 30); } MiscMenu.AddGroupLabel("W Defender"); MiscMenu.CreateCheckbox("wdefendme", "Use W if enemy is auto attacking the player"); MiscMenu.CreateSlider("wdefendlife", "Player health must be lower than ({0}%) to cast W to defend the player", 60); MiscMenu.CreateSlider("defend", "Mana must be higher than ({0}%) to cast W to defend the player", 35); MiscMenu.AddGroupLabel("Anti-Gapcloser"); MiscMenu.CreateCheckbox(Q, "antigapcloser"); MiscMenu.CreateCheckbox(W, "antigapcloser"); if (mana) { MiscMenu.CreateSlider("antigapcloser", "Mana must be higher than ({0}%) to cast any antigapcloser spell", 45); } MiscMenu.AddGroupLabel("Interrupter"); MiscMenu.CreateCheckbox(Q, "interrupter"); MiscMenu.CreateSlider("interrupter", "Mana must be higher than ({0}%) to cast any antigapcloser spell", 15); MiscMenu.AddGroupLabel("Flee"); MiscMenu.CreateCheckbox(Q, "flee"); MiscMenu.CreateSlider("flee", "Mana must be higher than ({0}%) to cast any flee spell", 5); #endregion Misc Menu #region PredictionMenu QPredSlider = new PredictionSlider(PredictionMenu, "predictionq", Q); EPredSlider = new PredictionSlider(PredictionMenu, "predictione", E); RPredSlider = new PredictionSlider(PredictionMenu, "predictionr", R); #endregion PredictionMenu #region Drawing Menu DrawingsMenu.CreateCheckbox("drawReady", "Draw spells only if they are ready to use"); DrawingsMenu.AddSeparator(); QColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.Q); WColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.W); EColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.E); RColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.R); DamageIndicatorColorSlider = new ColorSlider(DrawingsMenu, "damageindicator"); DrawingsMenu.CreateCheckbox("perDraw", "Draw Percentage"); DrawingsMenu.CreateCheckbox("statDraw", "Draw statistics", false); #endregion Drawing Menu }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.panel1 = new System.Windows.Forms.Panel(); this.m_tooltip = new System.Windows.Forms.ToolTip(this.components); this.m_colorSample = new ColorPicker.LabelRotate(); this.m_infoLabel = new ColorPicker.LabelRotate(); this.m_colorTable = new ColorPicker.ColorTable(); this.m_eyedropColorPicker = new ColorPicker.EyedropColorPicker(); this.m_colorWheel = new ColorPicker.ColorWheelCtrl(); this.m_opacitySlider = new ColorPicker.ColorSlider(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Controls.Add(this.m_colorWheel); this.panel1.Controls.Add(this.m_opacitySlider); this.panel1.Location = new System.Drawing.Point(257, 4); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(254, 242); this.panel1.TabIndex = 9; // // m_colorSample // this.m_colorSample.Location = new System.Drawing.Point(1, 150); this.m_colorSample.Name = "m_colorSample"; this.m_colorSample.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_colorSample.Size = new System.Drawing.Size(186, 60); this.m_colorSample.TabIndex = 1; this.m_colorSample.TabStop = false; this.m_colorSample.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_colorSample.TextAngle = 0F; // // m_infoLabel // this.m_infoLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_infoLabel.Location = new System.Drawing.Point(1, 217); this.m_infoLabel.Name = "m_infoLabel"; this.m_infoLabel.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_infoLabel.Size = new System.Drawing.Size(252, 28); this.m_infoLabel.TabIndex = 3; this.m_infoLabel.TabStop = false; this.m_infoLabel.Text = "This is some sample text"; this.m_infoLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.m_infoLabel.TextAngle = 0F; // // m_colorTable // this.m_colorTable.Colors = new System.Drawing.Color[] { System.Drawing.Color.Black, System.Drawing.Color.DarkGreen, System.Drawing.Color.DarkSlateGray, System.Drawing.Color.Navy, System.Drawing.Color.Green, System.Drawing.Color.Teal, System.Drawing.Color.Maroon, System.Drawing.Color.Olive, System.Drawing.Color.Purple, System.Drawing.Color.Indigo, System.Drawing.Color.MidnightBlue, System.Drawing.Color.DarkRed, System.Drawing.Color.DarkMagenta, System.Drawing.Color.DarkCyan, System.Drawing.Color.DarkBlue, System.Drawing.Color.DarkOliveGreen, System.Drawing.Color.SaddleBrown, System.Drawing.Color.ForestGreen, System.Drawing.Color.OliveDrab, System.Drawing.Color.SeaGreen, System.Drawing.Color.DarkGoldenrod, System.Drawing.Color.DarkSlateBlue, System.Drawing.Color.MediumBlue, System.Drawing.Color.Sienna, System.Drawing.Color.Brown, System.Drawing.Color.DarkTurquoise, System.Drawing.Color.LightSeaGreen, System.Drawing.Color.DimGray, System.Drawing.Color.DarkViolet, System.Drawing.Color.Firebrick, System.Drawing.Color.MediumVioletRed, System.Drawing.Color.MediumSeaGreen, System.Drawing.Color.Crimson, System.Drawing.Color.Chocolate, System.Drawing.Color.SteelBlue, System.Drawing.Color.MediumSpringGreen, System.Drawing.Color.Goldenrod, System.Drawing.Color.LawnGreen, System.Drawing.Color.DarkOrchid, System.Drawing.Color.OrangeRed, System.Drawing.Color.Gold, System.Drawing.Color.Magenta, System.Drawing.Color.LimeGreen, System.Drawing.Color.Red, System.Drawing.Color.Yellow, System.Drawing.Color.Lime, System.Drawing.Color.Orange, System.Drawing.Color.Fuchsia, System.Drawing.Color.YellowGreen, System.Drawing.Color.DeepSkyBlue, System.Drawing.Color.Aqua, System.Drawing.Color.SpringGreen, System.Drawing.Color.Blue, System.Drawing.Color.DarkOrange, System.Drawing.Color.CadetBlue, System.Drawing.Color.Chartreuse, System.Drawing.Color.Cyan, System.Drawing.Color.Gray, System.Drawing.Color.SlateGray, System.Drawing.Color.Peru, System.Drawing.Color.BlueViolet, System.Drawing.Color.LightSlateGray, System.Drawing.Color.DeepPink, System.Drawing.Color.MediumTurquoise, System.Drawing.Color.DodgerBlue, System.Drawing.Color.Turquoise, System.Drawing.Color.RoyalBlue, System.Drawing.Color.SlateBlue, System.Drawing.Color.MediumOrchid, System.Drawing.Color.DarkKhaki, System.Drawing.Color.IndianRed, System.Drawing.Color.GreenYellow, System.Drawing.Color.MediumAquamarine, System.Drawing.Color.Tomato, System.Drawing.Color.DarkSeaGreen, System.Drawing.Color.Orchid, System.Drawing.Color.MediumPurple, System.Drawing.Color.RosyBrown, System.Drawing.Color.PaleVioletRed, System.Drawing.Color.Coral, System.Drawing.Color.CornflowerBlue, System.Drawing.Color.DarkGray, System.Drawing.Color.SandyBrown, System.Drawing.Color.MediumSlateBlue, System.Drawing.Color.Tan, System.Drawing.Color.DarkSalmon, System.Drawing.Color.BurlyWood, System.Drawing.Color.HotPink, System.Drawing.Color.Salmon, System.Drawing.Color.LightCoral, System.Drawing.Color.Violet, System.Drawing.Color.SkyBlue, System.Drawing.Color.LightSalmon, System.Drawing.Color.Khaki, System.Drawing.Color.Plum, System.Drawing.Color.LightGreen, System.Drawing.Color.Aquamarine, System.Drawing.Color.Silver, System.Drawing.Color.LightSkyBlue, System.Drawing.Color.LightSteelBlue, System.Drawing.Color.LightBlue, System.Drawing.Color.PaleGreen, System.Drawing.Color.PowderBlue, System.Drawing.Color.Thistle, System.Drawing.Color.PaleGoldenrod, System.Drawing.Color.PaleTurquoise, System.Drawing.Color.LightGray, System.Drawing.Color.Wheat, System.Drawing.Color.NavajoWhite, System.Drawing.Color.Moccasin, System.Drawing.Color.LightPink, System.Drawing.Color.PeachPuff, System.Drawing.Color.Gainsboro, System.Drawing.Color.Pink, System.Drawing.Color.Bisque, System.Drawing.Color.LightGoldenrodYellow, System.Drawing.Color.BlanchedAlmond, System.Drawing.Color.LemonChiffon, System.Drawing.Color.AntiqueWhite, System.Drawing.Color.Beige, System.Drawing.Color.PapayaWhip, System.Drawing.Color.Cornsilk, System.Drawing.Color.LightCyan, System.Drawing.Color.LightYellow, System.Drawing.Color.Linen, System.Drawing.Color.MistyRose, System.Drawing.Color.Lavender, System.Drawing.Color.OldLace, System.Drawing.Color.WhiteSmoke, System.Drawing.Color.SeaShell, System.Drawing.Color.AliceBlue, System.Drawing.Color.LavenderBlush, System.Drawing.Color.FloralWhite, System.Drawing.Color.Honeydew, System.Drawing.Color.Ivory, System.Drawing.Color.Azure, System.Drawing.Color.MintCream, System.Drawing.Color.GhostWhite, System.Drawing.Color.Snow, System.Drawing.Color.White}; this.m_colorTable.Cols = 16; this.m_colorTable.FieldSize = new System.Drawing.Size(12, 12); this.m_colorTable.Location = new System.Drawing.Point(1, 7); this.m_colorTable.Name = "m_colorTable"; this.m_colorTable.Padding = new System.Windows.Forms.Padding(8, 8, 0, 0); this.m_colorTable.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_colorTable.SelectedItem = System.Drawing.Color.Black; this.m_colorTable.Size = new System.Drawing.Size(252, 138); this.m_colorTable.TabIndex = 0; this.m_colorTable.Text = "m_colorTable"; this.m_colorTable.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_colorTable.TextAngle = 0F; // // m_eyedropColorPicker // this.m_eyedropColorPicker.BackColor = System.Drawing.SystemColors.Control; this.m_eyedropColorPicker.Location = new System.Drawing.Point(193, 150); this.m_eyedropColorPicker.Name = "m_eyedropColorPicker"; this.m_eyedropColorPicker.SelectedColor = System.Drawing.Color.Empty; this.m_eyedropColorPicker.Size = new System.Drawing.Size(60, 60); this.m_eyedropColorPicker.TabIndex = 2; this.m_eyedropColorPicker.TabStop = false; this.m_tooltip.SetToolTip(this.m_eyedropColorPicker, "Color Selector. Click and Drag to pick a color from the screen"); this.m_eyedropColorPicker.Zoom = 4; // // m_colorWheel // this.m_colorWheel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_colorWheel.BackColor = System.Drawing.Color.Transparent; this.m_colorWheel.Location = new System.Drawing.Point(-1, 0); this.m_colorWheel.Name = "m_colorWheel"; this.m_colorWheel.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(235)))), ((int)(((byte)(205))))); this.m_colorWheel.Size = new System.Drawing.Size(254, 209); this.m_colorWheel.TabIndex = 0; // // m_opacitySlider // this.m_opacitySlider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_opacitySlider.BackColor = System.Drawing.Color.Transparent; this.m_opacitySlider.BarPadding = new System.Windows.Forms.Padding(60, 12, 80, 25); this.m_opacitySlider.Color1 = System.Drawing.Color.White; this.m_opacitySlider.Color2 = System.Drawing.Color.Black; this.m_opacitySlider.Color3 = System.Drawing.Color.Black; this.m_opacitySlider.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_opacitySlider.ForeColor = System.Drawing.Color.Black; this.m_opacitySlider.Location = new System.Drawing.Point(2, 213); this.m_opacitySlider.Name = "m_opacitySlider"; this.m_opacitySlider.NumberOfColors = ColorPicker.ColorSlider.eNumberOfColors.Use2Colors; this.m_opacitySlider.Orientation = System.Windows.Forms.Orientation.Horizontal; this.m_opacitySlider.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); this.m_opacitySlider.Percent = 1F; this.m_opacitySlider.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_opacitySlider.Size = new System.Drawing.Size(248, 28); this.m_opacitySlider.TabIndex = 1; this.m_opacitySlider.Text = "Opacity"; this.m_opacitySlider.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_opacitySlider.TextAngle = 0F; this.m_opacitySlider.ValueOrientation = ColorPicker.ColorSlider.eValueOrientation.MinToMax; // // ColorPickerCtrl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Transparent; this.Controls.Add(this.m_colorSample); this.Controls.Add(this.m_infoLabel); this.Controls.Add(this.m_colorTable); this.Controls.Add(this.m_eyedropColorPicker); this.Controls.Add(this.panel1); this.Name = "ColorPickerCtrl"; this.Padding = new System.Windows.Forms.Padding(3, 3, 0, 0); this.Size = new System.Drawing.Size(507, 250); this.panel1.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this._groupBox1 = new System.Windows.Forms.GroupBox(); this._maxHBox = new System.Windows.Forms.TextBox(); this._label2 = new System.Windows.Forms.Label(); this._minHBox = new System.Windows.Forms.TextBox(); this._label1 = new System.Windows.Forms.Label(); this._huePicker = new HuePicker(); this._groupBox2 = new System.Windows.Forms.GroupBox(); this._saturationSlider = new ColorSlider(); this._maxSBox = new System.Windows.Forms.TextBox(); this._minSBox = new System.Windows.Forms.TextBox(); this._label4 = new System.Windows.Forms.Label(); this._label3 = new System.Windows.Forms.Label(); this._groupBox3 = new System.Windows.Forms.GroupBox(); this._luminanceSlider = new ColorSlider(); this._maxLBox = new System.Windows.Forms.TextBox(); this._minLBox = new System.Windows.Forms.TextBox(); this._label5 = new System.Windows.Forms.Label(); this._label6 = new System.Windows.Forms.Label(); this._groupBox5 = new System.Windows.Forms.GroupBox(); this._filterPreview = new PictureBox(); this._groupBox4 = new System.Windows.Forms.GroupBox(); this._updateLCheck = new System.Windows.Forms.CheckBox(); this._fillLBox = new System.Windows.Forms.TextBox(); this._label9 = new System.Windows.Forms.Label(); this._updateSCheck = new System.Windows.Forms.CheckBox(); this._fillSBox = new System.Windows.Forms.TextBox(); this._label8 = new System.Windows.Forms.Label(); this._updateHCheck = new System.Windows.Forms.CheckBox(); this._fillHBox = new System.Windows.Forms.TextBox(); this._label7 = new System.Windows.Forms.Label(); this._fillTypeCombo = new System.Windows.Forms.ComboBox(); this._label10 = new System.Windows.Forms.Label(); this._cancelButton = new System.Windows.Forms.Button(); this._okButton = new System.Windows.Forms.Button(); this.llblHelp = new System.Windows.Forms.LinkLabel(); this._groupBox1.SuspendLayout(); this._groupBox2.SuspendLayout(); this._groupBox3.SuspendLayout(); this._groupBox5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this._filterPreview)).BeginInit(); this._groupBox4.SuspendLayout(); this.SuspendLayout(); // // _groupBox1 // this._groupBox1.Controls.Add(this._maxHBox); this._groupBox1.Controls.Add(this._label2); this._groupBox1.Controls.Add(this._minHBox); this._groupBox1.Controls.Add(this._label1); this._groupBox1.Controls.Add(this._huePicker); this._groupBox1.Location = new System.Drawing.Point(10, 10); this._groupBox1.Name = "_groupBox1"; this._groupBox1.Size = new System.Drawing.Size(280, 230); this._groupBox1.TabIndex = 1; this._groupBox1.TabStop = false; this._groupBox1.Text = "Hue"; // // _maxHBox // this._maxHBox.Location = new System.Drawing.Point(218, 20); this._maxHBox.Name = "_maxHBox"; this._maxHBox.Size = new System.Drawing.Size(50, 20); this._maxHBox.TabIndex = 4; this._maxHBox.TextChanged += new System.EventHandler(this.maxHBox_TextChanged); // // _label2 // this._label2.Location = new System.Drawing.Point(186, 23); this._label2.Name = "_label2"; this._label2.Size = new System.Drawing.Size(39, 15); this._label2.TabIndex = 3; this._label2.Text = "Max:"; // // _minHBox // this._minHBox.Location = new System.Drawing.Point(40, 20); this._minHBox.Name = "_minHBox"; this._minHBox.Size = new System.Drawing.Size(50, 20); this._minHBox.TabIndex = 2; this._minHBox.TextChanged += new System.EventHandler(this.minHBox_TextChanged); // // _label1 // this._label1.Location = new System.Drawing.Point(10, 23); this._label1.Name = "_label1"; this._label1.Size = new System.Drawing.Size(31, 17); this._label1.TabIndex = 1; this._label1.Text = "Min:"; // // _huePicker // this._huePicker.Location = new System.Drawing.Point(53, 50); this._huePicker.Name = "_huePicker"; this._huePicker.Size = new System.Drawing.Size(170, 170); this._huePicker.TabIndex = 0; this._huePicker.Type = HuePicker.HuePickerType.Range; this._huePicker.ValuesChanged += new System.EventHandler(this.huePicker_ValuesChanged); this._huePicker.Click += new System.EventHandler(this._huePicker_Click); // // _groupBox2 // this._groupBox2.Controls.Add(this._saturationSlider); this._groupBox2.Controls.Add(this._maxSBox); this._groupBox2.Controls.Add(this._minSBox); this._groupBox2.Controls.Add(this._label4); this._groupBox2.Controls.Add(this._label3); this._groupBox2.Location = new System.Drawing.Point(10, 245); this._groupBox2.Name = "_groupBox2"; this._groupBox2.Size = new System.Drawing.Size(280, 75); this._groupBox2.TabIndex = 2; this._groupBox2.TabStop = false; this._groupBox2.Text = "Saturation"; // // _saturationSlider // this._saturationSlider.Location = new System.Drawing.Point(8, 45); this._saturationSlider.Name = "_saturationSlider"; this._saturationSlider.Size = new System.Drawing.Size(262, 23); this._saturationSlider.TabIndex = 4; this._saturationSlider.Type = ColorSlider.ColorSliderType.InnerGradient; this._saturationSlider.ValuesChanged += new System.EventHandler(this.saturationSlider_ValuesChanged); // // _maxSBox // this._maxSBox.Location = new System.Drawing.Point(218, 20); this._maxSBox.Name = "_maxSBox"; this._maxSBox.Size = new System.Drawing.Size(50, 20); this._maxSBox.TabIndex = 3; this._maxSBox.TextChanged += new System.EventHandler(this.maxSBox_TextChanged); // // _minSBox // this._minSBox.Location = new System.Drawing.Point(40, 20); this._minSBox.Name = "_minSBox"; this._minSBox.Size = new System.Drawing.Size(50, 20); this._minSBox.TabIndex = 2; this._minSBox.TextChanged += new System.EventHandler(this.minSBox_TextChanged); // // _label4 // this._label4.Location = new System.Drawing.Point(186, 23); this._label4.Name = "_label4"; this._label4.Size = new System.Drawing.Size(30, 17); this._label4.TabIndex = 1; this._label4.Text = "Max:"; // // _label3 // this._label3.Location = new System.Drawing.Point(10, 23); this._label3.Name = "_label3"; this._label3.Size = new System.Drawing.Size(30, 16); this._label3.TabIndex = 0; this._label3.Text = "Min:"; // // _groupBox3 // this._groupBox3.Controls.Add(this._luminanceSlider); this._groupBox3.Controls.Add(this._maxLBox); this._groupBox3.Controls.Add(this._minLBox); this._groupBox3.Controls.Add(this._label5); this._groupBox3.Controls.Add(this._label6); this._groupBox3.Location = new System.Drawing.Point(10, 325); this._groupBox3.Name = "_groupBox3"; this._groupBox3.Size = new System.Drawing.Size(280, 75); this._groupBox3.TabIndex = 3; this._groupBox3.TabStop = false; this._groupBox3.Text = "Luminance"; // // _luminanceSlider // this._luminanceSlider.Location = new System.Drawing.Point(8, 45); this._luminanceSlider.Name = "_luminanceSlider"; this._luminanceSlider.Size = new System.Drawing.Size(262, 23); this._luminanceSlider.TabIndex = 9; this._luminanceSlider.Type = ColorSlider.ColorSliderType.InnerGradient; this._luminanceSlider.ValuesChanged += new System.EventHandler(this.luminanceSlider_ValuesChanged); // // _maxLBox // this._maxLBox.Location = new System.Drawing.Point(218, 20); this._maxLBox.Name = "_maxLBox"; this._maxLBox.Size = new System.Drawing.Size(50, 20); this._maxLBox.TabIndex = 8; this._maxLBox.TextChanged += new System.EventHandler(this.maxLBox_TextChanged); // // _minLBox // this._minLBox.Location = new System.Drawing.Point(40, 20); this._minLBox.Name = "_minLBox"; this._minLBox.Size = new System.Drawing.Size(50, 20); this._minLBox.TabIndex = 7; this._minLBox.TextChanged += new System.EventHandler(this.minLBox_TextChanged); // // _label5 // this._label5.Location = new System.Drawing.Point(186, 23); this._label5.Name = "_label5"; this._label5.Size = new System.Drawing.Size(30, 17); this._label5.TabIndex = 6; this._label5.Text = "Max:"; // // _label6 // this._label6.Location = new System.Drawing.Point(10, 23); this._label6.Name = "_label6"; this._label6.Size = new System.Drawing.Size(30, 16); this._label6.TabIndex = 5; this._label6.Text = "Min:"; // // _groupBox5 // this._groupBox5.Controls.Add(this._filterPreview); this._groupBox5.Location = new System.Drawing.Point(300, 10); this._groupBox5.Name = "_groupBox5"; this._groupBox5.Size = new System.Drawing.Size(322, 230); this._groupBox5.TabIndex = 4; this._groupBox5.TabStop = false; this._groupBox5.Text = "Detector View"; // // _filterPreview // this._filterPreview.Image = null; this._filterPreview.Location = new System.Drawing.Point(10, 15); this._filterPreview.Name = "_filterPreview"; this._filterPreview.Size = new System.Drawing.Size(306, 205); this._filterPreview.TabIndex = 0; this._filterPreview.TabStop = false; this._filterPreview.Click += new System.EventHandler(this._filterPreview_Click); // // _groupBox4 // this._groupBox4.Controls.Add(this._updateLCheck); this._groupBox4.Controls.Add(this._fillLBox); this._groupBox4.Controls.Add(this._label9); this._groupBox4.Controls.Add(this._updateSCheck); this._groupBox4.Controls.Add(this._fillSBox); this._groupBox4.Controls.Add(this._label8); this._groupBox4.Controls.Add(this._updateHCheck); this._groupBox4.Controls.Add(this._fillHBox); this._groupBox4.Controls.Add(this._label7); this._groupBox4.Location = new System.Drawing.Point(300, 245); this._groupBox4.Name = "_groupBox4"; this._groupBox4.Size = new System.Drawing.Size(170, 100); this._groupBox4.TabIndex = 5; this._groupBox4.TabStop = false; this._groupBox4.Text = "Fill Color"; // // _updateLCheck // this._updateLCheck.Checked = true; this._updateLCheck.CheckState = System.Windows.Forms.CheckState.Checked; this._updateLCheck.Location = new System.Drawing.Point(125, 70); this._updateLCheck.Name = "_updateLCheck"; this._updateLCheck.Size = new System.Drawing.Size(14, 24); this._updateLCheck.TabIndex = 8; this._updateLCheck.CheckedChanged += new System.EventHandler(this.updateLCheck_CheckedChanged); // // _fillLBox // this._fillLBox.Location = new System.Drawing.Point(40, 70); this._fillLBox.Name = "_fillLBox"; this._fillLBox.Size = new System.Drawing.Size(50, 20); this._fillLBox.TabIndex = 7; this._fillLBox.TextChanged += new System.EventHandler(this.fillLBox_TextChanged); // // _label9 // this._label9.Location = new System.Drawing.Point(10, 73); this._label9.Name = "_label9"; this._label9.Size = new System.Drawing.Size(20, 16); this._label9.TabIndex = 6; this._label9.Text = "L:"; // // _updateSCheck // this._updateSCheck.Checked = true; this._updateSCheck.CheckState = System.Windows.Forms.CheckState.Checked; this._updateSCheck.Location = new System.Drawing.Point(125, 45); this._updateSCheck.Name = "_updateSCheck"; this._updateSCheck.Size = new System.Drawing.Size(14, 24); this._updateSCheck.TabIndex = 5; this._updateSCheck.CheckedChanged += new System.EventHandler(this.updateSCheck_CheckedChanged); // // _fillSBox // this._fillSBox.Location = new System.Drawing.Point(40, 45); this._fillSBox.Name = "_fillSBox"; this._fillSBox.Size = new System.Drawing.Size(50, 20); this._fillSBox.TabIndex = 4; this._fillSBox.TextChanged += new System.EventHandler(this.fillSBox_TextChanged); // // _label8 // this._label8.Location = new System.Drawing.Point(10, 48); this._label8.Name = "_label8"; this._label8.Size = new System.Drawing.Size(20, 16); this._label8.TabIndex = 3; this._label8.Text = "S:"; // // _updateHCheck // this._updateHCheck.Checked = true; this._updateHCheck.CheckState = System.Windows.Forms.CheckState.Checked; this._updateHCheck.Location = new System.Drawing.Point(125, 20); this._updateHCheck.Name = "_updateHCheck"; this._updateHCheck.Size = new System.Drawing.Size(14, 24); this._updateHCheck.TabIndex = 2; this._updateHCheck.CheckedChanged += new System.EventHandler(this.updateHCheck_CheckedChanged); // // _fillHBox // this._fillHBox.Location = new System.Drawing.Point(40, 20); this._fillHBox.Name = "_fillHBox"; this._fillHBox.Size = new System.Drawing.Size(50, 20); this._fillHBox.TabIndex = 1; this._fillHBox.TextChanged += new System.EventHandler(this.fillHBox_TextChanged); // // _label7 // this._label7.Location = new System.Drawing.Point(10, 23); this._label7.Name = "_label7"; this._label7.Size = new System.Drawing.Size(20, 16); this._label7.TabIndex = 0; this._label7.Text = "H:"; // // _fillTypeCombo // this._fillTypeCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this._fillTypeCombo.Items.AddRange(new object[] { "Outside", "Inside" }); this._fillTypeCombo.Location = new System.Drawing.Point(300, 379); this._fillTypeCombo.Name = "_fillTypeCombo"; this._fillTypeCombo.Size = new System.Drawing.Size(170, 21); this._fillTypeCombo.TabIndex = 10; this._fillTypeCombo.SelectedIndexChanged += new System.EventHandler(this.fillTypeCombo_SelectedIndexChanged); // // _label10 // this._label10.AutoSize = true; this._label10.Location = new System.Drawing.Point(297, 352); this._label10.Name = "_label10"; this._label10.Size = new System.Drawing.Size(45, 13); this._label10.TabIndex = 13; this._label10.Text = "Fill type:"; // // _cancelButton // this._cancelButton.AutoSize = true; this._cancelButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this._cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this._cancelButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this._cancelButton.Location = new System.Drawing.Point(570, 407); this._cancelButton.Name = "_cancelButton"; this._cancelButton.Size = new System.Drawing.Size(52, 25); this._cancelButton.TabIndex = 12; this._cancelButton.Text = "Cancel"; // // _okButton // this._okButton.AutoSize = true; this._okButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this._okButton.DialogResult = System.Windows.Forms.DialogResult.OK; this._okButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this._okButton.Location = new System.Drawing.Point(531, 407); this._okButton.Name = "_okButton"; this._okButton.Size = new System.Drawing.Size(33, 25); this._okButton.TabIndex = 11; this._okButton.Text = "Ok"; this._okButton.Click += new System.EventHandler(this._okButton_Click); // // llblHelp // this.llblHelp.AutoSize = true; this.llblHelp.Location = new System.Drawing.Point(476, 413); this.llblHelp.Name = "llblHelp"; this.llblHelp.Size = new System.Drawing.Size(29, 13); this.llblHelp.TabIndex = 64; this.llblHelp.TabStop = true; this.llblHelp.Text = "Help"; this.llblHelp.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.llblHelp_LinkClicked); // // HSLFilteringForm // this.AcceptButton = this._okButton; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this._cancelButton; this.ClientSize = new System.Drawing.Size(634, 439); this.Controls.Add(this.llblHelp); this.Controls.Add(this._fillTypeCombo); this.Controls.Add(this._label10); this.Controls.Add(this._cancelButton); this.Controls.Add(this._okButton); this.Controls.Add(this._groupBox4); this.Controls.Add(this._groupBox5); this.Controls.Add(this._groupBox3); this.Controls.Add(this._groupBox2); this.Controls.Add(this._groupBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "HSLFilteringForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "HSL Filtering"; this.Load += new System.EventHandler(this.HSLFilteringForm_Load); this._groupBox1.ResumeLayout(false); this._groupBox1.PerformLayout(); this._groupBox2.ResumeLayout(false); this._groupBox2.PerformLayout(); this._groupBox3.ResumeLayout(false); this._groupBox3.PerformLayout(); this._groupBox5.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this._filterPreview)).EndInit(); this._groupBox4.ResumeLayout(false); this._groupBox4.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); }
public HueSliderRenderer(ColorSlider slider) : base(slider) { }
private void SetColorSliderBackground(ColorSlider colorSlider, Color leftColor, Color rightColor) { colorSlider.LeftColor = leftColor; colorSlider.RightColor = rightColor; }
public void SetRandomColor() { ColorSlider.RandomizeColor(GetComponentInParent <PanelInit>().GetComponentsInChildren <Slider>()); }
internal static void Load() { ChampMenu = MainMenu.AddMenu(Loader.Name, Loader.Name + Me.ChampionName); ComboMenu = ChampMenu.AddSubMenu("Combo Menu", "comboMenu"); ComboMenu.AddGroupLabel("Combo"); ComboMenu.CreateCheckbox(Q); ComboMenu.CreateCheckbox(E, "combo"); ComboMenu.CreateCheckbox(R, "combo"); ComboMenu.AddGroupLabel("Harass"); ComboMenu.CreateCheckbox(Q, "harass"); ComboMenu.CreateCheckbox(E, "harass"); //ComboMenu.CreateSlider("harassMana", "Mana% must be below [{0}%] to use harass spells", 40); FarmMenu = ChampMenu.AddSubMenu("Farm Menu", "farmMenu"); FarmMenu.AddGroupLabel("LaneClear"); FarmMenu.CreateCheckbox(Q, "lane"); FarmMenu.CreateCheckbox(E, "lane"); //FarmMenu.CreateSlider("laneMana", "Mana% must be below [{0}%] to use lane clear spells", 60); FarmMenu.AddGroupLabel("LastHit"); FarmMenu.CreateCheckbox(Q, "last"); FarmMenu.CreateCheckbox(E, "last"); //FarmMenu.CreateSlider("lastMana", "Mana% must be below [{0}%] to use last hit spells", 40); FarmMenu.AddGroupLabel("JungleClear"); FarmMenu.CreateCheckbox(Q, "jungle"); FarmMenu.CreateCheckbox(E, "jungle"); //FarmMenu.CreateSlider("jungleMana", "Mana% must be below [{0}%] to use jungle spells", 20); MiscMenu = ChampMenu.AddSubMenu("Misc Menu", "miscMenu"); DrawMenu = ChampMenu.AddSubMenu("Drawings Menu", "drawMenu"); #region DrawMenu DrawReady = DrawMenu.CreateCheckbox("drawReady", "Draw spells only if they are ready"); DrawMenu.AddSeparator(10); if (Q != null) { QColor = new ColorSlider(SpellSlot.Q); DrawMenu.Add("qColorBox", QColor.BaseCheckBox); DrawMenu.Add("qColorSlider", QColor.BaseSlider); } if (W != null) { WColor = new ColorSlider(SpellSlot.W); DrawMenu.Add("wColorBox", WColor.BaseCheckBox); DrawMenu.Add("wColorSlider", WColor.BaseSlider); } if (E != null) { EColor = new ColorSlider(SpellSlot.E); DrawMenu.Add("eColorBox", EColor.BaseCheckBox); DrawMenu.Add("eColorSlider", EColor.BaseSlider); } if (R != null) { RColor = new ColorSlider(SpellSlot.R); DrawMenu.Add("rColorBox", RColor.BaseCheckBox); DrawMenu.Add("rColorSlider", RColor.BaseSlider); } DrawMenu.AddGroupLabel("Damage Indicator"); DamageIndicatorColor = new ColorSlider("Damage Indicator"); DrawMenu.Add("damageColorBox", DamageIndicatorColor.BaseCheckBox); DrawMenu.CreateCheckbox("statDraw", "Draw statistics"); DrawMenu.CreateCheckbox("perDraw", "Draw percentage"); DrawMenu.Add("damageColorSlider", DamageIndicatorColor.BaseSlider); #endregion DrawMenu }
public static void LoadMyMenu() { if (!SandboxConfig.IsBuddy) { Chat.Print("Sorry you are not buddy :(", Color.Purple); return; } MyMainMenu = MainMenu.AddMenu(Loader.Name, Loader.Name + "id"); MyMainMenu.AddGroupLabel("Hu3"); MyMainMenu.AddLabel("Hu3Hu3"); ComboMenu = MyMainMenu.AddSubMenu("Combo", "comoboid" + Loader.Name); FarmMenu = MyMainMenu.AddSubMenu("Farm", "farmid" + Loader.Name); MiscMenu = MyMainMenu.AddSubMenu("Misc", "miscid" + Loader.Name); PredictionMenu = MyMainMenu.AddSubMenu("Prediction Rates", "prediction" + Loader.Name); DrawingsMenu = MyMainMenu.AddSubMenu("Drawings", "drawid" + Loader.Name); var mana = Loader.HasMana; #region Combo Menu ComboMenu.AddGroupLabel("Combo"); ComboMenu.CreateCheckbox(Q, "combo"); ComboMenu.CreateCheckbox(W, "combo"); ComboMenu.CreateCheckbox(E, "combo"); ComboMenu.CreateCheckbox(R, "combo"); ComboMenu.AddGroupLabel("Harass"); if (mana) { ComboMenu.CreateSlider("harass", "Mana must be higher than ({0}%) to cast any harass spell", 30); } ComboMenu.CreateCheckbox(Q, "harass"); ComboMenu.CreateCheckbox(W, "harass"); ComboMenu.CreateCheckbox(E, "harass"); ComboMenu.CreateCheckbox(R, "harass"); #endregion Combo Menu #region Farm Menu FarmMenu.AddGroupLabel("Last Hit"); FarmMenu.CreateCheckbox(Q, "lasthit"); FarmMenu.CreateCheckbox(W, "lasthit"); FarmMenu.CreateCheckbox(E, "lasthit"); FarmMenu.CreateCheckbox(R, "lasthit"); if (mana) { FarmMenu.CreateSlider("lasthit", "Mana must be higher than ({0}%) to cast any last hit spell", 50); } FarmMenu.AddGroupLabel("Lane Clear"); FarmMenu.CreateCheckbox(Q, "laneclear"); FarmMenu.CreateCheckbox(W, "laneclear"); FarmMenu.CreateCheckbox(E, "laneclear"); FarmMenu.CreateCheckbox(R, "laneclear"); if (mana) { FarmMenu.CreateSlider("laneclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 60); } FarmMenu.AddGroupLabel("Jungle Clear"); FarmMenu.CreateCheckbox(Q, "jungleclear"); FarmMenu.CreateCheckbox(W, "jungleclear"); FarmMenu.CreateCheckbox(E, "jungleclear"); FarmMenu.CreateCheckbox(R, "jungleclear"); if (mana) { FarmMenu.CreateSlider("jungleclear", "Mana must be higher than ({0}%) to cast any lane clear spell", 25); } #endregion Farm Menu #region Misc Menu MiscMenu.AddGroupLabel("Killsteal"); MiscMenu.CreateCheckbox(Q, "killsteal"); MiscMenu.CreateCheckbox(W, "killsteal"); MiscMenu.CreateCheckbox(E, "killsteal"); MiscMenu.CreateCheckbox(R, "killsteal"); if (mana) { MiscMenu.CreateSlider("killsteal", "Mana must be higher than ({0}%) to cast any killsteal spell", 10); } MiscMenu.AddGroupLabel("Anti-Gapcloser"); MiscMenu.CreateCheckbox(Q, "antigapcloser"); MiscMenu.CreateCheckbox(W, "antigapcloser"); MiscMenu.CreateCheckbox(E, "antigapcloser"); MiscMenu.CreateCheckbox(R, "antigapcloser"); if (mana) { MiscMenu.CreateSlider("antigapcloser", "Mana must be higher than ({0}%) to cast any antigapcloser spell", 10); } MiscMenu.AddGroupLabel("Flee"); MiscMenu.CreateCheckbox(Q, "flee"); if (mana) { MiscMenu.CreateSlider("flee", "Mana must be higher than ({0}%) to cast any flee spell", 10); } #endregion Misc Menu #region PredictionMenu QPredSlider = new PredictionSlider(PredictionMenu, "testeq", Q); WPredSlider = new PredictionSlider(PredictionMenu, "testew", W); EPredSlider = new PredictionSlider(PredictionMenu, "testee", E); RPredSlider = new PredictionSlider(PredictionMenu, "tester", R); #endregion PredictionMenu #region Drawing Menu DrawingsMenu.CreateCheckbox("drawReady", "Draw spells only if they are ready to use"); DrawingsMenu.AddSeparator(); QColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.Q); WColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.W); EColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.E); RColorSlider = new ColorSlider(DrawingsMenu, SpellSlot.R); DamageIndicatorColorSlider = new ColorSlider(DrawingsMenu, "damageindicator"); DrawingsMenu.CreateCheckbox("perDraw", "Draw Percentage"); DrawingsMenu.CreateCheckbox("statDraw", "Draw statistics", false); #endregion Drawing Menu }
public void SetRimColorBySlider(ColorSlider colorSlider) { Custamization.SetRimColor(Instance.activePlayerVehicle, colorSlider.color); }
private void InitializeComponent() { this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.numR = new System.Windows.Forms.NumericUpDown(); this.numG = new System.Windows.Forms.NumericUpDown(); this.numB = new System.Windows.Forms.NumericUpDown(); this.panelColor1 = new System.Windows.Forms.Panel(); this.panelColor2 = new System.Windows.Forms.Panel(); this.panelColors = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel(); this.panel4 = new System.Windows.Forms.Panel(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.numHue = new System.Windows.Forms.NumericUpDown(); this.numSat = new System.Windows.Forms.NumericUpDown(); this.numLum = new System.Windows.Forms.NumericUpDown(); this.luminanceView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); this.saturationView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); this.lsView = new Fireball.Windows.Forms.ColorChooseControl.ColorPicker(); this.hueView = new Fireball.Windows.Forms.ColorChooseControl.ColorSlider(); ((System.ComponentModel.ISupportInitialize)(this.numR)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numG)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numB)).BeginInit(); this.panelColors.SuspendLayout(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.panel3.SuspendLayout(); this.panel4.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numHue)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numSat)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.numLum)).BeginInit(); this.SuspendLayout(); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(386, 100); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(18, 13); this.label1.TabIndex = 5; this.label1.Text = "R:"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(386, 126); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(18, 13); this.label2.TabIndex = 5; this.label2.Text = "G:"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(386, 152); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(17, 13); this.label3.TabIndex = 5; this.label3.Text = "B:"; // // numR // this.numR.Location = new System.Drawing.Point(408, 98); this.numR.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); this.numR.Name = "numR"; this.numR.Size = new System.Drawing.Size(48, 20); this.numR.TabIndex = 6; this.numR.Value = new decimal(new int[] { 255, 0, 0, 0 }); this.numR.ValueChanged += new System.EventHandler(this.numR_ValueChanged); // // numG // this.numG.Location = new System.Drawing.Point(408, 124); this.numG.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); this.numG.Name = "numG"; this.numG.Size = new System.Drawing.Size(48, 20); this.numG.TabIndex = 6; this.numG.ValueChanged += new System.EventHandler(this.numG_ValueChanged); // // numB // this.numB.Location = new System.Drawing.Point(408, 150); this.numB.Maximum = new decimal(new int[] { 255, 0, 0, 0 }); this.numB.Name = "numB"; this.numB.Size = new System.Drawing.Size(48, 20); this.numB.TabIndex = 6; this.numB.ValueChanged += new System.EventHandler(this.numB_ValueChanged); // // panelColor1 // this.panelColor1.BackColor = System.Drawing.Color.Red; this.panelColor1.Location = new System.Drawing.Point(1, 1); this.panelColor1.Name = "panelColor1"; this.panelColor1.Size = new System.Drawing.Size(68, 34); this.panelColor1.TabIndex = 7; // // panelColor2 // this.panelColor2.BackColor = System.Drawing.Color.Red; this.panelColor2.Location = new System.Drawing.Point(1, 35); this.panelColor2.Name = "panelColor2"; this.panelColor2.Size = new System.Drawing.Size(68, 34); this.panelColor2.TabIndex = 7; // // panelColors // this.panelColors.BackColor = System.Drawing.SystemColors.ControlDark; this.panelColors.Controls.Add(this.panelColor1); this.panelColors.Controls.Add(this.panelColor2); this.panelColors.Location = new System.Drawing.Point(387, 5); this.panelColors.Name = "panelColors"; this.panelColors.Size = new System.Drawing.Size(70, 70); this.panelColors.TabIndex = 8; // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.ControlDark; this.panel1.Controls.Add(this.hueView); this.panel1.Location = new System.Drawing.Point(347, 5); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(22, 258); this.panel1.TabIndex = 9; // // panel2 // this.panel2.BackColor = System.Drawing.SystemColors.ControlDark; this.panel2.Controls.Add(this.lsView); this.panel2.Location = new System.Drawing.Point(3, 5); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(258, 258); this.panel2.TabIndex = 10; // // panel3 // this.panel3.BackColor = System.Drawing.SystemColors.ControlDark; this.panel3.Controls.Add(this.saturationView); this.panel3.Location = new System.Drawing.Point(274, 5); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(22, 258); this.panel3.TabIndex = 11; // // panel4 // this.panel4.BackColor = System.Drawing.SystemColors.ControlDark; this.panel4.Controls.Add(this.luminanceView); this.panel4.Location = new System.Drawing.Point(310, 5); this.panel4.Name = "panel4"; this.panel4.Size = new System.Drawing.Size(22, 258); this.panel4.TabIndex = 12; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(386, 192); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(18, 13); this.label4.TabIndex = 5; this.label4.Text = "H:"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(386, 218); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(17, 13); this.label5.TabIndex = 5; this.label5.Text = "S:"; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(386, 244); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(16, 13); this.label6.TabIndex = 5; this.label6.Text = "L:"; // // numHue // this.numHue.Location = new System.Drawing.Point(408, 190); this.numHue.Maximum = new decimal(new int[] { 359, 0, 0, 0 }); this.numHue.Name = "numHue"; this.numHue.Size = new System.Drawing.Size(48, 20); this.numHue.TabIndex = 6; this.numHue.Value = new decimal(new int[] { 359, 0, 0, 0 }); this.numHue.ValueChanged += new System.EventHandler(this.numHue_ValueChanged); // // numSat // this.numSat.DecimalPlaces = 1; this.numSat.Location = new System.Drawing.Point(408, 216); this.numSat.Name = "numSat"; this.numSat.Size = new System.Drawing.Size(48, 20); this.numSat.TabIndex = 6; this.numSat.Value = new decimal(new int[] { 100, 0, 0, 0 }); this.numSat.ValueChanged += new System.EventHandler(this.numSat_ValueChanged); // // numLum // this.numLum.DecimalPlaces = 1; this.numLum.Location = new System.Drawing.Point(408, 242); this.numLum.Name = "numLum"; this.numLum.Size = new System.Drawing.Size(48, 20); this.numLum.TabIndex = 6; this.numLum.Value = new decimal(new int[] { 100, 0, 0, 0 }); this.numLum.ValueChanged += new System.EventHandler(this.numLum_ValueChanged); // // luminanceView // this.luminanceView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.luminanceView.Location = new System.Drawing.Point(1, 1); this.luminanceView.Name = "luminanceView"; this.luminanceView.Size = new System.Drawing.Size(20, 256); this.luminanceView.TabIndex = 1; this.luminanceView.Value = 0F; // // saturationView // this.saturationView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.saturationView.Location = new System.Drawing.Point(1, 1); this.saturationView.Name = "saturationView"; this.saturationView.Size = new System.Drawing.Size(20, 256); this.saturationView.TabIndex = 1; this.saturationView.Value = 0F; // // lsView // this.lsView.Hue = 360F; this.lsView.Location = new System.Drawing.Point(1, 1); this.lsView.Luminance = 16.13725F; this.lsView.Name = "lsView"; this.lsView.Saturation = 1.019608F; this.lsView.Size = new System.Drawing.Size(256, 256); this.lsView.TabIndex = 0; // // hueView // this.hueView.ColorMode = Fireball.Windows.Forms.ColorChooseControl.ColorSliderMode.Hue; this.hueView.Location = new System.Drawing.Point(1, 1); this.hueView.Name = "hueView"; this.hueView.Size = new System.Drawing.Size(20, 256); this.hueView.TabIndex = 1; this.hueView.Value = 0F; // // ColorChooseControl // this.Controls.Add(this.panel4); this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.Controls.Add(this.panel1); this.Controls.Add(this.panelColors); this.Controls.Add(this.numLum); this.Controls.Add(this.numSat); this.Controls.Add(this.numB); this.Controls.Add(this.numHue); this.Controls.Add(this.numG); this.Controls.Add(this.label6); this.Controls.Add(this.numR); this.Controls.Add(this.label5); this.Controls.Add(this.label3); this.Controls.Add(this.label4); this.Controls.Add(this.label2); this.Controls.Add(this.label1); this.Name = "ColorChooseControl"; this.Size = new System.Drawing.Size(491, 300); ((System.ComponentModel.ISupportInitialize)(this.numR)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numG)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numB)).EndInit(); this.panelColors.ResumeLayout(false); this.panel1.ResumeLayout(false); this.panel2.ResumeLayout(false); this.panel3.ResumeLayout(false); this.panel4.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.numHue)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numSat)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.numLum)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); }
public void SetRimGlossinessByColorPicker(ColorSlider colorSlider) { Custamization.SetRIMPaintGlossiness(instance.activePlayerVehicle, colorSlider.glossiness); }
public static void SetupAssets(KCModHelper _helper) { _helper.Log("-----------HOOKING UP ASSETS------------"); // Setup District UI GameObject District_UI_GameObject = GameObject.Instantiate(AssetsLoader.GetAsset("District") as GameObject); Transform Worker_UI = GameState.inst.playingMode.GameUIParent.transform.Find("WorkerUICanvas").Find("WorkerUI"); District_UI_GameObject.transform.SetParent(Worker_UI, false); // Collect Specific Children In District UI List <String> filter = new List <String>(new String[] { "District(Clone)", "Expand", "CreateSwatch", "ToggleSwatchPicker", "Dropdown", "Options", "Option", "ContentBar", "Picker", "Fill", "InputField", "BoxSlider", "Hue", "Background", "ModelPreview", "ToggleDeleteMode" }); District_UI_Children = Utilities.CollectChildren(District_UI_GameObject.transform, null, filter); GameObject Option_Prefab = District_UI_Children.Find(i => i.name == "Option").gameObject; AssetInfo option_Info = new AssetInfo("Option.Prefab", Option_Prefab.GetType(), Option_Prefab); AssetsLoader.assets.Add(option_Info); _helper.Log(option_Info.ToString()); // Mod Components District district_Component = District_UI_GameObject.AddComponent <District>(); Expand expand_Component = District_UI_Children.Find(i => i.name == "Expand").gameObject.AddComponent <Expand>(); CreateSwatch createSwatch_Component = District_UI_Children.Find(i => i.name == "CreateSwatch").gameObject.AddComponent <CreateSwatch>(); ModelPreview modelPreview_Component = District_UI_Children.Find(i => i.name == "ModelPreview").gameObject.AddComponent <ModelPreview>(); ToggleSwatchPicker toggleSwatchPicker_Component = District_UI_Children.Find(i => i.name == "ToggleSwatchPicker").gameObject.AddComponent <ToggleSwatchPicker>(); ToggleDeleteMode toggleDeleteMode_Componenet = District_UI_Children.Find(i => i.name == "ToggleDeleteMode").gameObject.AddComponent <ToggleDeleteMode>(); district_Component.AddSwatch(Color.white, District.SwatchType.Default); district_Component.AddSwatch(Color.blue, District.SwatchType.Default); district_Component.AddSwatch(Color.cyan, District.SwatchType.Default); district_Component.AddSwatch(Color.gray, District.SwatchType.Default); district_Component.AddSwatch(Color.green, District.SwatchType.Default); district_Component.AddSwatch(Color.magenta, District.SwatchType.Default); district_Component.AddSwatch(Color.red, District.SwatchType.Default); district_Component.AddSwatch(Color.yellow, District.SwatchType.Default); // Color Picker ColorPicker colorPicker_Component = District_UI_Children.Find(i => i.name == "Picker").gameObject.AddComponent <ColorPicker>(); ColorImage colorImage_Component = District_UI_Children.Find(i => i.name == "Fill").gameObject.AddComponent <ColorImage>(); colorImage_Component.picker = colorPicker_Component; HexColorField hexColorField_Component = District_UI_Children.Find(i => i.name == "InputField").gameObject.AddComponent <HexColorField>(); hexColorField_Component.hsvpicker = colorPicker_Component; BoxSlider boxSlider_Component = District_UI_Children.Find(i => i.name == "BoxSlider").gameObject.AddComponent <BoxSlider>(); boxSlider_Component.handleRect = boxSlider_Component.transform.Find("Handle Slide Area").Find("Handle").GetComponent <RectTransform>(); SVBoxSlider sVBoxSlider = boxSlider_Component.gameObject.AddComponent <SVBoxSlider>(); sVBoxSlider.picker = colorPicker_Component; ColorSlider colorSlider_Component = District_UI_Children.Find(i => i.name == "Hue").gameObject.AddComponent <ColorSlider>(); colorSlider_Component.hsvpicker = colorPicker_Component; colorSlider_Component.type = ColorValues.Hue; ColorSliderImage colorSliderImage_Component = colorSlider_Component.transform.Find("Background").gameObject.AddComponent <ColorSliderImage>(); colorSliderImage_Component.picker = colorPicker_Component; colorSliderImage_Component.type = ColorValues.Hue; colorSliderImage_Component.direction = Slider.Direction.BottomToTop; _helper.Log("-----------ASSETS HOOKED UP------------"); }
public SaturationSliderRenderer(ColorSlider slider) : base(slider) { }
public GamePage BindData() { App.SlowWriter.Target = StoryBlock; /* LOCATION NAME */ Binding BindingName = new Binding("CurrentLocationName") { Source = App.LocationViewModel }; StoryHeader.SetBinding(ContentControl.ContentProperty, BindingName); /* LOCATION IMAGE */ Binding BindingImage = new Binding("CurrentLocationImage") { Source = App.LocationViewModel }; StoryImage.SetBinding(Image.SourceProperty, BindingImage); /* LOCATION FILTER */ Binding BindingSliderFilter = new Binding("BackgroundOptionsIntTransparent") { Source = App.PlayerViewModel.Player }; FilterSlider.SetBinding(Slider.ValueProperty, BindingSliderFilter); Binding BindingSliderColor = new Binding("BackgroundOptionsIntBlue") { Source = App.PlayerViewModel.Player }; ColorSlider.SetBinding(Slider.ValueProperty, BindingSliderColor); /* PLAYER'S HEALTH BAR */ Binding BindingHealth = new Binding("HealthBarValue") { Source = App.PlayerViewModel }; // value bind Binding BindingBarsWidth = new Binding("HealthThirstHungerBarWidth") { Source = App.PlayerViewModel }; // bar width bind Binding BindingHealthText = new Binding("HealthBarString") { Source = App.PlayerViewModel }; // text value bind HealthBar.SetBinding(ProgressBar.ValueProperty, BindingHealth); // value bind HealthBar.SetBinding(ProgressBar.WidthProperty, BindingBarsWidth); // bar width bind - same for health, thirst and hunger HealthBarString.SetBinding(ContentControl.ContentProperty, BindingHealthText); // text value bind /* PLAYER'S ENERGY BAR */ Binding BindingEnergy = new Binding("EnergyBarValue") { Source = App.PlayerViewModel }; // value bind Binding BindingEneryWidth = new Binding("EnergyBarWidth") { Source = App.PlayerViewModel }; // bar width bind Binding BindingEnergyText = new Binding("EnergyBarString") { Source = App.PlayerViewModel }; // text value bind EnergyBar.SetBinding(ProgressBar.ValueProperty, BindingEnergy); // value bind EnergyBar.SetBinding(ProgressBar.WidthProperty, BindingEneryWidth); // bar width bind EnergyBarString.SetBinding(ContentControl.ContentProperty, BindingEnergyText); // text value bind /* PLAYER'S HUNGER BAR */ Binding BindingHunger = new Binding("HungerBarValue") { Source = App.PlayerViewModel }; // value bind Binding BindingHungerText = new Binding("HungerBarString") { Source = App.PlayerViewModel }; // text value bind HungerBar.SetBinding(ProgressBar.ValueProperty, BindingHunger); // value bind HungerBar.SetBinding(ProgressBar.WidthProperty, BindingBarsWidth); // bar width bind - same for health, thirst and hunger HungerBarString.SetBinding(ContentControl.ContentProperty, BindingHungerText); // text value bind /* PLAYER'S THIRST BAR */ Binding BindingThirst = new Binding("ThirstBarValue") { Source = App.PlayerViewModel }; // value bind Binding BindingThirstText = new Binding("ThirstBarString") { Source = App.PlayerViewModel }; // text value bind ThirstBar.SetBinding(ProgressBar.ValueProperty, BindingThirst); // value bind ThirstBar.SetBinding(ProgressBar.WidthProperty, BindingBarsWidth); // bar width bind - same for health, thirst and hunger ThirstBarString.SetBinding(ContentControl.ContentProperty, BindingThirstText); // text value bind /* CHECK ALIVE */ timer.Interval = new TimeSpan(0, 0, 0, 0, 333); timer.Tick += (sender, args) => { CheckAlive(); }; timer.Start(); return(this); }
public void ChangeColor() { Slider[] sliders = GetComponentInParent <PanelInit>().GetComponentsInChildren <Slider>(); ColorSlider.UpdateSliders(button.colors.normalColor, sliders); GetComponentInParent <PanelInit>().currentItem.color = button.colors.normalColor; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.panel1 = new System.Windows.Forms.Panel(); this.m_tooltip = new System.Windows.Forms.ToolTip(this.components); this.m_colorSample = new AxiomCoders.PdfTemplateEditor.Controls.LabelRotate(); this.m_infoLabel = new AxiomCoders.PdfTemplateEditor.Controls.LabelRotate(); this.m_colorTable = new AxiomCoders.PdfTemplateEditor.Controls.ColorTable(); this.m_eyedropColorPicker = new AxiomCoders.PdfTemplateEditor.Controls.EyedropColorPicker(); this.m_colorWheel = new AxiomCoders.PdfTemplateEditor.Controls.ColorWheelCtrl(); this.m_opacitySlider = new AxiomCoders.PdfTemplateEditor.Controls.ColorSlider(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // panel1 // this.panel1.BackColor = System.Drawing.Color.Transparent; this.panel1.Controls.Add(this.m_colorWheel); this.panel1.Controls.Add(this.m_opacitySlider); this.panel1.Location = new System.Drawing.Point(257, 4); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(254, 242); this.panel1.TabIndex = 9; // // m_colorSample // this.m_colorSample.Location = new System.Drawing.Point(1, 150); this.m_colorSample.Name = "m_colorSample"; this.m_colorSample.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_colorSample.Size = new System.Drawing.Size(186, 60); this.m_colorSample.TabIndex = 1; this.m_colorSample.TabStop = false; this.m_colorSample.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_colorSample.TextAngle = 0F; // // m_infoLabel // this.m_infoLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_infoLabel.Location = new System.Drawing.Point(1, 217); this.m_infoLabel.Name = "m_infoLabel"; this.m_infoLabel.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_infoLabel.Size = new System.Drawing.Size(252, 28); this.m_infoLabel.TabIndex = 3; this.m_infoLabel.TabStop = false; this.m_infoLabel.Text = "This is some sample text"; this.m_infoLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.m_infoLabel.TextAngle = 0F; // // m_colorTable // this.m_colorTable.Cols = 16; this.m_colorTable.FieldSize = new System.Drawing.Size(12, 12); this.m_colorTable.Location = new System.Drawing.Point(1, 7); this.m_colorTable.Name = "m_colorTable"; this.m_colorTable.Padding = new System.Windows.Forms.Padding(8, 8, 0, 0); this.m_colorTable.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_colorTable.SelectedItem = System.Drawing.Color.Black; this.m_colorTable.Size = new System.Drawing.Size(252, 138); this.m_colorTable.TabIndex = 0; this.m_colorTable.Text = "m_colorTable"; this.m_colorTable.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_colorTable.TextAngle = 0F; // // m_eyedropColorPicker // this.m_eyedropColorPicker.BackColor = System.Drawing.SystemColors.Control; this.m_eyedropColorPicker.Location = new System.Drawing.Point(193, 150); this.m_eyedropColorPicker.Name = "m_eyedropColorPicker"; this.m_eyedropColorPicker.SelectedColor = System.Drawing.Color.Empty; this.m_eyedropColorPicker.Size = new System.Drawing.Size(60, 60); this.m_eyedropColorPicker.TabIndex = 2; this.m_eyedropColorPicker.TabStop = false; this.m_tooltip.SetToolTip(this.m_eyedropColorPicker, "Color Selector. Click and Drag to pick a color from the screen"); this.m_eyedropColorPicker.Zoom = 4; // // m_colorWheel // this.m_colorWheel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_colorWheel.BackColor = System.Drawing.Color.Transparent; this.m_colorWheel.Location = new System.Drawing.Point(-1, 0); this.m_colorWheel.Name = "m_colorWheel"; this.m_colorWheel.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(235)))), ((int)(((byte)(205))))); this.m_colorWheel.Size = new System.Drawing.Size(254, 209); this.m_colorWheel.TabIndex = 0; // // m_opacitySlider // this.m_opacitySlider.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.m_opacitySlider.BackColor = System.Drawing.Color.Transparent; this.m_opacitySlider.BarPadding = new System.Windows.Forms.Padding(60, 12, 80, 25); this.m_opacitySlider.Color1 = System.Drawing.Color.White; this.m_opacitySlider.Color2 = System.Drawing.Color.Black; this.m_opacitySlider.Color3 = System.Drawing.Color.Black; this.m_opacitySlider.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.m_opacitySlider.ForeColor = System.Drawing.Color.Black; this.m_opacitySlider.Location = new System.Drawing.Point(2, 213); this.m_opacitySlider.Name = "m_opacitySlider"; this.m_opacitySlider.NumberOfColors = AxiomCoders.PdfTemplateEditor.Controls.ColorSlider.eNumberOfColors.Use2Colors; this.m_opacitySlider.Orientation = System.Windows.Forms.Orientation.Horizontal; this.m_opacitySlider.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0); this.m_opacitySlider.Percent = 1F; this.m_opacitySlider.RotatePointAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.m_opacitySlider.Size = new System.Drawing.Size(248, 28); this.m_opacitySlider.TabIndex = 1; this.m_opacitySlider.Text = "Opacity"; this.m_opacitySlider.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.m_opacitySlider.TextAngle = 0F; this.m_opacitySlider.ValueOrientation = AxiomCoders.PdfTemplateEditor.Controls.ColorSlider.eValueOrientation.MinToMax; // // ColorPickerCtrl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.Transparent; this.Controls.Add(this.m_colorSample); this.Controls.Add(this.m_infoLabel); this.Controls.Add(this.m_colorTable); this.Controls.Add(this.m_eyedropColorPicker); this.Controls.Add(this.panel1); this.Name = "ColorPickerCtrl"; this.Padding = new System.Windows.Forms.Padding(3, 3, 0, 0); this.Size = new System.Drawing.Size(507, 250); this.panel1.ResumeLayout(false); this.ResumeLayout(false); }
//----------------------------------------------------------------------------------------- public void drawColorSlider(Rectangle _rect, ColorSlider _type, Color _color) { float posCursor; _rect.Inflate(0, -1); if (_type == ColorSlider.red) { LinearGradientBrush gradient = new LinearGradientBrush(_rect, Color.FromArgb(255, 0, _color.G, _color.B), Color.FromArgb(255, 255, _color.G, _color.B), 0.0f); m_graphics.FillRectangle(gradient, _rect); posCursor = (float)_color.R / 255.0f; } else if (_type == ColorSlider.green) { LinearGradientBrush gradient = new LinearGradientBrush(_rect, Color.FromArgb(255, _color.R, 0, _color.B), Color.FromArgb(255, _color.R, 255, _color.B), 0.0f); m_graphics.FillRectangle(gradient, _rect); posCursor = (float)_color.G / 255.0f; } else if (_type == ColorSlider.blue) { LinearGradientBrush gradient = new LinearGradientBrush(_rect, Color.FromArgb(255, _color.R, _color.G, 0), Color.FromArgb(255, _color.R, _color.G, 255), 0.0f); m_graphics.FillRectangle(gradient, _rect); posCursor = (float)_color.B / 255.0f; } else if (_type == ColorSlider.alpha) { LinearGradientBrush gradient = new LinearGradientBrush(_rect, Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 255, 255, 255), 0.0f); m_graphics.FillRectangle(gradient, _rect); posCursor = (float)_color.A / 255.0f; } else if (_type == ColorSlider.hue) { ColorExtended.HSL hsl = ColorExtended.RGB_to_HSL(_color); posCursor = (float)hsl.H; hsl.L = hsl.S = 1.0; double div = 1 / (double)_rect.Width; Pen pen = new Pen(Color.Black); for (int i = 0; i < _rect.Width; i++) { //hsl.H = 1.0 - (double)i * div; hsl.H = (double)i * div; pen.Color = ColorExtended.HSL_to_RGB(hsl); m_graphics.DrawLine(pen, _rect.X + i, _rect.Top, _rect.X + i, _rect.Bottom); } } else if (_type == ColorSlider.saturation) { ColorExtended.HSL hsl = ColorExtended.RGB_to_HSL(_color); posCursor = (float)hsl.S; double div = 1 / (double)_rect.Width; Pen pen = new Pen(Color.Black); for (int i = 0; i < _rect.Width; i++) { //hsl.S = 1.0 - (double)i * div; hsl.S = (double)i * div; pen.Color = ColorExtended.HSL_to_RGB(hsl); m_graphics.DrawLine(pen, _rect.X + i, _rect.Top, _rect.X + i, _rect.Bottom); } } else if (_type == ColorSlider.lightness) { ColorExtended.HSL hsl = ColorExtended.RGB_to_HSL(_color); posCursor = (float)hsl.L; double div = 1 / (double)_rect.Width; Pen pen = new Pen(Color.Black); for (int i = 0; i < _rect.Width; i++) { hsl.L = (double)i * div; //hsl.L = 1.0 - (double)i * div; pen.Color = ColorExtended.HSL_to_RGB(hsl); m_graphics.DrawLine(pen, _rect.X + i, _rect.Top, _rect.X + i, _rect.Bottom); } } else { return; } _rect.Inflate(0, 1); int x = _rect.X + (int)(_rect.Width * posCursor); Rectangle cursorRect = Rectangle.FromLTRB(x - 2, _rect.Top, x + 2, _rect.Bottom); m_graphics.DrawRectangle(Pens.White, cursorRect); cursorRect.Inflate(-1, -1); m_graphics.DrawRectangle(Pens.Black, cursorRect); }
public AlphaSliderRenderer(ColorSlider slider) : base(slider) { }