/// <summary> /// Color-select button press handler. /// </summary> /// <param name="control">Event source.</param> protected virtual void OnButtonPressed(Control.Base control, EventArgs args) { Menu menu = new Menu(GetCanvas()); menu.SetSize(256, 180); menu.DeleteOnClose = true; menu.IconMarginDisabled = true; HSVColorPicker picker = new HSVColorPicker(menu); picker.Dock = Pos.Fill; picker.SetSize(256, 128); string[] split = m_TextBox.Text.Split(' '); picker.SetColor(GetColorFromText(), false, true); picker.ColorChanged += OnColorChanged; menu.Open(Pos.Right | Pos.Top); }
/// <summary> /// Color-select button press handler. /// </summary> /// <param name="control">Event source.</param> protected virtual void onButtonPressed(Control.ControlBase control, EventArgs args) { Menu menu = new Menu(GetCanvas()); menu.SetSize(256, 180); menu.DeleteOnClose = true; menu.IconMarginDisabled = true; HSVColorPicker picker = new HSVColorPicker(menu); picker.Dock = Pos.Fill; picker.SetSize(256, 128); picker.SetColor(getColorFromText(), false, true); picker.ColorChanged += onColorChanged; menu.Open(Pos.Right | Pos.Top); }
void ShowColorDialog(ColorButton colorButton) { m_CurrentColorButton = colorButton; Alt.GUI.Temporary.Gwen.Control.Menu menu = new Alt.GUI.Temporary.Gwen.Control.Menu(GetCanvas()); menu.SetSize(256, 180); menu.DeleteOnClose = true; menu.IconMarginDisabled = true; HSVColorPicker picker = new HSVColorPicker(menu); picker.Dock = Pos.Fill; picker.SetSize(256, 128); picker.SetColor(m_CurrentColorButton.Color, false, true); picker.ColorChanged += OnColorChanged; menu.Open(Pos.Right | Pos.Top); }
/// <summary> /// Color-select button press handler. /// </summary> /// <param name="control">Event source.</param> protected virtual void OnButtonPressed(Controls.Control control) { Menu menu = new Menu(GetCanvas()); menu.SetSize(256, 180); menu.DeleteOnClose = true; menu.IconMarginDisabled = true; HSVColorPicker picker = new HSVColorPicker(menu); picker.Dock = Pos.Fill; picker.SetSize(256, 128); String[] split = m_TextBox.Text.Split(' '); picker.SetColor(GetColorFromText(), false, true); picker.ColorChanged += OnColorChanged; menu.Open(Pos.Right | Pos.Top); }