mirror of
https://github.com/AdAstra-LD/DS-Pokemon-Rom-Editor.git
synced 2026-05-12 15:04:55 -05:00
Update Main Window.cs
minor fixes
This commit is contained in:
parent
4bfb6c5f84
commit
b7182dbc0a
|
|
@ -2953,7 +2953,7 @@ namespace DSPRE {
|
|||
|
||||
}
|
||||
private void buildingsListBox_SelectedIndexChanged(object sender, EventArgs e) {
|
||||
if (disableHandlers)
|
||||
if (disableHandlers || buildIndexComboBox.SelectedIndex < 0)
|
||||
return;
|
||||
disableHandlers = true;
|
||||
|
||||
|
|
@ -3701,22 +3701,24 @@ namespace DSPRE {
|
|||
#region Subroutines
|
||||
private void centerEventviewOnEntities() {
|
||||
disableHandlers = true;
|
||||
if (currentEvFile.overworlds.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.overworlds[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.overworlds[0].yMatrixPosition;
|
||||
} else if (currentEvFile.warps.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.warps[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.warps[0].yMatrixPosition;
|
||||
} else if (currentEvFile.spawnables.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.spawnables[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.spawnables[0].yMatrixPosition;
|
||||
} else if (currentEvFile.triggers.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.triggers[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.triggers[0].yMatrixPosition;
|
||||
} else {
|
||||
eventMatrixXUpDown.Value = 0;
|
||||
eventMatrixYUpDown.Value = 0;
|
||||
}
|
||||
try {
|
||||
if (currentEvFile.overworlds.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.overworlds[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.overworlds[0].yMatrixPosition;
|
||||
} else if (currentEvFile.warps.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.warps[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.warps[0].yMatrixPosition;
|
||||
} else if (currentEvFile.spawnables.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.spawnables[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.spawnables[0].yMatrixPosition;
|
||||
} else if (currentEvFile.triggers.Count > 0) {
|
||||
eventMatrixXUpDown.Value = currentEvFile.triggers[0].xMatrixPosition;
|
||||
eventMatrixYUpDown.Value = currentEvFile.triggers[0].yMatrixPosition;
|
||||
} else {
|
||||
eventMatrixXUpDown.Value = 0;
|
||||
eventMatrixYUpDown.Value = 0;
|
||||
}
|
||||
} catch (ArgumentOutOfRangeException) { }
|
||||
disableHandlers = false;
|
||||
}
|
||||
private void centerEventViewOnSelectedEvent_Click(object sender, EventArgs e) {
|
||||
|
|
@ -4465,6 +4467,9 @@ namespace DSPRE {
|
|||
return true;
|
||||
}
|
||||
private void OWTypeChanged(object sender, EventArgs e) {
|
||||
if (overworldsListBox.SelectedIndex < 0)
|
||||
return;
|
||||
|
||||
if (normalRadioButton.Checked == true ) {
|
||||
owScriptNumericUpDown.Enabled = true;
|
||||
owSpecialGroupBox.Enabled = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user