/// <summary> /// Constructor. /// </summary> public ParticleDemo(DemoGame game) : base(game) { Entries.Add(spawnRate = new FloatMenuEntry() { Text = "spawn rate" }); // This menu option for changing the resolution is currently disabled, // because the image scaler feature is not yet implemented in the CTP release. /* * Entries.Add(new ResolutionMenu(game.graphics)); */ Entries.Add(new MenuEntry { Text = "back", Clicked = delegate { // Before we quit back out of this menu, reset back to the default resolution. if (game.Graphics.PreferredBackBufferWidth != 480) { game.Graphics.PreferredBackBufferWidth = 480; game.Graphics.PreferredBackBufferHeight = 800; game.Graphics.ApplyChanges(); } Game.SetActiveMenu(0); } }); }
/// <summary> /// Constructor. /// </summary> public EnvmapDemo(DemoGame game) : base(game) { Entries.Add(amount = new FloatMenuEntry() { Text = "envmap" }); Entries.Add(fresnel = new FloatMenuEntry() { Text = "fresnel" }); Entries.Add(specular = new FloatMenuEntry() { Text = "specular" }); Entries.Add(new MenuEntry { Text = "back", Clicked = delegate { Game.SetActiveMenu(0); } }); }