Пример #1
0
        static void selectNextReference()
        {
            bool[] array =
            {
                MarkerManager.MarkerVisible(MarkerType.CoM),
                MarkerManager.MarkerVisible(MarkerType.DCoM),
                MarkerManager.MarkerVisible(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);
            }
        }
Пример #2
0
 protected override void content()
 {
     /* markers toggles */
     GUILayout.BeginVertical();
     {
         GUILayout.BeginHorizontal();
         {
             for (int i = 0; i < 3; i++)
             {
                 MarkerType marker        = (MarkerType)i;
                 bool       visibleBefore = MarkerManager.MarkerVisible(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();
 }
Пример #3
0
 public static void ReferenceButton()
 {
     if (GUILayout.Button(RCSBuildAid.ReferenceType.ToString(), MainWindow.style.smallButton))
     {
         selectNextReference();
     }
     else if (!MarkerManager.MarkerVisible(RCSBuildAid.ReferenceType))
     {
         selectNextReference();
     }
 }