private void ColorPicker_OnLeftMouseDown(EloBuddy.SDK.Menu.Control sender, EventArgs args)
 {
     if (!IsVisible)
     {
         return;
     }
     if (IsInsideRectangle(RedBarNative, Game.CursorPos2D))
     {
         MouseClickedBox = RedBarNative;
     }
     else if (IsInsideRectangle(GreenBarNative, Game.CursorPos2D))
     {
         MouseClickedBox = GreenBarNative;
     }
     else if (IsInsideRectangle(BlueBarNative, Game.CursorPos2D))
     {
         MouseClickedBox = BlueBarNative;
     }
     else if (IsInsideRectangle(AlphaBarNative, Game.CursorPos2D))
     {
         MouseClickedBox = AlphaBarNative;
     }
     else
     {
         return;
     }
     IsMouseDown = true;
 }
Beispiel #2
0
        private void ColorPicker_OnLeftMouseDown(EloBuddy.SDK.Menu.Control sender, EventArgs args)
        {
            if (!this.IsVisible)
            {
                return;
            }

            if (this.IsInsideRectangle(this.RedBarNative, Game.CursorPos2D))
            {
                this.MouseClickedBox = this.RedBarNative;
            }
            else if (this.IsInsideRectangle(this.GreenBarNative, Game.CursorPos2D))
            {
                this.MouseClickedBox = this.GreenBarNative;
            }
            else if (this.IsInsideRectangle(this.BlueBarNative, Game.CursorPos2D))
            {
                this.MouseClickedBox = this.BlueBarNative;
            }
            else if (this.IsInsideRectangle(this.AlphaBarNative, Game.CursorPos2D))
            {
                this.MouseClickedBox = this.AlphaBarNative;
            }
            else
            {
                return;
            }

            this.IsMouseDown = true;
        }
Beispiel #3
0
 private void ColorPicker_OnLeftMouseUp(EloBuddy.SDK.Menu.Control sender, EventArgs args)
 {
     if (IsMouseDown)
     {
         ColorReader.Save(this.SerializationId, this.CurrentValue);
     }
     this.MouseClickedBox = RectangleF.Empty;
     this.IsMouseDown     = false;
 }
 private void ColorPicker_OnMouseMove(EloBuddy.SDK.Menu.Control sender, EventArgs args)
 {
     if (!IsMouseDown || MouseClickedBox == RectangleF.Empty)
     {
         return;
     }
     if (MouseClickedBox == RedBarNative)
     {
         Red = Math.Min(Math.Max(0, GetPosValue(MouseClickedBox, Game.CursorPos2D)), 255);
     }
     else if (MouseClickedBox == GreenBarNative)
     {
         Green = Math.Min(Math.Max(0, GetPosValue(MouseClickedBox, Game.CursorPos2D)), 255);
     }
     else if (MouseClickedBox == BlueBarNative)
     {
         Blue = Math.Min(Math.Max(0, GetPosValue(MouseClickedBox, Game.CursorPos2D)), 255);
     }
     else if (MouseClickedBox == AlphaBarNative)
     {
         Alpha = Math.Min(Math.Max(0, GetPosValue(MouseClickedBox, Game.CursorPos2D)), 255);
     }
 }
 private void ColorPicker_OnLeftMouseUp(EloBuddy.SDK.Menu.Control sender, EventArgs args)
 {
     MouseClickedBox = RectangleF.Empty;
     IsMouseDown     = false;
 }