private void objEditButton_Click(object sender, System.EventArgs e) { frmEditLayer EditLayer = new frmEditLayer(); cTileLayer Layer = (cTileLayer)mlstTileLayers[mlSelectedLayer]; EditLayer.objNameText.Text = Layer.msName; EditLayer.objZText.Text = Layer.mfZ.ToString(); EditLayer.objLitBox.SelectedIndex = Layer.mbLit?1:0; EditLayer.objCollideBox.SelectedIndex = Layer.mbCollide?1:0; EditLayer.ShowDialog(); if (EditLayer.mbOkWasPressed) { Layer.msName = EditLayer.objNameText.Text; Layer.mfZ = (float)Convert.ToDouble(EditLayer.objZText.Text); Layer.mbLit = EditLayer.objLitBox.SelectedIndex == 1; Layer.mbCollide = EditLayer.objCollideBox.SelectedIndex == 1; UpdateLayers(); objLayerList.SelectedIndex = mlSelectedLayer; } EditLayer.Dispose(); }
private void objNewButton_Click(object sender, System.EventArgs e) { cTileLayer LastLayer = (cTileLayer)mlstTileLayers[mlSelectedLayer]; frmEditLayer EditLayer = new frmEditLayer(); EditLayer.objNameText.Text = "Untitled"; EditLayer.objZText.Text = (LastLayer.mfZ + 1).ToString(); EditLayer.objLitBox.SelectedIndex = 1; EditLayer.objCollideBox.SelectedIndex = 1; EditLayer.ShowDialog(); if (EditLayer.mbOkWasPressed) { AddLayer(EditLayer.objNameText.Text, (float)Convert.ToDouble(EditLayer.objZText.Text), EditLayer.objCollideBox.SelectedIndex == 1, EditLayer.objLitBox.SelectedIndex == 1, LastLayer.mlTileSize, mlSelectedLayer + 1); mlSelectedLayer = mlSelectedLayer + 1; objLayerList.SelectedIndex = mlSelectedLayer; } EditLayer.Dispose(); }
private void objEditButton_Click(object sender, System.EventArgs e) { frmEditLayer EditLayer = new frmEditLayer(); cTileLayer Layer = (cTileLayer)mlstTileLayers[mlSelectedLayer]; EditLayer.objNameText.Text = Layer.msName; EditLayer.objZText.Text = Layer.mfZ.ToString(); EditLayer.objLitBox.SelectedIndex = Layer.mbLit?1:0; EditLayer.objCollideBox.SelectedIndex = Layer.mbCollide?1:0; EditLayer.ShowDialog(); if(EditLayer.mbOkWasPressed) { Layer.msName = EditLayer.objNameText.Text; Layer.mfZ = (float)Convert.ToDouble(EditLayer.objZText.Text); Layer.mbLit = EditLayer.objLitBox.SelectedIndex==1; Layer.mbCollide = EditLayer.objCollideBox.SelectedIndex==1; UpdateLayers(); objLayerList.SelectedIndex = mlSelectedLayer; } EditLayer.Dispose(); }
private void objNewButton_Click(object sender, System.EventArgs e) { cTileLayer LastLayer = (cTileLayer)mlstTileLayers[mlSelectedLayer]; frmEditLayer EditLayer = new frmEditLayer(); EditLayer.objNameText.Text = "Untitled"; EditLayer.objZText.Text = (LastLayer.mfZ+1).ToString(); EditLayer.objLitBox.SelectedIndex = 1; EditLayer.objCollideBox.SelectedIndex = 1; EditLayer.ShowDialog(); if(EditLayer.mbOkWasPressed) { AddLayer(EditLayer.objNameText.Text,(float)Convert.ToDouble(EditLayer.objZText.Text), EditLayer.objCollideBox.SelectedIndex==1,EditLayer.objLitBox.SelectedIndex==1, LastLayer.mlTileSize,mlSelectedLayer+1); mlSelectedLayer = mlSelectedLayer+1; objLayerList.SelectedIndex = mlSelectedLayer; } EditLayer.Dispose(); }