/// <summary> /// Refreshes content of the properties window. /// </summary> protected void RefreshProperties() { if (TrackSelection != null) { TrackSelection.OnSelectChange(null); TrackSelection.OnSelectChange(SelectionContainer); } }
public override void Update(GameTime delta) { bool requestPlay = false; // BEGIN =================================== for (int i = 0; i < noPlayers; ++i) { // Request exit requestPlay |= Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Rhythm.InputKeys[2]); if (TrackSelected[i] > 0 && Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Movement.Up)) { --TrackSelected[i]; } if (TrackSelected[i] < Tracks.Count - 1 && Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Movement.Down)) { ++TrackSelected[i]; } if (Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Movement.Right)) { // Add to track selection TrackSelection selection = new TrackSelection(Tracks[TrackSelected[i]], Tracks[TrackSelected[i]].Diffs[DiffSelected[i]]); if (selection.Track != null && selection.Diff != null) { SelectionList[i].AddLast(selection); } } if (Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Movement.Left)) { // Remove from track selection if (SelectionList[i].Count > 0) { SelectionList[i].RemoveLast(); } } if (Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Rhythm.InputKeys[0]) && DiffSelected[i] > 0) { --DiffSelected[i]; } if (Host.KeyboardInput.IsTap(Host.Config.IO.Keyboard.Players[i].Rhythm.InputKeys[1]) && DiffSelected[i] < Tracks[TrackSelected[i]].Diffs.Count - 1) { ++DiffSelected[i]; } } if (requestPlay) { RequestStateChange(GameStateID.Playing); } // END =================================== }
private void Start() { m_selected = m_tracks[0]; foreach (var sel in m_tracks) { sel.SelectionButton.onClick.RemoveAllListeners(); sel.SelectionButton.onClick.AddListener(() => SelectTrack(sel)); } UpdateTrackSelections(); }
public void Track([NotNull] IPane pane, [CanBeNull] object selection) { Assert.ArgumentNotNull(pane, nameof(pane)); var objects = new[] { selection }; TrackSelection.SelectObjects(pane, objects); }
void Awake() { if (Instance == null) { // DontDestroyOnLoad(gameObject); Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
/// <summary> /// Creates a window pane /// </summary> /// <returns>Return code</returns> int IVsWindowPane.CreatePaneWindow(System.IntPtr hwndParent, int x, int y, int cx, int cy, out System.IntPtr hwnd) { Win32Methods.SetParent(Handle, hwndParent); hwnd = Handle; Debug.Assert(TrackSelection != null, "Unable to register in property window!"); if (TrackSelection != null) { TrackSelection.OnSelectChange(SelectionContainer); } Size = new System.Drawing.Size(cx - x, cy - y); // Loading configuration settings LoadSettings(); return(VSConstants.S_OK); }
public void Track([NotNull] IPane pane, [CanBeNull] IEnumerable <object> selection) { Assert.ArgumentNotNull(pane, nameof(pane)); TrackSelection.SelectObjects(pane, selection); }
private void SelectTrack(TrackSelection track) { m_selected = track; m_drawer.SetMeshGenerator(m_selected.MeshGenerator); UpdateTrackSelections(); }