コード例 #1
0
        internal void OnActionDelete(ActionDrawer actionDrawer)
        {
            selectedActionIndex = -1;
            Data.Actions.Remove(actionDrawer.Data);
            actionDrawers.Remove(actionDrawer);

            ParentDrawer.Window.Repaint();
        }
コード例 #2
0
        internal void OnActionAdded(ActionData actionData)
        {
            Data.Actions.Add(actionData);

            ActionDrawer itemDrawer = new ActionDrawer(this);

            itemDrawer.SetData(actionData);
            actionDrawers.Add(itemDrawer);

            ParentDrawer.Window.Repaint();
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
        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;
            }
        }