private void EClipComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox comboBox = (ComboBox)sender; IntegerTransaction transaction = new IntegerTransaction("EClip property", clip, (string)comboBox.Tag, eclipID, 2, comboBox.SelectedIndex - 1); transactionManager.ApplyTransaction(transaction); }
private void SoundComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox control = (ComboBox)sender; IntegerTransaction transaction = new IntegerTransaction("WClip property", clip, (string)control.Tag, wclipID, 3, control.SelectedIndex); transactionManager.ApplyTransaction(transaction); }
private void VClipSound_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox comboBox = (ComboBox)sender; IntegerTransaction transaction = new IntegerTransaction("VClip sound", clip, (string)comboBox.Tag, vclipID, 1, comboBox.SelectedIndex - 1); transactionManager.ApplyTransaction(transaction); }
private void WeaponComboBoxNormal_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked) { return; } ComboBox comboBox = (ComboBox)sender; IntegerTransaction transaction = new IntegerTransaction("Weapon property", weapon, (string)comboBox.Tag, weaponID, tabPage, comboBox.SelectedIndex); transactionManager.ApplyTransaction(transaction); }
private void RobotCheckBoxInteger_CheckedChanged(object sender, EventArgs e) { //hack to convert bool input into not bool output if (isLocked) { return; } CheckBox input = (CheckBox)sender; IntegerTransaction transaction = new IntegerTransaction("Robot flag", robot, (string)input.Tag, robotid, tabPage, input.Checked ? 1 : 0); transactionManager.ApplyTransaction(transaction); }
private void RobotAI_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked) { return; } int bosstype = cbRobotAI.SelectedIndex; //robot.Behavior = (RobotAIType)(bosstype + 0x80); IntegerTransaction transaction = new IntegerTransaction("Robot property", robot, "Behavior", robotid, tabPage, bosstype + 0x80); transactionManager.ApplyTransaction(transaction); }
//I hate everything right now //Needed to have values that are -1 the specified value private void RobotHitVClipComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox sendingControl = (ComboBox)sender; string tagstr = (string)sendingControl.Tag; int value = sendingControl.SelectedIndex; IntegerTransaction transaction = new IntegerTransaction("Robot property", robot, (string)sendingControl.Tag, robotid, tabPage, value - 1); transactionManager.ApplyTransaction(transaction); }
private void RemapSingleImage_Click(object sender, EventArgs e) { Button button = (Button)sender; ImageSelector selector = new ImageSelector(piggyFile, palette, false); IntegerTransaction transaction; int start = 0; switch (button.Tag) { case "1": int.TryParse(txtWeaponCockpitImage.Text, out start); break; case "2": int.TryParse(txtWeaponCockpitImageh.Text, out start); break; case "3": int.TryParse(txtWeaponStaticSprite.Text, out start); break; } selector.Selection = start; if (selector.ShowDialog() == DialogResult.OK) { isLocked = true; int value = selector.Selection; switch (button.Tag) { case "1": txtWeaponCockpitImage.Text = (value).ToString(); transaction = new IntegerTransaction("Weapon property", weapon, "CockpitPicture", weaponID, tabPage, value); transactionManager.ApplyTransaction(transaction); break; case "2": txtWeaponCockpitImageh.Text = (value).ToString(); transaction = new IntegerTransaction("Weapon property", weapon, "HiresCockpitPicture", weaponID, tabPage, value); transactionManager.ApplyTransaction(transaction); break; case "3": txtWeaponStaticSprite.Text = (value).ToString(); transaction = new IntegerTransaction("Weapon property", weapon, "Bitmap", weaponID, tabPage, value); transactionManager.ApplyTransaction(transaction); break; } isLocked = false; } }
private void EClipProperty_TextChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } TextBox textBox = (TextBox)sender; int value; if (int.TryParse(textBox.Text, out value)) { IntegerTransaction transaction = new IntegerTransaction("EClip property", clip, (string)textBox.Tag, eclipID, 2, value); transactionManager.ApplyTransaction(transaction); } }
private void RobotProperty_TextChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } TextBox textBox = (TextBox)sender; int value; if (int.TryParse(textBox.Text, out value)) { IntegerTransaction transaction = new IntegerTransaction("Robot property", robot, (string)textBox.Tag, robotid, tabPage, value); transactionManager.ApplyTransaction(transaction); } }
private void ModelSpinner_ValueChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } NumericUpDown spinner = (NumericUpDown)sender; int value = (int)spinner.Value; IntegerTransaction transaction = new IntegerTransaction("Model property", model, (string)spinner.Tag, modelID, tabPage, value); transactionManager.ApplyTransaction(transaction); }
private void txtTexSlideU_TextChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } double value; TextBox control = (TextBox)sender; if (double.TryParse(control.Text, out value)) { TMAPInfo tmapinfo = datafile.TMapInfo[textureID]; IntegerTransaction transaction = new IntegerTransaction("TMapInfo property", tmapinfo, (string)control.Tag, textureID, 0, (int)(value * 256)); transactionManager.ApplyTransaction(transaction); } }
private void RobotBoss_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked) { return; } int bosstype = cmRobotBoss.SelectedIndex; if (bosstype >= 3) { bosstype += 18; } //robot.BossFlag = (RobotBossType)bosstype; IntegerTransaction transaction = new IntegerTransaction("Robot property", robot, "BossFlag", robotid, tabPage, bosstype); transactionManager.ApplyTransaction(transaction); }
private void WeaponRenderMode_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } int weapontype = cbWeaponRenderMode.SelectedIndex; if (weapontype > 3) { weapontype = 255; } IntegerTransaction transaction = new IntegerTransaction("Weapon render type", weapon, (string)cbWeaponRenderMode.Tag, weaponID, tabPage, weapontype); transactionManager.ApplyTransaction(transaction); UpdateWeaponGraphicControls(); }
private void ModelComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox control = (ComboBox)sender; int value = control.SelectedIndex; //hack because low detail is 1 based but dying/dead model nums are 0 based if (control != cbModelLowDetail) { value--; } IntegerTransaction transaction = new IntegerTransaction("Model property", model, (string)control.Tag, modelID, tabPage, value); transactionManager.ApplyTransaction(transaction); }
//Updators private void RobotComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (isLocked || transactionManager.TransactionInProgress) { return; } ComboBox sendingControl = (ComboBox)sender; string tagstr = (string)sendingControl.Tag; int value = sendingControl.SelectedIndex; IntegerTransaction transaction = new IntegerTransaction("Robot property", robot, (string)sendingControl.Tag, robotid, tabPage, value); transactionManager.ApplyTransaction(transaction); //[ISB] ugly hack, show new value of joints and animation checkbox if (hxmFile != null) { isLocked = true; UpdateRobotAnimation(); isLocked = false; } }