private void UpdateLoot() { if (keyCount == 0) { statusLootLabel.Clear(); } statusLootLabel.Text = new string(MapItemCharConverter.ConvertToChar(MapItem.Key), keyCount); }
private void MazeItemClick(object sender, EventArgs e) { SkipCheckedMazeItem(); var item = (MenuItem)sender; item.Checked = true; if (currentMapWnd != null) { currentMapWnd.CurrentMapItem = (MapItem)item.Tag; statusMazeItemLabel.Text = MapItemCharConverter.ConvertToChar(currentMapWnd.CurrentMapItem).ToString(); } }
private void CanvasPaint(object sender, PaintEventArgs e) { for (var row = 0; row < mapSize.Height; row++) { for (var col = 0; col < mapSize.Width; col++) { e.Context.SetCursorPos(col, row); var printingChar = MapItemCharConverter.ConvertToChar((MapItem)MazeMap[row, col]); var colorParams = MapItemColorHelper.GetColorPointForMapItem((MapItem)MazeMap[row, col], cursorPosition == new Point(col, row)); e.Context.DrawText(printingChar, colorParams.Background, colorParams.Foreground); } } }
private void PrepareStatusBar(Size size) { colCount = size.Width; rowCount = size.Height; statusDimensionLabel.Text = $"{size.Width}x{size.Height}"; statusPositionLabel.Text = "X=1, Y=1"; statusMazeItemLabel.Text = MapItemCharConverter.ConvertToChar(MapItem.Wall).ToString(); statusSaveLabel.Foreground = Color.DarkGray; if (statusBarWasPrepared) { return; } statusBarWasPrepared = true; statusBar1.AddContent(new GlyphLabel("[↔↕]", "Move") { GlyphForeground = Color.DarkBlue }); statusBar1.AddContent(new GlyphLabel("[Space]", "Set") { GlyphForeground = Color.DarkBlue }); statusBar1.AddContent(new GlyphLabel("[Del]", "Remove") { GlyphForeground = Color.DarkBlue }); statusBar1.AddContent(statusMazeItemLabel, Dock.Right); statusBar1.AddContent(statusPositionLabel, Dock.Right); statusBar1.AddContent(statusDimensionLabel, Dock.Right); statusBar1.AddContent(statusSaveLabel, Dock.Right); SkipCheckedMazeItem(); wallMenuItem.Checked = true; foreach (var item in editMenuItem.Items.Where(x => x.Tag is MapItem)) { item.Enabled = true; } generateMenuItem.Enabled = true; clearMazeMenuItem.Enabled = true; checkPathMenuItem.Enabled = true; }