void DisplayFlagNegate(CV_Camera cam, CV_Camera.Flags flag, string label) { if (EditorGUILayout.Toggle(label, !cam.IsSet(flag))) { cam.Clear(flag); } else { cam.Set(flag); } }
private void RenderButton(string setting, CV_Camera.Flags flag) { Rect rect = new Rect(buttonPixelL, framePixelT + buttonPixelPadding, buttonPixelW, buttonPixelHeight); string label = IsSet(flag) ? "Enable\n" : "Disable\n"; label += setting; if (GUI.Button(rect, label)) { Toggle(flag); } buttonPixelL += buttonPixelW + buttonPixelPadding; }
private void RenderButton(string label, CV_Camera.Flags flag, CV_Camera.Type type) { Rect rect = new Rect(buttonPixelL, framePixelT + buttonPixelPadding, buttonPixelW, buttonPixelHeight); if (IsSet(flag)) { label += "\nCount: " + guiColliderCount[(int)type]; } if (GUI.Button(rect, label)) { Toggle(flag); } buttonPixelL += buttonPixelW + buttonPixelPadding; }