//Open the configuration window for a selected track public void ConfigureTrack(UITrackManager track) { trackConfigWindow.Set(track.track.name, track); trackConfigWindow.OpenWindow(); }
//Remove a track and ReSort the track list public void RemoveTrack(UITrackManager track) { track.Destroy(); _curSong.RemoveTrack(track.track); _tracks.Remove(track); float y = _tracks[0].image.rectTransform.rect.height; for (int i = 0; i < _tracks.Count; i++) { Vector2 pos = _tracks[i].image.rectTransform.localPosition; pos.y = padding + ((y + padding)*i); pos.y *= -1; _tracks[i].image.rectTransform.localPosition = pos; } trackScrollView.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, ((_tracks[0].image.rectTransform.rect.height + padding) * _tracks.Count) + padding); //RenderTracks(); }
public void Set(string header, UITrackManager track) { SetHeader(header); this.track = track; colorPicker.color = new SColor(track.track.Scol.color); }