public override void draw(SpriteBatch b) { int heightSoFar2 = 0; bool drawBG = false; for (int j = messages.Count - 1; j >= 0; j--) { ChatMessage message = messages[j]; if (chatBox.Selected || message.alpha > 0.01f) { heightSoFar2 += message.verticalSize; drawBG = true; } } if (drawBG) { IClickableMenu.drawTextureBox(b, Game1.mouseCursors, new Rectangle(301, 288, 15, 15), xPositionOnScreen, yPositionOnScreen - heightSoFar2 - 20 + ((!chatBox.Selected) ? chatBox.Height : 0), chatBox.Width, heightSoFar2 + 20, Color.White, 4f, drawShadow: false); } heightSoFar2 = 0; for (int i = messages.Count - 1; i >= 0; i--) { ChatMessage message2 = messages[i]; heightSoFar2 += message2.verticalSize; message2.draw(b, 12, yPositionOnScreen - heightSoFar2 - 8 + ((!chatBox.Selected) ? chatBox.Height : 0)); } if (chatBox.Selected) { chatBox.Draw(b, drawShadow: false); emojiMenuIcon.draw(b, Color.White, 0.99f); if (choosingEmoji) { emojiMenu.draw(b); } if (isWithinBounds(Game1.getMouseX(), Game1.getMouseY()) && !Game1.options.hardwareCursor) { Game1.mouseCursor = (Game1.options.gamepadControls ? 44 : 0); } } }