// Event handler for RLNET's Update event private static void OnRootConsoleUpdate(object sender, UpdateEventArgs e) { // Set background color and text for each console // so that we can verify they are in the correct positions _mapConsole.SetBackColor(0, 0, _mapWidth, _mapHeight, RLColor.Black); _mapConsole.Print(1, 1, "Map", RLColor.White); _mapConsole.Set(2, 2, RLColor.Red, RLColor.Green, 'L'); RLCell cell = new RLCell(RLColor.Yellow, RLColor.Brown, 'X'); _mapConsole.Set(3, 3, cell); _messageConsole.SetBackColor(0, 0, _messageWidth, _messageHeight, RLColor.Gray); _messageConsole.Print(1, 1, "Messages", RLColor.White); _statConsole.SetBackColor(0, 0, _statWidth, _statHeight, RLColor.Brown); _statConsole.Print(1, 1, "Stats", RLColor.White); _inventoryConsole.SetBackColor(0, 0, _inventoryWidth, _inventoryHeight, RLColor.Cyan); _inventoryConsole.Print(1, 1, "Inventory", RLColor.White); RLKeyPress keyPress = _rootConsole.Keyboard.GetKeyPress(); if (keyPress != null) { _mapConsole.Print(10, 10, "Key: " + keyPress.ToString(), RLColor.White); } else { var str = _rootConsole.Mouse.X + "," + _rootConsole.Mouse.Y; _mapConsole.Print(10, 10, "Mouse: " + str, RLColor.White); } }