static void selectNextReference() { bool[] array = { MarkerManager.IsMarkerVisible(MarkerType.CoM), MarkerManager.IsMarkerVisible(MarkerType.DCoM), MarkerManager.IsMarkerVisible(MarkerType.ACoM) }; if (!array.Any(o => o)) { return; } int i = (int)RCSBuildAid.ReferenceType; bool found = false; for (int j = 0; j < 3; j++) { i = LoopIndexSelect(0, 2, i); if (array [i]) { found = true; break; } } if (found) { RCSBuildAid.SetReferenceMarker((MarkerType)i); } }
protected override void content() { /* markers toggles */ GUILayout.BeginVertical(); { GUILayout.BeginHorizontal(); { for (int i = 0; i < 3; i++) { MarkerType marker = (MarkerType)i; bool visibleBefore = MarkerManager.IsMarkerVisible(marker); bool visibleAfter = GUILayout.Toggle(visibleBefore, marker.ToString()); if (visibleBefore != visibleAfter) { MarkerManager.SetMarkerVisibility(marker, visibleAfter); } } } GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); { GUILayout.Label("Size", MainWindow.style.sizeLabel); Settings.marker_scale = GUILayout.HorizontalSlider(Settings.marker_scale, 0, 1); } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); }
public static void ReferenceButton() { if (GUILayout.Button(RCSBuildAid.ReferenceType.ToString(), MainWindow.style.smallButton)) { selectNextReference(); } else if (!MarkerManager.IsMarkerVisible(RCSBuildAid.ReferenceType)) { selectNextReference(); } }