void menuItem_Click(object sender, System.EventArgs e) { AnimationTrackBar trackBar = (AnimationTrackBar)Owner; System.Type type = (System.Type)((Skill.Editor.UI.MenuItem)sender).UserData; AnimationKey newKey = ScriptableObject.CreateInstance(type) as AnimationKey; trackBar.AddKeyAt(Position.x, newKey); }
//private AnimationKey _AnimationKey; public AnimationKeyView(AnimationTrackBar trackBar, AnimationKey key) : base(trackBar, key) { //_AnimationKey = key; this.ColumnDefinitions.Add(10, Framework.UI.GridUnitType.Pixel); this.ColumnDefinitions.Add(1, Framework.UI.GridUnitType.Star); _Bg = new Framework.UI.Box(); _ImgState = new Skill.Framework.UI.Image() { Row = 0, Column = 0 }; Controls.Add(_Bg); Controls.Add(_ImgState); }