From 3fa9f9e9cfc9ea52e7e493dc59d6aa2139f525db Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Tue, 16 May 2023 12:14:52 +0200 Subject: [PATCH] Follow up 4482fc0bcfc7242ece25be5679b5b62e127f33a2 #1086 --- Source/Engine/UI/GUI/Common/IconButton.cs | 74 ----------------------- 1 file changed, 74 deletions(-) delete mode 100644 Source/Engine/UI/GUI/Common/IconButton.cs diff --git a/Source/Engine/UI/GUI/Common/IconButton.cs b/Source/Engine/UI/GUI/Common/IconButton.cs deleted file mode 100644 index e2652cd9f..000000000 --- a/Source/Engine/UI/GUI/Common/IconButton.cs +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. - -using System; - -namespace FlaxEngine.GUI -{ - /// - /// Button with an icon. - /// - public class IconButton : Button - { - /// - /// The sprite rendered on the button. - /// - public SpriteHandle ButtonSprite { get; set; } - - /// - /// Whether or not to hide the border of the button. - /// - public bool HideBorder = true; - - /// - /// Initializes a new instance of the class. - /// - /// The sprite used by the button. - public IconButton(SpriteHandle buttonSprite) - : this(0, 0, buttonSprite) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// Position X coordinate - /// Position Y coordinate - /// The sprite used by the button. - /// Width - /// Height - /// Whether or not to hide the border. - public IconButton(float x, float y, SpriteHandle buttonSprite, float width = 120, float height = DefaultHeight, bool hideBorder = true) - : base(x, y, width, height) - { - ButtonSprite = buttonSprite; - BackgroundBrush = new SpriteBrush(ButtonSprite); - HideBorder = hideBorder; - } - - /// - /// Initializes a new instance of the class. - /// - /// Position - /// Size - /// The sprite used by the button. - public IconButton(Float2 location, Float2 size, SpriteHandle buttonSprite) - : this(location.X, location.Y, buttonSprite, size.X, size.Y) - { - } - - /// - /// Sets the colors of the button, taking into account the field.> - /// - /// The color to use. - public override void SetColors(Color color) - { - BackgroundColor = color; - BackgroundColorSelected = color.RGBMultiplied(0.8f); - BackgroundColorHighlighted = color.RGBMultiplied(1.2f); - - BorderColor = HideBorder ? Color.Transparent : color.RGBMultiplied(0.5f); - BorderColorSelected = BorderColor; - BorderColorHighlighted = BorderColor; - } - } -}