public static void Postfix(WidgetRow row, bool worldView) { if (!worldView) { if (CinematicCameraManager.currentCamera != null) { GUI.color = GenUI.MouseoverColor; } if (row.ButtonIcon(Resources.cameraIcon, "Fluffy.FollowMe.CinematicCamera".Translate())) { var options = new List <FloatMenuOption>(); foreach (var camera in CinematicCameraManager.Cameras) { options.Add(new FloatMenuOption(camera.LabelCap, () => CinematicCameraManager.Start(camera))); } options.Add(new FloatMenuOption("Fluffy.FollowMe.CinematicCamera.Off".Translate(), () => CinematicCameraManager.Stop())); Find.WindowStack.Add(new FloatMenu(options)); } GUI.color = Color.white; } }
public static void StopFollow(string reason = null) { #if DEBUG Log.Message($"FollowMe :: Stopped following {FollowedLabel} :: {reason ?? "NONE" }"); #endif if (!reason.NullOrEmpty() && _currentlyFollowing) { Mod.DoMessage("FollowMe.Cancel".Translate(FollowedLabel), MessageTypeDefOf.SituationResolved); } _followedThing = null; _currentlyFollowing = false; _cameraHasJumpedAtLeastOnce = false; CinematicCameraManager.Stop(null, false); }