Ejemplo n.º 1
0
        protected void ListMenuItemsSelected(List <string> Items)
        {
            if (Items == null)
            {
                return;
            }

            string Name;

            for (int I = 0; I < Items.Count; I++)
            {
                switch (ItemSelectionChoice)
                {
                case ItemSelectionChoices.Background:
                    Name = Items[I].Substring(0, Items[0].Length - 4).Substring(38);

                    Texture2D NewBackground = BackgroundViewer.content.Load <Texture2D>("Animations/Background Sprites/" + Name);
                    ActiveBackgroundObject.sprBackground  = NewBackground;
                    ActiveBackgroundObject.BackgroundPath = Name;
                    BackgroundViewer.ChangeTexture(NewBackground);
                    break;

                case ItemSelectionChoices.NewLink:
                    Name = Items[I].Substring(0, Items[0].Length - 4).Substring(38);
                    AnimationBackgroundLink NewChain = new AnimationBackgroundLink(Name, BackgroundLinkViewer.content);
                    ActiveBackgroundObject.ListBackgroundLink.Add(NewChain);
                    lstBackgroundChain.Items.Add(NewChain);
                    BackgroundLinkViewer.ChangeTexture(NewChain.sprBackground);
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private void lstBackgroundChain_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstBackgroundChain.SelectedIndex < 0)
            {
                return;
            }

            ActiveBackgroundLink = ActiveBackgroundObject.ListBackgroundLink[lstBackgroundChain.SelectedIndex];
            BackgroundLinkViewer.ChangeTexture(ActiveBackgroundLink.sprBackground);
            pgBackgroundLink.SelectedObject = ActiveBackgroundLink;
        }