// private void LoadTransitions(Assembly assembly) //{ // Type[] types = assembly.GetTypes(); // for (int i = 0; i < types.Length; i++) // { // Type type = types[i]; // bool flag = this.transitionTypes.Contains(type); // if (!flag) // { // bool flag2 = typeof(Transition).IsAssignableFrom(type) && !type.IsAbstract; // if (flag2) // { // this.transitionTypes.Add(type); // } // } // } //} private void tmp() { StarTransition starTransition = new StarTransition(); RotateTransition rotateTransition = new RotateTransition(); VerticalWipeTransition verticalWipeTransition = new VerticalWipeTransition(); PageTransition pageTransition = new PageTransition(); RollTransition rollTransition = new RollTransition(); DiamondsTransition diamondsTransition = new DiamondsTransition(); VerticalBlindsTransition verticalBlindsTransition = new VerticalBlindsTransition(); HorizontalWipeTransition horizontalWipeTransition = new HorizontalWipeTransition(); FadeAndBlurTransition fadeAndBlurTransition = new FadeAndBlurTransition(); ExplosionTransition explosionTransition = new ExplosionTransition(); CheckerboardTransition checkerboardTransition = new CheckerboardTransition(); TranslateTransition translateTransition = new TranslateTransition(); RotateWipeTransition rotateWipeTransition = new RotateWipeTransition(); MeltTransition meltTransition = new MeltTransition(); DiagonalWipeTransition diagonalWipeTransition = new DiagonalWipeTransition(); FlipTransition flipTransition = new FlipTransition(); DotsTransition dotsTransition = new DotsTransition(); FadeAndGrowTransition fadeAndGrowTransition = new FadeAndGrowTransition(); DoubleRotateWipeTransition doubleRotateWipeTransition = new DoubleRotateWipeTransition(); DoorTransition doorTransition = new DoorTransition(); HorizontalBlindsTransition horizontalBlindsTransition = new HorizontalBlindsTransition(); FadeTransition fadeTransition = new FadeTransition(); }
private static Transition GetDeployLastViewTransition() { Transition trans = new TranslateTransition() { IsNewContentTopmost = true, Duration = new Duration(TimeSpan.FromSeconds(0.3)), StartPoint = new Point(1, 0), EndPoint = new Point(0, 0) }; return(trans); }
private Transition TranslateTransitionFromPrototype(Transition prototype, TranslateDirection direction) { if (prototype != null) { TranslateTransition translatePrototype = prototype as TranslateTransition; if (translatePrototype != null) { translatePrototype.SetDirection(direction); return(translatePrototype); } } return(prototype); }
public static void Init(NewKeyboardInput keyboardInput) { _keyboardInput = keyboardInput; _textBox = new TextBox(new RectangleF(Vector2.Zero, new Vector2(250, ScreenManager.ScreenHeight)), "Das ist Informationstext mit Single-Word-Wrapping und Multi-Word-Wrapping", Contents.Arial15, Color.DimGray, .2f); _hBox = new HBox(new RectangleF(Vector2.Zero, Vector2.Zero), 2, elements: new MenuElement[] { _textBox, new VBox(new RectangleF(), 0, elements: new MenuElement[] { new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.IndianRed), new Text(new RectangleF(Vector2.Zero, Vector2.Zero), "Das ist Text"), new Text(new RectangleF(Vector2.Zero, Vector2.Zero), "Das ist Text"), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new Text(new RectangleF(Vector2.Zero, Vector2.Zero), "Das ist Text"), new MenuButton(new RectangleF(Vector2.Zero, new Vector2(100, 100)), Contents.redButtonNoHover, Contents.redButtonHover), new Text(new RectangleF(Vector2.Zero, Vector2.Zero), "Das ist Text"), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new Text(new RectangleF(Vector2.Zero, Vector2.Zero), "Das ist Text"), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new MenuButton(new RectangleF(Vector2.Zero, new Vector2(100, 100)), Contents.redButtonNoHover, Contents.redButtonHover), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new MenuButton(new RectangleF(Vector2.Zero, new Vector2(100, 100)), Contents.redButtonNoHover, Contents.redButtonHover), }), new VBox(new RectangleF(), 10, elements: new MenuElement[] { new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new CheckBox(new RectangleF(1000, 100, 100, 100), false), new TextBox(new RectangleF(Vector2.Zero, new Vector2(200, 500)), "Das ist von mir geschriebener Text, der hoffentlich umgebrochen wird.", Contents.Arial18, Color.Beige, 0.2f), new DropBox(new RectangleF(0, 0, 100, 100), Color.Bisque, new Dictionary <string, Action>() { { "Head", () => { Game1.gameConsole.Log("HeadPressed"); } }, { "Second", () => { Game1.gameConsole.Log("SecondPressed"); } }, { "Third", () => { Game1.gameConsole.Log("ThirdPressed"); } }, }) }), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), new TextButton(new RectangleF(Vector2.Zero, new Vector2(100, 50)), "Text", Color.Aqua), }); RectangleF pointer = _hBox.Bounds; pointer.Location -= new Vector2(_hBox.Bounds.Width, 0); _hBox.Bounds = pointer; infoScreenTransition = new TranslateTransition(_hBox.Bounds.Location, Vector2.Zero, 2000, _hBox); }