Advertisement
xMissCorielx

Invest UI

Aug 14th, 2021
1,846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.72 KB | None | 0 0
  1.         public override void draw(SpriteBatch b)
  2.         {
  3.             int menuX = (Game1.viewport.Width - (width - 800)) / 2;
  4.             int menuY = (Game1.viewport.Height - (height - 592)) / 2;
  5.             int clintCompare = clintPrice - clintPriceLast;
  6.            
  7.             int sauceCompare = saucePrice - saucePriceLast;
  8.             int robinCompare = robinPrice - robinPriceLast;
  9.             int pierreCompare = pierrePrice - pierrePriceLast;
  10.             int jojaCompare = jojaPrice - jojaPriceLast;
  11.             int zuzuCompare = zuzuPrice - zuzuPriceLast;
  12.             int stardropCompare = stardropPrice - stardropPriceLast;
  13.             if (clintCompare >= 0)
  14.                 clintChange = $"+{clintCompare}";
  15.             if (clintCompare < 0)
  16.                 clintChange = $"{clintCompare}";
  17.             if (sauceCompare >= 0)
  18.                 sauceChange = $"+{sauceCompare}";
  19.             if (sauceCompare < 0)
  20.                 sauceChange = $"{sauceCompare}";
  21.             if (robinCompare >= 0)
  22.                 robinChange = $"+{robinCompare}";
  23.             if (robinCompare < 0)
  24.                 robinChange = $"{robinCompare}";
  25.             if (pierreCompare >= 0)
  26.                 pierreChange = $"+{pierreCompare}";
  27.             if (pierreCompare < 0)
  28.                 pierreChange = $"{pierreCompare}";
  29.             if (jojaCompare >= 0)
  30.                 jojaChange = $"+{jojaCompare}";
  31.             if (jojaCompare < 0)
  32.                 jojaChange = $"{jojaCompare}";
  33.             if (zuzuCompare >= 0)
  34.                 zuzuChange = $"+{zuzuCompare}";
  35.             if (zuzuCompare < 0)
  36.                 zuzuChange = $"{zuzuCompare}";
  37.             if (stardropCompare >= 0)
  38.                 stardropChange = $"+{stardropCompare}";
  39.             if (stardropCompare < 0)
  40.                 stardropChange = $"{stardropCompare}";
  41.  
  42.  
  43.             b.Draw(Game1.fadeToBlackRect, Game1.graphics.GraphicsDevice.Viewport.Bounds, Color.White * 0.4f);
  44.             Vector2 titleSize = Game1.dialogueFont.MeasureString("Stock Market");
  45.             drawTextureBox(b, menuX, menuY - 80, (int)titleSize.X + 32, (int)titleSize.Y + 32, Color.White);
  46.             Utility.drawTextWithShadow(b, "Stock Market", Game1.dialogueFont, new Vector2(menuX + 16, menuY - 64), Game1.textColor);
  47.             drawTextureBox(b, menuX, menuY, width - 800, height - 650, Color.White);
  48.             //Draw Stock Names
  49.             Utility.drawTextWithShadow(b, "Clint(CBC)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 16), Game1.textColor);
  50.             Utility.drawTextWithShadow(b, "Sauce(QOS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 64), Game1.textColor);
  51.             Utility.drawTextWithShadow(b, "Robin(RBN)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 112), Game1.textColor);
  52.             Utility.drawTextWithShadow(b, "Pierre(PGS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 160), Game1.textColor);
  53.             Utility.drawTextWithShadow(b, "Joja(JOJ)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 208), Game1.textColor);
  54.             Utility.drawTextWithShadow(b, "Zuzu(ZUZ)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 256), Game1.textColor);
  55.             Utility.drawTextWithShadow(b, "Stardrop(SDS)", Game1.dialogueFont, new Vector2(menuX + 16, menuY + 304), Game1.textColor);
  56.             //Draw Stock Prices
  57.             Utility.drawTextWithShadow(b, $"{clintPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 16), Game1.textColor);
  58.             Utility.drawTextWithShadow(b, clintChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 16), Game1.textColor);
  59.             Utility.drawTextWithShadow(b, $"Own: {clintShare}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 16), Game1.textColor);
  60.             Utility.drawTextWithShadow(b, $"{saucePrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 64), Game1.textColor);
  61.             Utility.drawTextWithShadow(b, sauceChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 64), Game1.textColor);
  62.             Utility.drawTextWithShadow(b, $"Own: {sauceShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 64), Game1.textColor);
  63.             Utility.drawTextWithShadow(b, $"{robinPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 112), Game1.textColor);
  64.             Utility.drawTextWithShadow(b, robinChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 112), Game1.textColor);
  65.             Utility.drawTextWithShadow(b, $"Own: {robinShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 112), Game1.textColor);
  66.             Utility.drawTextWithShadow(b, $"{pierrePrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 160), Game1.textColor);
  67.             Utility.drawTextWithShadow(b, pierreChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 160), Game1.textColor);
  68.             Utility.drawTextWithShadow(b, $"Own: {pierreShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 160), Game1.textColor);
  69.             Utility.drawTextWithShadow(b, $"{jojaPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 208), Game1.textColor);
  70.             Utility.drawTextWithShadow(b, jojaChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 208), Game1.textColor);
  71.             Utility.drawTextWithShadow(b, $"Own: {jojaShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 208), Game1.textColor);
  72.             Utility.drawTextWithShadow(b, $"{zuzuPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 256), Game1.textColor);
  73.             Utility.drawTextWithShadow(b, zuzuChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 256), Game1.textColor);
  74.             Utility.drawTextWithShadow(b, $"Own: {zuzuShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 256), Game1.textColor);
  75.             Utility.drawTextWithShadow(b, $"{stardropPrice}g", Game1.dialogueFont, new Vector2(menuX + 350, menuY + 304), Game1.textColor);
  76.             Utility.drawTextWithShadow(b, stardropChange + "g", Game1.dialogueFont, new Vector2(menuX + 500, menuY + 304), Game1.textColor);
  77.             Utility.drawTextWithShadow(b, $"Own: {stardropShares}", Game1.dialogueFont, new Vector2(menuX + 700, menuY + 304), Game1.textColor);
  78.            
  79.             increaseClint.draw(b);
  80.             decreaseClint.draw(b);
  81.             increaseSauce.draw(b);
  82.             decreaseSauce.draw(b);
  83.             increaseRobin.draw(b);
  84.             decreaseRobin.draw(b);
  85.             increasePierre.draw(b);
  86.             decreasePierre.draw(b);
  87.             increaseJoja.draw(b);
  88.             decreaseJoja.draw(b);
  89.             increaseZuzu.draw(b);
  90.             decreaseZuzu.draw(b);
  91.             increaseStar.draw(b);
  92.             decreaseStar.draw(b);
  93.             drawMouse(b);
  94.         }
  95.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement