Skip to content

Commit

Permalink
Remove erroneously committed debug code (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanmoffat committed Apr 29, 2023
1 parent 6545803 commit a39029f
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions EndlessClient/HUD/Panels/InventoryPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ public class InventoryPanel : XNAPanel, IHudPanel, IDraggableItemContainer
private Option<CharacterStats> _cachedStats;
private HashSet<InventoryItem> _cachedInventory;

private Texture2D _whitePixel;

public INativeGraphicsManager NativeGraphicsManager { get; }

public InventoryPanel(INativeGraphicsManager nativeGraphicsManager,
Expand Down Expand Up @@ -134,9 +132,6 @@ public class InventoryPanel : XNAPanel, IHudPanel, IDraggableItemContainer
DrawArea = new Rectangle(102, 330, BackgroundImage.Width, BackgroundImage.Height);

Game.Exiting += SaveInventoryFile;

_whitePixel = new Texture2D(Game.GraphicsDevice, 1, 1);
_whitePixel.SetData(new[] { Color.White });
}

public bool NoItemsDragging() => _childItems.All(x => !x.IsDragging);
Expand Down Expand Up @@ -249,24 +244,6 @@ protected override void OnUpdateControl(GameTime gameTime)
base.OnUpdateControl(gameTime);
}

protected override void OnDrawControl(GameTime gameTime)
{
base.OnDrawControl(gameTime);

_spriteBatch.Begin();
for (int i = 0; i < _inventorySlotRepository.FilledSlots.Rows; i++)
{
for (int j = 0; j < _inventorySlotRepository.FilledSlots.Cols; j++)
{
if (!_inventorySlotRepository.FilledSlots[i, j]) continue;

var offset = new Point(j * 26, i * 26);
_spriteBatch.Draw(_whitePixel, new Rectangle(new Point(114, 338) + offset, new Point(26, 26)), Color.FromNonPremultiplied(255, 0, 0, 60));
}
}
_spriteBatch.End();
}

protected override void Dispose(bool disposing)
{
if (disposing)
Expand Down

0 comments on commit a39029f

Please sign in to comment.