Пример #1
0
        public void DrawSelectedItem(SpriteBatch spriteBatch, Furni item, float depth = 0.92f)
        {
            if (item.CanTrade())
            {
                canTrade.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, 0), depth);
            }
            else
            {
                cantTrade.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, 0), depth);
            }

            if (item.CanRecycle())
            {
                canRecycle.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, 3 + canTrade.GetTexture().Height), depth);
            }
            else
            {
                cantRecycle.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, 3 + canTrade.GetTexture().Height), depth);
            }

            if (item.CanTrade())
            {
                amountTrade.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X + canTrade.GetTexture().Width + 3, 0), depth);
            }
            if (item.CanRecycle())
            {
                amountRecycle.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X + canRecycle.GetTexture().Width + 3, 3 + canTrade.GetTexture().Height), depth);
            }

            selectedItem.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, itemDisplay.GetSize().Y - placeItemButton.GetSize().Y - selectedItem.measureString().Y - 10), depth);
            placeItemButton.Draw(spriteBatch, itemDisplay.GetPosition() + new Vector2i(12 + itemDisplay.GetSize().X, itemDisplay.GetSize().Y - placeItemButton.GetSize().Y), depth);
        }
Пример #2
0
        internal void DrawVoucher(SpriteBatch spriteBatch)
        {
            Vector2i specialOffset = new Vector2i(10, bannerOffset + headerHeight + 6 + rootContainer.GetHeight());

            voucherBackdrop.Draw(spriteBatch, offset + position + new Vector2i(200, 399) + specialOffset, 0.91f);
            textField.Draw(spriteBatch, offset + position + new Vector2i(200 + 10, 399 + 25) + specialOffset, 0.92f);
            voucherButton.Draw(spriteBatch, offset + position + new Vector2i(200 + 269, 399 + 25) + specialOffset, 0.92f);
        }
Пример #3
0
        public void DrawNoItems(SpriteBatch spriteBatch, float depth = 0.92f)
        {
            Vector2i bodySize = new Vector2i(size.X, size.Y - (headerHeight + rootContainer.GetHeight()));

            noItemsImg.Draw(spriteBatch, position +
                            new Vector2i((bodySize.X / 4) - (noItemsImg.GetTexture().Width / 2), (bodySize.Y / 2) - (noItemsImg.GetTexture().Height / 2)) +
                            new Vector2i(0, headerHeight + rootContainer.GetHeight()), depth);

            noItemsHead.Draw(spriteBatch, position +
                             new Vector2i(0, (bodySize.Y / 2) - (noItemsImg.GetTexture().Height / 2)) +
                             new Vector2i((bodySize.X / 2) + 20, headerHeight + rootContainer.GetHeight()), depth);

            noItemsBody.Draw(spriteBatch, position +
                             new Vector2i(0, (bodySize.Y / 2) - (noItemsImg.GetTexture().Height / 2)) +
                             new Vector2i((bodySize.X / 2) + 20, noItemsHead.measureString().Y + headerHeight + rootContainer.GetHeight()), depth);

            openCataButton.Draw(spriteBatch, position + new Vector2i(0, bodySize.Y - openCataButton.GetSize().Y - 10) +
                                new Vector2i((bodySize.X / 2) + 20, headerHeight + rootContainer.GetHeight()), depth);
        }
Пример #4
0
        internal void DrawItemIsSelected(SpriteBatch spriteBatch, IPageItem item, float depth = 0.92f)
        {
            if (item.CanGift())
            {
                present.Draw(spriteBatch, position + new Vector2i(207, headerHeight + rootContainer.GetHeight() + 5 + 90 + 439), depth);
            }
            else
            {
                presentDisabled.Draw(spriteBatch, position + new Vector2i(207, headerHeight + rootContainer.GetHeight() + 5 + 90 + 439), depth - 0.01f);
                presentDisabledText.Draw(spriteBatch, new Vector2i((presentDisabled.Size.X / 2) - (presentDisabledText.measureString().X / 2), (presentDisabled.Size.Y / 2) - (presentDisabledText.measureString().Y / 2)) + position + new Vector2i(207, headerHeight + rootContainer.GetHeight() + 5 + 90 + 439), depth);
            }
            buy.Draw(spriteBatch, position + new Vector2i(387, headerHeight + rootContainer.GetHeight() + 5 + 90 + 439), depth);

            Amount.Draw(spriteBatch, position + new Vector2i(207, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (Amount.measureString().Y / 2))), depth);
            Price.Draw(spriteBatch, position + new Vector2i(387, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (Price.measureString().Y / 2))), depth);

            amountText.Draw(spriteBatch, position + new Vector2i(207 + Amount.measureString().X + 20, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (amountText.measureString().Y / 2))), depth);

            if (item.IsDubbelPriced())
            {
                priceOneText.Draw(spriteBatch, position + new Vector2i(536 - priceCredits.GetTexture().Width - priceTwoText.measureString().X - 5 - priceOneText.measureString().X, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceOneText.measureString().Y / 2))), depth);
                priceCredits.Draw(spriteBatch, position + new Vector2i(536 - priceCredits.GetTexture().Width - priceTwoText.measureString().X, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceCredits.GetTexture().Height / 2))), depth);


                priceTwoText.Draw(spriteBatch, position + new Vector2i(536 - priceTwoText.measureString().X, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceTwoText.measureString().Y / 2))), depth);
                switch (item.GetPricesTypes()[1])
                {
                case PriceTypes.DUCKETS:
                    priceDuckets.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceDuckets.GetTexture().Height / 2))), depth);
                    break;

                case PriceTypes.DIAMONDS:
                    priceDiamonds.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceDiamonds.GetTexture().Height / 2))), depth);
                    break;

                case PriceTypes.GOTW:
                    priceGotw.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceGotw.GetTexture().Height / 2))), depth);
                    break;

                default:
                    Logger.Error("Unknown price type:", item.GetPricesTypes()[0].ToString());
                    break;
                }
            }
            else
            {
                priceOneText.Draw(spriteBatch, position + new Vector2i(536 - priceOneText.measureString().X, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceOneText.measureString().Y / 2))), depth);

                switch (item.GetPricesTypes()[0])
                {
                case PriceTypes.CREDITS:
                    priceCredits.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceCredits.GetTexture().Height / 2))), depth);
                    break;

                case PriceTypes.DUCKETS:
                    priceDuckets.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceDuckets.GetTexture().Height / 2))), depth);
                    break;

                case PriceTypes.DIAMONDS:
                    priceDiamonds.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceDiamonds.GetTexture().Height / 2))), depth);
                    break;

                case PriceTypes.GOTW:
                    priceGotw.Draw(spriteBatch, position + new Vector2i(538, headerHeight + rootContainer.GetHeight() + 5 + 90 + 406 + ((33 / 2) - (priceGotw.GetTexture().Height / 2))), depth);
                    break;

                default:
                    Logger.Error("Unknown price type:", item.GetPricesTypes()[0].ToString());
                    break;
                }
            }
        }