Beispiel #1
0
        protected override void DrawSelf(SpriteBatch spriteBatch)
        {
            Vector2 mousePosition = new Vector2(Main.mouseX, Main.mouseY);

            if (ResourceBar.ContainsPoint(mousePosition))
            {
                Main.LocalPlayer.mouseInterface = true;
            }

            if (_dragging)
            {
                ResourceBar.Left.Set(mousePosition.X - _mouseOffset.X, 0f);
                ResourceBar.Top.Set(mousePosition.Y - _mouseOffset.Y, 0f);

                Recalculate();
            }
        }