Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ DrawSelf()

override void Terraria.GameContent.UI.Elements.UIImageButton.DrawSelf ( SpriteBatch spriteBatch)
inlineprotectedvirtual

Reimplemented from Terraria.UI.UIElement.

Definition at line 38 of file UIImageButton.cs.

39 {
40 CalculatedStyle dimensions = GetDimensions();
41 spriteBatch.Draw(_texture.Value, dimensions.Position(), Color.White * (base.IsMouseHovering ? _visibilityActive : _visibilityInactive));
42 if (_borderTexture != null && base.IsMouseHovering)
43 {
44 spriteBatch.Draw(_borderTexture.Value, dimensions.Position(), Color.White);
45 }
46 }
void Draw(Texture2D texture, Vector2 position, Color color)
CalculatedStyle GetDimensions()
Definition UIElement.cs:382

References Terraria.GameContent.UI.Elements.UIImageButton._borderTexture, Terraria.GameContent.UI.Elements.UIImageButton._texture, Terraria.GameContent.UI.Elements.UIImageButton._visibilityActive, Terraria.GameContent.UI.Elements.UIImageButton._visibilityInactive, Microsoft.Xna.Framework.Graphics.SpriteBatch.Draw(), Terraria.UI.UIElement.GetDimensions(), Terraria.UI.CalculatedStyle.Position(), ReLogic.Content.Asset< T >.Value, and Microsoft.Xna.Framework.Color.White.