public static void ReloadBlueprints(bool ingame) { BlueprintsState.LoadedBlueprints.Clear(); string[] blueprintFiles = Directory.GetFiles(GetBlueprintDirectory()); foreach (string blueprintFile in blueprintFiles) { if (blueprintFile.EndsWith(".blueprint") || blueprintFile.EndsWith(".json")) { Blueprint blueprint = new Blueprint(blueprintFile); if (blueprint.ReadBinary() && !blueprint.IsEmpty()) { BlueprintsState.LoadedBlueprints.Add(blueprint); } else if (blueprint.ReadJSON() && !blueprint.IsEmpty()) { BlueprintsState.LoadedBlueprints.Add(blueprint); } } } if (ingame && BlueprintsState.LoadedBlueprints.Count > 0) { BlueprintsState.SelectedBlueprintIndex = 0; BlueprintsState.ClearVisuals(); BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); } }
protected override void OnActivateTool() { base.OnActivateTool(); gameObject.AddComponent <UseBlueprintToolInput>(); gameObject.GetComponent <UseBlueprintToolInput>().ParentTool = this; ToolMenu.Instance.PriorityScreen.Show(true); if (Input.GetKey(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_RELOAD) || Input.GetKeyUp(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_RELOAD)) { int oldBlueprintCount = BlueprintsState.LoadedBlueprints.Count; Utilities.ReloadBlueprints(true); int blueprintCountDelta = BlueprintsState.LoadedBlueprints.Count - oldBlueprintCount; PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_LOADEDBLUEPRINTS), Mathf.Abs(blueprintCountDelta) + " " + (blueprintCountDelta >= 0 ? Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_LOADEDBLUEPRINTS_ADDITIONAL) : Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_LOADEDBLUEPRINTS_FEWER)), BlueprintsState.LoadedBlueprints.Count), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME * 4); } if (BlueprintsState.LoadedBlueprints.Count > 0) { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); if (visualizer != null) { Destroy(visualizer); visualizer = null; } } else { CreateVisualizer(); } }
protected override void OnActivateTool() { base.OnActivateTool(); ToolMenu.Instance.PriorityScreen.Show(); if (BlueprintsState.HasBlueprints()) { GridCompositor.Instance.ToggleMajor(true); } if (BlueprintsState.HasBlueprints()) { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); if (visualizer != null) { Destroy(visualizer); visualizer = null; } } else { CreateVisualizer(); } }
protected override void OnActivateTool() { base.OnActivateTool(); gameObject.AddComponent <UseBlueprintToolInput>(); gameObject.GetComponent <UseBlueprintToolInput>().ParentTool = this; ToolMenu.Instance.PriorityScreen.Show(true); if (Input.GetKey(BlueprintsAssets.BLUEPRINTS_INPUT_KEYBIND_USETOOL_RELOAD) || Input.GetKeyUp(BlueprintsAssets.BLUEPRINTS_INPUT_KEYBIND_USETOOL_RELOAD)) { int oldBlueprintCount = BlueprintsState.LoadedBlueprints.Count; Utilities.ReloadBlueprints(true); int blueprintCountDelta = BlueprintsState.LoadedBlueprints.Count - oldBlueprintCount; PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, "Loaded " + Mathf.Abs(blueprintCountDelta) + (blueprintCountDelta >= 0 ? " additional" : " fewer") + " blueprints! (" + BlueprintsState.LoadedBlueprints.Count + " total)", null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_FXTIME * 4); } if (BlueprintsState.LoadedBlueprints.Count > 0) { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); if (visualizer != null) { Destroy(visualizer); visualizer = null; } } else { CreateVisualizer(); } }
protected override void OnDeactivateTool(InterfaceTool newTool) { base.OnDeactivateTool(newTool); BlueprintsState.ClearVisuals(); ToolMenu.Instance.PriorityScreen.Show(false); GridCompositor.Instance.ToggleMajor(false); }
public override void OnLeftClickDown(Vector3 cursorPos) { base.OnLeftClickDown(cursorPos); if (hasFocus) { BlueprintsState.UseBlueprint(Grid.PosToXY(cursorPos)); } }
public override void OnMouseMove(Vector3 cursorPos) { base.OnMouseMove(cursorPos); if (hasFocus) { BlueprintsState.UpdateVisual(Grid.PosToXY(cursorPos)); } }
public static void ReloadBlueprints(bool ingame) { BlueprintsState.LoadedBlueprints.Clear(); LoadFolder(GetBlueprintDirectory()); if (ingame && BlueprintsState.HasBlueprints()) { BlueprintsState.ClearVisuals(); BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); } }
public void DeleteBlueprint() { blueprint = null; gameObject.GetComponent <SnapshotToolHoverCard>().UsingSnapshot = false; ToolMenu.Instance.toolParameterMenu.gameObject.SetActive(true); ToolMenu.Instance.PriorityScreen.Show(false); BlueprintsState.ClearVisuals(); CreateVisualizer(); }
protected override void OnDeactivateTool(InterfaceTool newTool) { base.OnDeactivateTool(newTool); BlueprintsState.ClearVisuals(); blueprint = null; ToolMenu.Instance.toolParameterMenu.gameObject.SetActive(true); ToolMenu.Instance.PriorityScreen.Show(false); GridCompositor.Instance.ToggleMajor(false); }
protected override void OnDeactivateTool(InterfaceTool newTool) { base.OnDeactivateTool(newTool); if (gameObject.GetComponent <UseBlueprintToolInput>() != null) { Destroy(gameObject.GetComponent <UseBlueprintToolInput>()); } BlueprintsState.ClearVisuals(); ToolMenu.Instance.PriorityScreen.Show(false); }
protected override void OnDragComplete(Vector3 cursorDown, Vector3 cursorUp) { base.OnDragComplete(cursorDown, cursorUp); if (hasFocus) { Grid.PosToXY(cursorDown, out int x0, out int y0); Grid.PosToXY(cursorUp, out int x1, out int y1); if (x0 > x1) { Util.Swap(ref x0, ref x1); } if (y0 < y1) { Util.Swap(ref y0, ref y1); } Blueprint blueprint = BlueprintsState.CreateBlueprint(new Vector2I(x0, y0), new Vector2I(x1, y1), this); if (blueprint.IsEmpty()) { PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_EMPTY), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); } else { FileNameDialog blueprintNameDialog = Utilities.CreateBlueprintRenameDialog(); SpeedControlScreen.Instance.Pause(false); blueprintNameDialog.onConfirm = delegate(string blueprintName) { blueprint.Rename(blueprintName.Substring(0, blueprintName.Length - 4)); SpeedControlScreen.Instance.Unpause(false); blueprintNameDialog.Deactivate(); blueprint.Write(); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_CREATED), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); BlueprintsState.LoadedBlueprints.Add(blueprint); BlueprintsState.SelectedBlueprintIndex = BlueprintsState.LoadedBlueprints.Count - 1; }; blueprintNameDialog.onCancel = delegate { SpeedControlScreen.Instance.Unpause(false); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_CANCELLED), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); blueprintNameDialog.Deactivate(); }; blueprintNameDialog.Activate(); } } }
protected override void OnDragComplete(Vector3 cursorDown, Vector3 cursorUp) { base.OnDragComplete(cursorDown, cursorUp); if (hasFocus) { Grid.PosToXY(cursorDown, out int x0, out int y0); Grid.PosToXY(cursorUp, out int x1, out int y1); if (x0 > x1) { Util.Swap(ref x0, ref x1); } if (y0 < y1) { Util.Swap(ref y0, ref y1); } Blueprint blueprint = BlueprintsState.CreateBlueprint(new Vector2I(x0, y0), new Vector2I(x1, y1), this); if (blueprint.IsEmpty()) { PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_EMPTY), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); } else { void onConfirmDelegate(string blueprintName, FileNameDialog parent) { blueprint.Rename(blueprintName, false); blueprint.SetFolder(""); SpeedControlScreen.Instance.Unpause(false); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_CREATED), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); parent.Deactivate(); } FileNameDialog blueprintNameDialog = UIUtilities.CreateTextDialog(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_NAMEBLUEPRINT_TITLE), false, onConfirmDelegate); SpeedControlScreen.Instance.Pause(false); blueprintNameDialog.onCancel = delegate { SpeedControlScreen.Instance.Unpause(false); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_CREATE_CANCELLED), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); blueprintNameDialog.Deactivate(); }; blueprintNameDialog.Activate(); } } }
public void DeleteBlueprint() { blueprint = null; gameObject.GetComponent <SnapshotToolHoverCard>().UsingSnapshot = false; MultiToolParameterMenu.Instance.PopulateMenu(DefaultParameters); MultiToolParameterMenu.Instance.ShowMenu(); ToolMenu.Instance.PriorityScreen.Show(false); BlueprintsState.ClearVisuals(); CreateVisualizer(); }
protected override void OnDeactivateTool(InterfaceTool newTool) { base.OnDeactivateTool(newTool); if (gameObject.GetComponent <SnapshotToolInput>() != null) { Destroy(gameObject.GetComponent <SnapshotToolInput>()); } BlueprintsState.ClearVisuals(); blueprint = null; ToolMenu.Instance.toolParameterMenu.gameObject.SetActive(true); ToolMenu.Instance.PriorityScreen.Show(false); }
protected override void OnDragComplete(Vector3 cursorDown, Vector3 cursorUp) { base.OnDragComplete(cursorDown, cursorUp); if (hasFocus) { Grid.PosToXY(cursorDown, out int x0, out int y0); Grid.PosToXY(cursorUp, out int x1, out int y1); if (x0 > x1) { Util.Swap(ref x0, ref x1); } if (y0 < y1) { Util.Swap(ref y0, ref y1); } Blueprint blueprint = BlueprintsState.CreateBlueprint(new Vector2I(x0, y0), new Vector2I(x1, y1), this); if (blueprint.IsEmpty()) { PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_SNAPSHOT_EMPTY), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); } else { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), blueprint); ToolMenu.Instance.toolParameterMenu.gameObject.SetActive(false); ToolMenu.Instance.PriorityScreen.Show(true); gameObject.GetComponent <SnapshotToolHoverCard>().UsingSnapshot = true; gameObject.AddComponent <SnapshotToolInput>(); gameObject.GetComponent <SnapshotToolInput>().ParentTool = this; DestroyVisualizer(); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_SNAPSHOT_TAKEN), null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.BLUEPRINTS_CONFIG_FXTIME); GridCompositor.Instance.ToggleMajor(true); this.blueprint = blueprint; } } }
protected override void OnDragComplete(Vector3 cursorDown, Vector3 cursorUp) { base.OnDragComplete(cursorDown, cursorUp); if (hasFocus) { Grid.PosToXY(cursorDown, out int x0, out int y0); Grid.PosToXY(cursorUp, out int x1, out int y1); if (x0 > x1) { Util.Swap(ref x0, ref x1); } if (y0 < y1) { Util.Swap(ref y0, ref y1); } var blueprint1 = BlueprintsState.CreateBlueprint(new Vector2I(x0, y0), new Vector2I(x1, y1), MultiToolParameterMenu.Instance); if (blueprint1.IsEmpty()) { PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, BlueprintsStrings.STRING_BLUEPRINTS_SNAPSHOT_EMPTY, null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.Options.FXTime); } else { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), blueprint1); MultiToolParameterMenu.Instance.HideMenu(); ToolMenu.Instance.PriorityScreen.Show(); gameObject.GetComponent <SnapshotToolHoverCard>().UsingSnapshot = true; DestroyVisualizer(); PopFXManager.Instance.SpawnFX(BlueprintsAssets.BLUEPRINTS_CREATE_ICON_SPRITE, BlueprintsStrings.STRING_BLUEPRINTS_SNAPSHOT_TAKEN, null, PlayerController.GetCursorPos(KInputManager.GetMousePos()), BlueprintsAssets.Options.FXTime); GridCompositor.Instance.ToggleMajor(true); blueprint = blueprint1; } } }
public void Update() { if ((ParentTool?.hasFocus ?? false) && BlueprintsState.LoadedBlueprints.Count > 0) { bool blueprintChanged = false; if (Input.GetKeyDown(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_RENAME)) { FileNameDialog blueprintNameDialog = Utilities.CreateBlueprintRenameDialog(); SpeedControlScreen.Instance.Pause(false); blueprintNameDialog.onConfirm = delegate(string blueprintName) { BlueprintsState.SelectedBlueprint.Rename(blueprintName.Substring(0, blueprintName.Length - 4)); BlueprintsState.SelectedBlueprint.Write(); blueprintNameDialog.Deactivate(); SpeedControlScreen.Instance.Unpause(false); }; blueprintNameDialog.Activate(); } else if (Input.GetKeyDown(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_DELETE)) { BlueprintsState.SelectedBlueprint.DeleteFile(); BlueprintsState.LoadedBlueprints.RemoveAt(BlueprintsState.SelectedBlueprintIndex); if (BlueprintsState.SelectedBlueprintIndex >= BlueprintsState.LoadedBlueprints.Count) { BlueprintsState.SelectedBlueprintIndex = BlueprintsState.LoadedBlueprints.Count - 1; } blueprintChanged = true; } if (BlueprintsState.LoadedBlueprints.Count > 1) { if (Input.GetKeyDown(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLELEFT)) { if (--BlueprintsState.SelectedBlueprintIndex < 0) { BlueprintsState.SelectedBlueprintIndex = BlueprintsState.LoadedBlueprints.Count - 1; } blueprintChanged = true; } else if (Input.GetKeyDown(BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLERIGHT)) { if (++BlueprintsState.SelectedBlueprintIndex >= BlueprintsState.LoadedBlueprints.Count) { BlueprintsState.SelectedBlueprintIndex = 0; } blueprintChanged = true; } } if (blueprintChanged) { BlueprintsState.ClearVisuals(); if (BlueprintsState.LoadedBlueprints.Count > 0) { BlueprintsState.VisualizeBlueprint(Grid.PosToXY(PlayerController.GetCursorPos(KInputManager.GetMousePos())), BlueprintsState.SelectedBlueprint); } else { UseBlueprintTool.Instance.CreateVisualizer(); } } } }
public override void UpdateHoverElements(List <KSelectable> hoveredObjects) { HoverTextScreen screenInstance = HoverTextScreen.Instance; HoverTextDrawer drawer = screenInstance.BeginDrawing(); drawer.BeginShadowBar(); DrawTitle(screenInstance, drawer); drawer.NewLine(); drawer.DrawIcon(screenInstance.GetSprite("icon_mouse_left"), 20); drawer.DrawText(BlueprintsStrings.STRING_BLUEPRINTS_USE_ACTION_CLICK, Styles_Instruction.Standard); drawer.AddIndent(8); drawer.DrawIcon(screenInstance.GetSprite("icon_mouse_right"), 20); drawer.DrawText(BlueprintsStrings.STRING_BLUEPRINTS_USE_ACTION_BACK, Styles_Instruction.Standard); drawer.NewLine(32); if (BlueprintsState.HasBlueprints()) { if (BlueprintsState.SelectedFolder.BlueprintCount > 0) { drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_CYCLEFOLDERS, UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsCycleFoldersNextAction.GetKAction()) + "]"), UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsCycleFoldersPrevAction.GetKAction()) + "]")), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_CYCLEBLUEPRINTS, UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsCycleBlueprintsNextAction.GetKAction()) + "]"), UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsCycleBlueprintsPrevAction.GetKAction()) + "]")), Styles_Instruction.Standard); drawer.NewLine(32); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_FOLDERBLUEPRINT, UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsCreateFolderAction.GetKAction()) + "]")), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_NAMEBLUEPRINT, UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsRenameAction.GetKAction()) + "]")), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_DELETEBLUEPRINT, UI.FormatAsHotkey("[" + GameUtil.GetActionString(Integration.BlueprintsDeleteAction.GetKAction()) + "]")), Styles_Instruction.Standard); if (prefabErrorCount > 0) { drawer.NewLine(32); drawer.DrawIcon(screenInstance.GetSprite("iconWarning")); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_ERRORMESSAGE, prefabErrorCount), Styles_Instruction.Selected); } drawer.NewLine(32); drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_SELECTEDBLUEPRINT, BlueprintsState.SelectedBlueprint.FriendlyName, BlueprintsState.SelectedFolder.SelectedBlueprintIndex + 1, BlueprintsState.SelectedFolder.BlueprintCount, BlueprintsState.SelectedFolder.Name, BlueprintsState.SelectedBlueprintFolderIndex + 1, BlueprintsState.LoadedBlueprints.Count), Styles_Instruction.Standard); } else { drawer.DrawText(string.Format(BlueprintsStrings.STRING_BLUEPRINTS_USE_FOLDEREMPTY, BlueprintsState.SelectedFolder.Name), Styles_Instruction.Standard); } } else { drawer.DrawText(BlueprintsStrings.STRING_BLUEPRINTS_USE_NOBLUEPRINTS, Styles_Instruction.Standard); } drawer.EndShadowBar(); drawer.EndDrawing(); }
public override void UpdateHoverElements(List <KSelectable> hoveredObjects) { HoverTextScreen screenInstance = HoverTextScreen.Instance; HoverTextDrawer drawer = screenInstance.BeginDrawing(); drawer.BeginShadowBar(false); DrawTitle(screenInstance, drawer); drawer.NewLine(26); drawer.DrawIcon(screenInstance.GetSprite("icon_mouse_left"), 20); drawer.DrawText(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_ACTION_CLICK), Styles_Instruction.Standard); drawer.AddIndent(8); drawer.DrawIcon(screenInstance.GetSprite("icon_mouse_right"), 20); drawer.DrawText(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_ACTION_BACK), Styles_Instruction.Standard); drawer.NewLine(32); if (BlueprintsState.HasBlueprints()) { if (BlueprintsState.SelectedFolder.BlueprintCount > 0) { drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_CYCLEFOLDERS), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLEFOLDER_UP.GetStringFormatted(), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLEFOLDER_DOWN.GetStringFormatted()), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_CYCLEBLUEPRINTS), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLEBLUEPRINT_LEFT.GetStringFormatted(), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_CYCLEBLUEPRINT_RIGHT.GetStringFormatted()), Styles_Instruction.Standard); drawer.NewLine(32); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_FOLDERBLUEPRINT), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_FOLDER.GetStringFormatted()), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_NAMEBLUEPRINT), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_RENAME.GetStringFormatted()), Styles_Instruction.Standard); drawer.NewLine(20); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_DELETEBLUEPRINT), BlueprintsAssets.BLUEPRINTS_KEYBIND_USE_DELETE.GetStringFormatted()), Styles_Instruction.Standard); if (PrefabErrorCount > 0) { drawer.NewLine(32); drawer.DrawIcon(screenInstance.GetSprite("iconWarning"), 18); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_ERRORMESSAGE), PrefabErrorCount), Styles_Instruction.Selected); } drawer.NewLine(32); drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_SELECTEDBLUEPRINT), BlueprintsState.SelectedBlueprint.FriendlyName, BlueprintsState.SelectedFolder.SelectedBlueprintIndex + 1, BlueprintsState.SelectedFolder.BlueprintCount, BlueprintsState.SelectedFolder.Name, BlueprintsState.SelectedBlueprintFolderIndex + 1, BlueprintsState.LoadedBlueprints.Count), Styles_Instruction.Standard); } else { drawer.DrawText(string.Format(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_FOLDEREMPTY), BlueprintsState.SelectedFolder.Name), Styles_Instruction.Standard); } } else { drawer.DrawText(Strings.Get(BlueprintsStrings.STRING_BLUEPRINTS_USE_NOBLUEPRINTS), Styles_Instruction.Standard); } drawer.EndShadowBar(); drawer.EndDrawing(); }