/// <summary> /// Draws the quick bar item. /// </summary> /// <param name="spriteBatch">The <see cref="ISpriteBatch"/> to draw to.</param> /// <param name="position">The position to draw the item at. If null, the item will be /// drawn in the center of the quick bar slot.</param> /// <param name="color">The color.</param> void DrawQuickBarItem(ISpriteBatch spriteBatch, Vector2?position, Color color) { var isOnBar = (position == null); // Draw the item in the quick bar switch (QuickBarItemType) { case QuickBarItemType.Inventory: var item = QuickBarForm._gps.UserInfo.Inventory[(InventorySlot)QuickBarItemValue]; if (item == null) { break; } if (position == null) { position = CenterOnSlot(item.Grh); } item.Draw(spriteBatch, position.Value, color); break; case QuickBarItemType.Skill: if (_skillInfo == null) { break; } if (position == null) { position = CenterOnSlot(_grh); } _grh.Draw(spriteBatch, position.Value); if (isOnBar && CooldownManager.IsCoolingDown(_skillInfo.CooldownGroup, TickCount.Now)) { RenderRectangle.Draw(spriteBatch, GetScreenArea(), new Color(0, 0, 0, 150)); } break; } }