private void render_LeftClick(object sender, MouseButtonEventArgs e) { if (RenderIsDragging) { return; } var result = render.GetOBJ(sender, e); if (result == null) { return; } if ((ModifierKeys & Keys.Shift) == Keys.Shift && CurList.Contains(result)) { ObjectsListBox.SelectedIndices.Add(CurList.IndexOf(result)); } else { ObjList list = null; if (EditingList) { list = CurList.Contains(result) ? CurList : null; } else { list = LoadedLevel.FindListByObj(result); } if (list != null) { CurListName = list.name; ObjectsListBox.ClearSelected(); ObjectsListBox.SelectedIndex = list.IndexOf(result); } } }
public void SelectObject(ObjList List, LevelObj obj) { if (EditingList) { if (List != CurList) { return; } } else { comboBox1.Text = List.name; } ObjectsListBox.ClearSelected(); ObjectsListBox.SelectedIndex = List.IndexOf(obj); }