Skip to content

Commit

Permalink
Bot UI now highlights the currently selected item in bot inventory.
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeStrout committed Jul 26, 2022
1 parent 8e27432 commit 134753b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions M1/BotUIMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ public override void draw(SpriteBatch b) {
Game1.drawDialogueBox(invR.X, invR.Y, invR.Width, invR.Height, speaker: false, drawOnlyBox: true);
botInventoryMenu.draw(b);

// highlight the currently selected slot
Vector2 slotPos = botInventoryMenu.GetSlotDrawPositions()[bot.currentToolIndex];
b.Draw(Game1.menuTexture, slotPos, Game1.getSourceRectForStandardTileSheet(Game1.menuTexture, 56), Color.Gray, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0.5f);

// draw the console
Rectangle consoleR = consoleBounds();
Game1.drawDialogueBox(consoleR.X, consoleR.Y, consoleR.Width, consoleR.Height, speaker: false, drawOnlyBox: true);
Expand Down

0 comments on commit 134753b

Please sign in to comment.