Example #1
0
 public void Update(GameTime gameTime)
 {
     if (Selected == true)
     {
         if (fadeEffect == null)
             fadeEffect = new FadeEffect(0.5f, 1.0f, 0.5f);
         imageselected.Alpha = fadeEffect.Update(gameTime);
     }
     else
     {
         imageselected.Alpha = 1.0f;
     }
 }
Example #2
0
 public void Update(GameTime gameTime)
 {
     if (Selected == true)
     {
         if (fadeEffect == null)
         {
             fadeEffect = new FadeEffect(0.5f, 1.0f, 0.5f);
         }
         imageselected.Alpha = fadeEffect.Update(gameTime);
     }
     else
     {
         imageselected.Alpha = 1.0f;
     }
 }
Example #3
0
        public void LoadContent(ContentManager Content)
        {
            this.Content = new ContentManager(Content.ServiceProvider, "Content");
            currentscreen.LoadContent();

            if (fade == null)
            {
                fade = new Image("Images/black");
            }
            if (fadeEffect == null)
            {
                fadeEffect = new FadeEffect(2.0f, 0.0f);
            }
            fade.SourceRect = new Rectangle(0, 0, (int)Dimensions.X, (int)Dimensions.Y);
            fade.LoadContent(0, 0, true, 1.0f);
        }
Example #4
0
        public void LoadContent(ContentManager Content)
        {
            this.Content = new ContentManager(Content.ServiceProvider, "Content");
            currentscreen.LoadContent();

            if (fade == null)
                fade = new Image("Images/black");
            if (fadeEffect == null)
                fadeEffect = new FadeEffect(2.0f, 0.0f);
            fade.SourceRect = new Rectangle(0, 0, (int)Dimensions.X, (int)Dimensions.Y);
            fade.LoadContent( 0, 0, true, 1.0f);
        }
Example #5
0
        public Control1_Item(int itemID, string itemname, string itemsetting, int fieldID, int maxindex)
        {
            this.fieldID      = fieldID;
            ItemID            = itemID;
            this.itemtitle    = new cText(itemname + ":", "DryGood");
            this.itemsetting  = new cText(itemsetting, "DryGood");
            arrow_left        = new Image("OptionsScreen/arrow_left");
            arrow_right       = new Image("OptionsScreen/arrow_right");
            arrow_left.Color  = Color.Black;
            arrow_right.Color = Color.Black;
            fadeeffect        = new FadeEffect(1.5f, 1.0f, 0.3f);
            currentSelected   = selection.arrowleft;
            this.maxIndex     = maxindex;
            Random random = new Random();

            if (ScreenManager.Instance.Controllers[0].characterInfo.NotFound == true)
            {
                currentIndex = random.Next(0, maxindex);
            }
            else
            {
                if (fieldID == 1)
                {
                    switch (itemID)
                    {
                    case 0:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Gender;
                        break;

                    case 1:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Skincolor;
                        break;
                    }
                }
                else if (fieldID == 2)
                {
                    switch (itemID)
                    {
                    case 0:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Head;
                        break;

                    case 1:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Shirt;
                        break;

                    case 2:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Belt;
                        break;

                    case 3:
                        currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.Pants;
                        break;
                    }
                }
                else if (fieldID == 0)
                {
                    currentIndex = ScreenManager.Instance.Controllers[0].characterInfo.NameIndex;
                }
            }
        }