Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        private void panelDBTileLibList_MouseLeave(object sender, EventArgs e)
        {
            PanelCustom panel = (PanelCustom)sender;

            panel.Invalidate();
        }
Exemplo n.º 4
0
        private void panelCustomLayerList_MouseMove(object sender, MouseEventArgs e)
        {
            PanelCustom panel = (PanelCustom)sender;

            panel.Invalidate();
        }