internal void OnActionDelete(ActionDrawer actionDrawer) { selectedActionIndex = -1; Data.Actions.Remove(actionDrawer.Data); actionDrawers.Remove(actionDrawer); ParentDrawer.Window.Repaint(); }
internal void OnActionAdded(ActionData actionData) { Data.Actions.Add(actionData); ActionDrawer itemDrawer = new ActionDrawer(this); itemDrawer.SetData(actionData); actionDrawers.Add(itemDrawer); ParentDrawer.Window.Repaint(); }
public void SetData(TracklineData data) { Data = data; actionDrawers.Clear(); foreach (var d in data.Actions) { ActionDrawer drawer = new ActionDrawer(this); drawer.SetData(d); actionDrawers.Add(drawer); } }
internal void OnActionSelected(ActionDrawer actionDrawer) { int newSelectedIndex = actionDrawers.IndexOf(actionDrawer); if (newSelectedIndex != selectedActionIndex) { if (selectedActionIndex >= 0 && selectedActionIndex < actionDrawers.Count) { actionDrawers[selectedActionIndex].IsSelected = false; } selectedActionIndex = newSelectedIndex; } if (!IsSelected) { IsSelected = true; } }