Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public override void draw(SpriteBatch b)
- {
- int menuX = (Game1.viewport.Width - (width - 800)) / 2;
- int menuY = (Game1.viewport.Height - (height - 592)) / 2;
- int clintCompare = clintPrice - clintPriceLast;
- int sauceCompare = saucePrice - saucePriceLast;
- int robinCompare = robinPrice - robinPriceLast;
- int pierreCompare = pierrePrice - pierrePriceLast;
- int jojaCompare = jojaPrice - jojaPriceLast;
- int zuzuCompare = zuzuPrice - zuzuPriceLast;
- int stardropCompare = stardropPrice - stardropPriceLast;
- if (clintCompare >= 0)
- clintChange = $"+{clintCompare}";
- if (clintCompare < 0)
- clintChange = $"{clintCompare}";
- if (sauceCompare >= 0)
- sauceChange = $"+{sauceCompare}";
- if (sauceCompare < 0)
- sauceChange = $"{sauceCompare}";
- if (robinCompare >= 0)
- robinChange = $"+{robinCompare}";
- if (robinCompare < 0)
- robinChange = $"{robinCompare}";
- if (pierreCompare >= 0)
- pierreChange = $"+{pierreCompare}";
- if (pierreCompare < 0)
- pierreChange = $"{pierreCompare}";
- if (jojaCompare >= 0)
- jojaChange = $"+{jojaCompare}";
- if (jojaCompare < 0)
- jojaChange = $"{jojaCompare}";
- if (zuzuCompare >= 0)
- zuzuChange = $"+{zuzuCompare}";
- if (zuzuCompare < 0)
- zuzuChange = $"{zuzuCompare}";
- if (stardropCompare >= 0)
- stardropChange = $"+{stardropCompare}";
- if (stardropCompare < 0)
- stardropChange = $"{stardropCompare}";
- b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.White * 0.4f);
- Vector2 titleSize = Game1.dialogueFont.MeasureString("Stock Market");
- drawTextureBox(b, menuX, menuY - 80, (int)titleSize.X + 32, (int)titleSize.Y + 32, Color.White);
- Utility.drawTextWithShadow(b, "Stock Market", Game1.dialogueFont, new Vector2(menuX + 16, menuY - 64), Game1.textColor);
- drawTextureBox(b, menuX, menuY, width - 800, height - 650, Color.White);
- //Draw Stock Names
- Utility.drawTextWithShadow(b, "Clint(CBC)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 16), Game1.textColor);
- Utility.drawTextWithShadow(b, "Sauce(QOS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 64), Game1.textColor);
- Utility.drawTextWithShadow(b, "Robin(RBN)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 112), Game1.textColor);
- Utility.drawTextWithShadow(b, "Pierre(PGS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 160), Game1.textColor);
- Utility.drawTextWithShadow(b, "Joja(JOJ)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 208), Game1.textColor);
- Utility.drawTextWithShadow(b, "Zuzu(ZUZ)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 256), Game1.textColor);
- Utility.drawTextWithShadow(b, "Stardrop(SDS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 304), Game1.textColor);
- //Draw Stock Prices
- Utility.drawTextWithShadow(b, $"{clintPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 16), Game1.textColor);
- Utility.drawTextWithShadow(b, clintChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 16), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {clintShare}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 16), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{saucePrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 64), Game1.textColor);
- Utility.drawTextWithShadow(b, sauceChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 64), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {sauceShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 64), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{robinPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 112), Game1.textColor);
- Utility.drawTextWithShadow(b, robinChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 112), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {robinShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 112), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{pierrePrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 160), Game1.textColor);
- Utility.drawTextWithShadow(b, pierreChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 160), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {pierreShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 160), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{jojaPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 208), Game1.textColor);
- Utility.drawTextWithShadow(b, jojaChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 208), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {jojaShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 208), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{zuzuPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 256), Game1.textColor);
- Utility.drawTextWithShadow(b, zuzuChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 256), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {zuzuShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 256), Game1.textColor);
- Utility.drawTextWithShadow(b, $"{stardropPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 304), Game1.textColor);
- Utility.drawTextWithShadow(b, stardropChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 304), Game1.textColor);
- Utility.drawTextWithShadow(b, $"Own: {stardropShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 304), Game1.textColor);
- increaseClint.draw(b);
- decreaseClint.draw(b);
- increaseSauce.draw(b);
- decreaseSauce.draw(b);
- increaseRobin.draw(b);
- decreaseRobin.draw(b);
- increasePierre.draw(b);
- decreasePierre.draw(b);
- increaseJoja.draw(b);
- decreaseJoja.draw(b);
- increaseZuzu.draw(b);
- decreaseZuzu.draw(b);
- increaseStar.draw(b);
- decreaseStar.draw(b);
- drawMouse(b);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement