private void panelDBLayerList_MouseDown(object sender, MouseEventArgs e) { PanelCustom panel = (PanelCustom)sender; int start = vScrollBarMapLayerList.Value; int index = (e.Y / this.FontHeight) + start; if (tileMap.layerList.Count <= 0) { return; } if (index >= tileMap.layerList.Count) { return; } if (e.Button == MouseButtons.Left) { SelectMapLayer(index); } label11.Text = currentMapLayer.ToString() + ": " + tileMap.layerList.IndexOf(currentMapLayer).ToString(); panel.Invalidate(); panelCustomMapWindow.Invalidate(); }
private void panelDBTileLibList_MouseDown(object sender, MouseEventArgs e) { PanelCustom panel = (PanelCustom)sender; int start = vScrollBarTileLibList.Value; int index = (e.Y / this.FontHeight) + start; if (tileLibs.Count <= 0) { return; } if (index >= tileLibs.Count) { return; } if (e.Button == MouseButtons.Left) { SelectTileLib(index); textBoxCustomTileWidth.Text = currentTileLib.cellWidth.ToString(); textBoxCustomTileHeight.Text = currentTileLib.cellHeight.ToString(); } panel.Invalidate(); }
private void panelDBTileLibList_MouseLeave(object sender, EventArgs e) { PanelCustom panel = (PanelCustom)sender; panel.Invalidate(); }
private void panelCustomLayerList_MouseMove(object sender, MouseEventArgs e) { PanelCustom panel = (PanelCustom)sender; panel.Invalidate(); }