private void DrawManaBar(SpriteBatch spriteBatch)
        {
            Vector2 vector = new Vector2(Main.screenWidth - 40, 22f);

            _ = _starCount;
            bool isHovered = false;
            ResourceDrawSettings resourceDrawSettings = default(ResourceDrawSettings);

            resourceDrawSettings.ElementCount       = _starCount;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector;
            resourceDrawSettings.GetTextureMethod   = StarPanelDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.Zero;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitY;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _starCount;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector + new Vector2(15f, 16f);
            resourceDrawSettings.GetTextureMethod   = StarFillingDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.UnitY * -2f;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitY;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f);
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            _hoverMana = isHovered;
        }
        public void Draw()
        {
            PrepareFields(Main.LocalPlayer);
            SpriteBatch spriteBatch = Main.spriteBatch;
            int         num         = 16;
            int         num2        = 18;
            int         num3        = Main.screenWidth - 300 - 22 + num;
            Vector2     vector      = new Vector2(num3, num2);

            vector.X += (_maxSegmentCount - _hpSegmentsCount) * _panelMiddleHP.Width();
            bool isHovered = false;
            ResourceDrawSettings resourceDrawSettings = default(ResourceDrawSettings);

            resourceDrawSettings.ElementCount       = _hpSegmentsCount + 2;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector;
            resourceDrawSettings.GetTextureMethod   = LifePanelDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.Zero;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, ref isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _hpSegmentsCount;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector + new Vector2(6f, 6f);
            resourceDrawSettings.GetTextureMethod   = LifeFillingDrawer;
            resourceDrawSettings.OffsetPerDraw      = new Vector2(_hpFill.Width(), 0f);
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, ref isHovered);
            _hpHovered = isHovered;
            isHovered  = false;
            Vector2 vector2 = new Vector2(num3 - 10, num2 + 24);

            vector2.X           += (_maxSegmentCount - _mpSegmentsCount) * _panelMiddleMP.Width();
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _mpSegmentsCount + 2;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector2;
            resourceDrawSettings.GetTextureMethod   = ManaPanelDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.Zero;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, ref isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _mpSegmentsCount;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector2 + new Vector2(6f, 6f);
            resourceDrawSettings.GetTextureMethod   = ManaFillingDrawer;
            resourceDrawSettings.OffsetPerDraw      = new Vector2(_mpFill.Width(), 0f);
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, ref isHovered);
            _mpHovered = isHovered;
        }
        private void DrawLifeBar(SpriteBatch spriteBatch)
        {
            Vector2 vector    = new Vector2(Main.screenWidth - 300 + 4, 15f);
            bool    isHovered = false;
            ResourceDrawSettings resourceDrawSettings = default(ResourceDrawSettings);

            resourceDrawSettings.ElementCount       = _heartCountRow1;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector;
            resourceDrawSettings.GetTextureMethod   = HeartPanelDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.Zero;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _heartCountRow2;
            resourceDrawSettings.ElementIndexOffset = 10;
            resourceDrawSettings.TopLeftAnchor      = vector + new Vector2(0f, 28f);
            resourceDrawSettings.GetTextureMethod   = HeartPanelDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.Zero;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = Vector2.Zero;
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _heartCountRow1;
            resourceDrawSettings.ElementIndexOffset = 0;
            resourceDrawSettings.TopLeftAnchor      = vector + new Vector2(15f, 15f);
            resourceDrawSettings.GetTextureMethod   = HeartFillingDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.UnitX * 2f;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f);
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            resourceDrawSettings = default(ResourceDrawSettings);
            resourceDrawSettings.ElementCount       = _heartCountRow2;
            resourceDrawSettings.ElementIndexOffset = 10;
            resourceDrawSettings.TopLeftAnchor      = vector + new Vector2(15f, 15f) + new Vector2(0f, 28f);
            resourceDrawSettings.GetTextureMethod   = HeartFillingDrawer;
            resourceDrawSettings.OffsetPerDraw      = Vector2.UnitX * 2f;
            resourceDrawSettings.OffsetPerDrawByTexturePercentile = Vector2.UnitX;
            resourceDrawSettings.OffsetSpriteAnchor = Vector2.Zero;
            resourceDrawSettings.OffsetSpriteAnchorByTexturePercentile = new Vector2(0.5f, 0.5f);
            resourceDrawSettings.Draw(spriteBatch, isHovered);
            _hoverLife = isHovered;
        }