Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
UIVerticalSeparator.cs
Go to the documentation of this file.
4using Terraria.UI;
5
7
9{
11
12 public Color Color;
13
14 public int EdgeWidth;
15
17 {
19 _texture = Main.Assets.Request<Texture2D>("Images/UI/OnePixel", (AssetRequestMode)1);
20 Width.Set(_texture.Width(), 0f);
21 Height.Set(_texture.Height(), 0f);
22 }
23
24 protected override void DrawSelf(SpriteBatch spriteBatch)
25 {
26 CalculatedStyle dimensions = GetDimensions();
27 spriteBatch.Draw(_texture.Value, dimensions.ToRectangle(), Color);
28 }
29
30 public override bool ContainsPoint(Vector2 point)
31 {
32 return false;
33 }
34}
void Draw(Texture2D texture, Vector2 position, Color color)
override void DrawSelf(SpriteBatch spriteBatch)
static IAssetRepository Assets
Definition Main.cs:209
StyleDimension Height
Definition UIElement.cs:29
StyleDimension Width
Definition UIElement.cs:27
CalculatedStyle GetDimensions()
Definition UIElement.cs:382
void Set(float pixels, float precent)