public LevelEditor(eContentManager contentMgr) { contentManager = contentMgr; tileTable = new Hashtable(); players = new List<Player>(); menuTexture = contentManager.getTexture("crappyMenu"); replacement = new Artist(new Rectangle(0, 0, 40, 40), contentManager.getTexture("Tiles/engineeringBlock")); font = Globals.font; selectedTexture = contentManager.getTexture("Tiles/selectedTile"); blankTile = contentManager.getTexture("Tiles/blankTile"); tempTiles = new List<Common.Entity>(); highlightSelection = true; textureNames = new List<string>(); menu = new Menu(menuTexture); tiles = new List<Common.Entity>(); cursorPos = new Vector2(); highlightTile = new Tile(selectedTexture, new Vector2(0, 0)); int height = Globals.viewport.Height; int width = Globals.viewport.Width; int textureWidth = highlightTile.boundary.Width; for (int i = 0; i < height; i += 40) { for (int j = 0; j < width; j += 40) { tiles.Add(new Tile(blankTile, new Vector2(j, i))); } } }
public MenuHtmlBuilderTests() { Mock<HtmlTextWriter> writer = new Mock<HtmlTextWriter>(TextWriter.Null); menu = MenuTestHelper.CreateMenu(writer.Object, null); menu.Name = "Menu1"; item = new MenuItem(); builder = new MenuHtmlBuilder(menu, new Mock<IActionMethodCache>().Object); }
static void Main(string[] args) { try { Application.Init(); menu = new UI.Menu(); Application.Run(); } catch (Exception e) { Console.WriteLine("An unexpected error occured"); Console.WriteLine($"{e.Message}\n{e.StackTrace}"); } }