Ejemplo n.º 1
0
 /// <summary>
 /// construct a box without text yet and given font set
 /// </summary>
 public GameTextBox(string fontName)
 {
     ColorB = new ColorChangeBehavior();
     Add(ColorB);
     txt = "";
     Init(fontName);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// construct a box without text yet and given font set
        /// </summary>
        public GameTextBox(string fontName)
        {
            ColorB = new ColorChangeBehavior();
            Add(ColorB);

            txt = "";
            Init(fontName);
        }
Ejemplo n.º 3
0
 public FloatingTextMessage()
     : base("GameDescriptionFont")
 {
     ColorB = new ColorChangeBehavior();
     Add(ColorB);
     ColorB.FadeTarget = 0.0f;
     ColorB.Intensity  = 0f;
     ColorB.FadeSpeed  = 0.3f;
 }
        } // class

        public GameThumbnail(GardenItem game)
            : base((Texture2D)null, "GameThumbnail")
        {
            ColorB = new ColorChangeBehavior();
            Add(ColorB);
            Motion.Scale = GardenGamesPanel.THUMBNAIL_SCALE_UNSELECTED;
            Game         = game;
            // effect is still off if no bitmap loaded yet
            EffectEnabled = false;
            // first-time texture init
            if (DefaultTexture == null)
            {
                DefaultTexture = GardenGame.Instance.Content.Load <Texture2D>("ball-supernova2");
            }
            // use default texture as long as thumbnail not loaded yet
            Texture = DefaultTexture;
        }
 public GameThumbnail(GardenItem game)
     : base((Texture2D) null, "GameThumbnail")
 {
     ColorB = new ColorChangeBehavior();
     Add(ColorB);
     Motion.Scale = GardenGamesPanel.THUMBNAIL_SCALE_UNSELECTED;
     Game = game;
     // effect is still off if no bitmap loaded yet
     EffectEnabled = false;
     // first-time texture init
     if (DefaultTexture == null)
     {
         DefaultTexture = GardenGame.Instance.Content.Load<Texture2D>("ball-supernova2");
     }
     // use default texture as long as thumbnail not loaded yet
     Texture = DefaultTexture;
 }
        /// <summary>
        /// construct new menu
        /// </summary>
        public GameChooserMenu()
        {
            ActiveInState         = new StateBrowsingMenu();
            panel                 = new GardenGamesPanel(this);
            panel.Motion.Position = new Vector2(0.0f, 0.0f);

            // get the items to display
            gamesList = GardenGame.Instance.GameLib.GetList();

            // background
            Spritelet bg = new Spritelet("parc-by-gadl.png");

            bg.Motion.Position     = new Vector2(0.66667f, 0.22f);
            bg.DrawInfo.LayerDepth = 1f;
            //bg.DrawInfo.DrawColor = new Color(0.3f, 0.3f, 0.3f, 0.3f);
            // bg color 169, 157, 241
            bg.Motion.Add(new MyFuncyModifier(delegate(float v) { return(v / 70.0f); }, "Rotate"));
            bg.Motion.Add(new MyFuncyModifier(delegate(float v) { return(0.45f + 0.75f * (float)Math.Sqrt(v / 430.0)); }, "Scale"));
            bg.Motion.TargetPos      = new Vector2(0.66667f, 0.9f);
            bg.Motion.TargetPosSpeed = 0.004f;
            Add(bg);
            background = bg;

            // logo
            Spritelet logo = new Spritelet("igglogo");

            Add(logo);
            logo.DrawInfo.Alpha  = 0.7f;
            logo.Motion.Scale    = 0.55f;
            logo.Motion.Position = new Vector2(Screen.AspectRatio - 0.24f, 0.04f);
            ColorChangeBehavior fadeIn = new ColorChangeBehavior();

            logo.Add(fadeIn);
            fadeIn.Intensity = 0f;
            fadeIn.FadeToTarget(0.9344f, 6f);
            logo.Motion.Add(new SineModifier("ScaleModifier", 0.03124f, 0.07344f, 1.0f));

            // set my panel and games list
            Add(panel);
            panel.OnUpdateList(gamesList);
        }
        /// <summary>
        /// construct new menu
        /// </summary>
        public GameChooserMenu()
        {
            ActiveInState = new StateBrowsingMenu();
            panel = new GardenGamesPanel(this);
            panel.Motion.Position = new Vector2(0.0f, 0.0f);

            // get the items to display
            gamesList = GardenGame.Instance.GameLib.GetList();

            // background
            Spritelet bg = new Spritelet("parc-by-gadl.png");
            bg.Motion.Position = new Vector2(0.66667f, 0.22f);
            bg.DrawInfo.LayerDepth = 1f;
            //bg.DrawInfo.DrawColor = new Color(0.3f, 0.3f, 0.3f, 0.3f);
            // bg color 169, 157, 241
            bg.Motion.Add(new MyFuncyModifier( delegate(float v) { return v/70.0f; }, "Rotate"));
            bg.Motion.Add(new MyFuncyModifier(delegate(float v) { return (0.45f + 0.75f * (float) Math.Sqrt(v/430.0)); }, "Scale"));
            bg.Motion.TargetPos = new Vector2(0.66667f, 0.9f);
            bg.Motion.TargetPosSpeed = 0.004f;
            Add(bg);
            background = bg;

            // logo
            Spritelet logo = new Spritelet("igglogo");
            Add(logo);
            logo.DrawInfo.Alpha = 0.7f;
            logo.Motion.Scale = 0.55f;
            logo.Motion.Position = new Vector2(Screen.AspectRatio - 0.24f, 0.04f);
            ColorChangeBehavior fadeIn = new ColorChangeBehavior();
            logo.Add(fadeIn);
            fadeIn.Intensity = 0f;
            fadeIn.FadeToTarget(0.9344f, 6f);
            logo.Motion.Add(new SineModifier("ScaleModifier", 0.03124f, 0.07344f, 1.0f));

            // set my panel and games list
            Add(panel);
            panel.OnUpdateList(gamesList);
        }