示例#1
0
        public void AddPreviewsToScene()
        {
            //Room Button Preview
            shopRiderPreview      = new Rider(Facing.Right, player, Parameter.ScreenCenter + new Vector2(-280, -40));
            inventoryRiderPreview = new Rider(Facing.Right, player, Parameter.ScreenCenter + new Vector2(-280, -40));

            inventoryRiderPreview.Hide();

            avatarPreviewSpriteText = new SpriteText(FontTextType.Consolas10, Language.PreviewTextAvatarShop,
                                                     Color.White, Alignment.Left, DepthParameter.InterfaceButton,
                                                     Parameter.ScreenCenter - new Vector2(385, 110), Color.Black);

            spriteTextList.Add(avatarPreviewSpriteText);

            //In-Game (mobile) preview
            shopInGamePreview      = new InGamePreview(Parameter.ScreenCenter + new Vector2(-290, 80));
            inventoryInGamePreview = new InGamePreview(Parameter.ScreenCenter + new Vector2(-290, 80));
            inventoryInGamePreview.Hide();

            inGamePreviewSpriteText = new SpriteText(FontTextType.Consolas10, Language.InGamePreviewTextAvatarShop,
                                                     Color.White, Alignment.Left, DepthParameter.InterfaceButton,
                                                     Parameter.ScreenCenter - new Vector2(385, -17), Color.Black);

            spriteTextList.Add(inGamePreviewSpriteText);
        }
示例#2
0
        /// <summary>
        /// Changes the foreground, the search filters and the rendered rider
        /// preview when clicked.
        /// </summary>
        private void InventoryTabButtonAction(object sender)
        {
            foreground1.SetTransparency(0);
            foreground2.SetTransparency(1);

            shopRiderPreview.Hide();
            inventoryRiderPreview.Show();

            shopInGamePreview.Hide();
            inventoryInGamePreview.Show();

            avatarPreviewSpriteText.Text = Language.PreviewTextAvatarShopEquipped;
            inGamePreviewSpriteText.Text = Language.InGamePreviewTextAvatarShopEquipped;

            searchFilter.IsRenderingInventory = true;
            UpdateFilter(searchFilter.AvatarCategory, 0);

            buyButton.Disable(true);
            tryButton.Disable(true);
        }