public void Setup() { var screen = new WidgetScreen("Test"); _tree = new Tree <string>(screen); _tree.LoadContent(screen); }
public void Setup() { var resolution = new Mock <IResolution>(); resolution.Setup(x => x.ScreenArea).Returns(new Rectangle(0, 0, 1280, 720)); Resolution.Init(resolution.Object); var screen = new WidgetScreen("test screen"); _drop = new Dropdown <string>(screen); }
public void CloneDropdownItem() { var screen = new WidgetScreen("test screen"); var drop = new Dropdown <string>(screen); drop.Vertical = VerticalAlignment.Center; drop.Horizontal = HorizontalAlignment.Center; drop.Size = new Vector2(350, 128); var dropitem = new DropdownItem <string>("catpants", drop) { Vertical = VerticalAlignment.Center, Horizontal = HorizontalAlignment.Center, Size = new Vector2(350, 128) }; var label = new Label("catpants", _font.Object) { Vertical = VerticalAlignment.Center, Horizontal = HorizontalAlignment.Center }; dropitem.AddItem(label); //layout.AddItem(original); //Assert.AreEqual(20, original.Size.X); //Assert.AreEqual(30, original.Size.Y); //Assert.AreEqual(40, original.Position.X); //Assert.AreEqual(50, original.Position.Y); //Assert.AreEqual(HorizontalAlignment.Center, original.Horizontal); //Assert.AreEqual(VerticalAlignment.Center, original.Vertical); //Assert.AreEqual(.5f, original.Scale); //Assert.AreEqual(false, original.DrawWhenInactive); //Assert.AreEqual(1000, original.Layer); //Assert.AreEqual(100, original.Padding.X); //Assert.AreEqual(200, original.Padding.Y); }