protected override void DrawSelf(SpriteBatch spriteBatch) { VoidBar voidAmount = new VoidBar(VoidBarMode.voidAmount, 280, 25); voidAmount.Left.Set(Main.screenWidth - voidAmount.Width.Pixels - 400, 0f); voidAmount.Top.Set(100f, 0f); Recalculate(); }
public override void OnInitialize() { UIPanel voidUI = new UIPanel(); voidUI.Height.Set(30f, 0f); voidUI.Width.Set(100f, 0f); voidUI.Left.Set(Main.screenWidth - voidUI.Width.Pixels - 400, 0f); voidUI.Top.Set(100f, 0f); voidUI.BackgroundColor = new Color(255, 255, 255, 255); VoidBar voidAmount = new VoidBar(VoidBarMode.voidAmount, 280, 25); voidAmount.Height.Set(30f, 0f); voidAmount.Width.Set(200f, 0f); voidAmount.Left.Set(500f, 0f); voidAmount.Top.Set(30f, 0f); //voidUI.Append(voidAmount); base.Append(voidAmount); }