public void TargetUI() { if (SelectingTarget) { SelectingTarget &= !GUILayout.Button("Cancel", Styles.close_button, GUILayout.ExpandWidth(true)); } else if (CFG.Target) { GUILayout.BeginHorizontal(); if (GUILayout.Button(new GUIContent("Edit Target", "Edit target point"), Styles.active_button, GUILayout.ExpandWidth(true))) { if (!CFG.Target.IsMovable) { VSL.UpdateTarget(CFG.Target.CopyMovable()); } edit_waypoint(CFG.Target); } if (VSL.TargetUsers.Count > 0) { GUILayout.Label(new GUIContent("Del Target", "Target point is in use"), Styles.grey_button, GUILayout.ExpandWidth(true)); } else if (GUILayout.Button(new GUIContent("Del Target", "Remove target point"), Styles.danger_button, GUILayout.ExpandWidth(true))) { VSL.SetTarget(null); } GUILayout.EndHorizontal(); } else if (GUILayout.Button(new GUIContent("Set Surface Target", "Select target point on the surface"), Styles.active_button, GUILayout.ExpandWidth(true))) { SetSurfaceTarget(); } }