public override void DrawSettings() { ImGui.Text($"Welcome to EZV {Assembly.GetExecutingAssembly().GetName().Version}"); ImGui.Text("Clicks Tane -> unid -> vendor"); ImGui.BulletText("Influenced: keep all (use game filter)"); ImGui.BulletText("Rare rings, amulets, belts, gloves, boots: smart check"); ImGui.Text("Veiled +1 weight, no defense -1 weight, no speed boots -1 weight"); ImGui.BulletText("1h: keep +1 gems, temple DD mod"); ImGui.BulletText("Abyss jewels: keep all T2+ Life / T2+ ES"); ImGui.BulletText("Jewels: keep all Life% / ES% (corrupt for -1% reserved)"); ImGui.BulletText("Other rares: vendor for alts"); ImGui.Text("Avoid selling 5 to 1 recipe, prismatic ring recipe"); ImGui.BulletText("Uniques: ninja sell cheap"); ImGui.BulletText("Enchants: keep 10c+ (hard coded list)"); ImGui.BulletText("6L: keep (except Tabula), 6S: vendor"); ImGui.BulletText("Transmutes: vendor"); ImGui.NewLine(); ImGui.Text("This plugin will sort 95 percent of rare garbage"); ImGui.Text("Use tiered pricing tabs to auto price and sell rest. Example 1exa -> 50c -> 25c -> vendor"); ImGui.Text("If non influenced item dropped and plugin tries to vendor it or \r\n" + "it doesnt sell trash item then move this item to player inventory, \r\n" + "mouse over it, press debug key and send me msg"); ImGui.NewLine(); ImGui.InputText("League name", ref Settings.LeagueName3, 255); base.DrawSettings(); if (ImGui.Button("Delete ninja cache (after you change settings)")) { File.Delete(Path.Combine(DirectoryFullName, "ninja.json")); } }
public static void RenderDebug(JsonValue root) { root.Checkbox("From Any Source", "any", false); root.InputFloat("Chance", "chance"); root.InputFloat("Damage Modifier", "damage"); root.InputFloat("Scale", "scale"); root.Checkbox("Make it mine", "mine", false); ImGui.Separator(); if (root.Checkbox("Random Effect", "rne", false)) { root.InputFloat("Effect Change Speed", "ecs", 3f); } else { if (ImGui.TreeNode("Buff")) { if (!BuffRegistry.All.ContainsKey(root.InputText("Buff", "buff", "bk:frozen"))) { ImGui.BulletText("Unknown buff!"); } if (!root.Checkbox("Infinite", "infinite_buff", false)) { root.InputFloat("Buff Duration", "buff_time"); } ImGui.TreePop(); } } }
public static void RenderDebug(JsonValue root) { var time = root["time"].Number(1); var buff = root["buff"].AsString ?? ""; if (ImGui.InputText("Buff", ref buff, 128)) { root["buff"] = buff; } if (!BuffRegistry.All.ContainsKey(buff)) { ImGui.BulletText("Unknown buff!"); } var infinite = time < 0; if (ImGui.Checkbox("Infinite?", ref infinite)) { time = infinite ? -1 : 1; } if (!infinite) { if (ImGui.InputFloat("Duration", ref time)) { root["time"] = time; } } }
public override void RenderDebug() { if (ImGui.InputText("Buff", ref toAdd, 128)) { Add(toAdd); toAdd = ""; } ImGui.SameLine(); if (ImGui.Button("Add")) { Add(toAdd); toAdd = ""; } if (Buffs.Count == 0) { ImGui.BulletText("No buffs"); return; } if (ImGui.Button("Remove all")) { foreach (var b in Buffs.Values) { b.TimeLeft = 0; } } foreach (var b in Buffs.Values) { if (toAdd.Length > 0 && !BuffRegistry.All.ContainsKey(toAdd)) { ImGui.BulletText("Unknown buff"); } if (ImGui.TreeNode($"{b.Type}")) { ImGui.Text($"{b.TimeLeft} seconds left"); if (ImGui.Button($"Remove##{b.Type}")) { b.TimeLeft = 0; } ImGui.SameLine(); if (ImGui.Button($"Renew##{b.Type}")) { b.TimeLeft = b.Duration; } ImGui.Checkbox($"Infinite##{b.Type}", ref b.Infinite); ImGui.TreePop(); } } }
private static void RenderEntity(Entity e) { ImGui.Text(e.GetType().Name); ImGui.Separator(); pos.X = e.X; pos.Y = e.Y; if (ImGui.DragFloat2("Position", ref pos)) { e.X = pos.X; e.Y = pos.Y; } size.X = e.Width; size.Y = e.Height; if (ImGui.DragFloat2("Size", ref size)) { e.Width = size.X; e.Height = size.Y; } ImGui.InputInt("Depth", ref e.Depth); ImGui.Checkbox("Always active", ref e.AlwaysActive); ImGui.SameLine(); ImGui.Checkbox("Always visible", ref e.AlwaysVisible); ImGui.Checkbox("On screen", ref e.OnScreen); ImGui.Checkbox("Done", ref e.Done); e.RenderImDebug(); ImGui.Separator(); if (ImGui.CollapsingHeader("Components")) { foreach (var component in e.Components) { if (ImGui.TreeNode(component.Key.Name)) { component.Value.RenderDebug(); ImGui.TreePop(); } } } if (ImGui.CollapsingHeader("Tags")) { for (var i = 0; i < BitTag.Total; i++) { if (e.HasTag(BitTag.Tags[i])) { ImGui.BulletText(BitTag.Tags[i].Name); } } } }
public override void Draw(ref bool isGameViewFocused) { ImGui.BeginChild("manifest sidebar", new Vector2(300, 0), false, 0); { var panelSize = ImGui.GetContentRegionAvail(); panelSize.Y /= 2; ImGui.BeginChild("manifest contents", panelSize, true, 0); foreach (var asset in _gameStream.ManifestFile.Assets) { if (ImGui.Selectable(asset.Name, asset == _selectedAsset)) { _selectedAsset = asset; } ImGuiUtility.DisplayTooltipOnHover(asset.Name); } ImGui.EndChild(); ImGui.BeginChild("asset properties", ImGui.GetContentRegionAvail(), true, 0); if (_selectedAsset != null) { ImGui.Text($"Name: {_selectedAsset.Name}"); ImGui.Text($"TypeId: {_selectedAsset.Header.TypeId}"); ImGui.Text($"AssetType: {_selectedAsset.AssetType}"); ImGui.Text($"SourceFileName: {_selectedAsset.SourceFileName}"); ImGui.Text($"TypeHash: {_selectedAsset.Header.TypeHash}"); ImGui.Text($"InstanceDataSize: {_selectedAsset.Header.InstanceDataSize}"); ImGui.Text($"ImportsDataSize: {_selectedAsset.Header.ImportsDataSize}"); if (_selectedAsset.AssetImports.Count > 0) { ImGui.Text("Asset references:"); foreach (var assetImport in _selectedAsset.AssetImports) { ImGui.BulletText(assetImport.ImportedAsset?.Name ?? "Import not found"); } } } else { ImGui.Text("Select an asset to view its properties."); } ImGui.EndChild(); } ImGui.EndChild(); //ImGui.SameLine(); //if (_selectedContentView != null) //{ // _selectedContentView.Draw(ref isGameViewFocused); //} }
public override void RenderDebug() { ImGui.Text($"Total {Items.Count} items"); foreach (var item in Items) { ImGui.BulletText(item.Id); } }
public override void DrawSettingsMenu() { ImGui.BulletText($"v{PluginVersion}"); ImGui.PushStyleVar(StyleVar.ChildRounding, 5.0f); ImGuiNative.igGetContentRegionAvail(out var newcontentRegionArea); if (ImGui.BeginChild("RightSettings", new System.Numerics.Vector2(newcontentRegionArea.X, newcontentRegionArea.Y), true, WindowFlags.Default)) { SettingsMenu(); } ImGui.EndChild(); }
public override void DrawSettings() { base.DrawSettings(); ImGui.BulletText("Stash Toggle writes to memory, use with caution"); ImGui.BulletText("CAREFUL!!!!! "); ImGui.BulletText("CAREFUL!!!!! "); ImGui.BulletText("CAREFUL!!!!! "); ImGui.BulletText("CAREFUL!!!!! "); ImGui.BulletText("CAREFUL!!!!! "); ImGui.BulletText("CAREFUL!!!!! "); }
public override void DrawSettingsMenu() { ImGui.BulletText($"v{PluginVersion}"); ImGui.BulletText($"Last Updated: {buildDate}"); idPop = 1; ImGui.PushStyleVar(StyleVar.ChildRounding, 5.0f); ImGuiNative.igGetContentRegionAvail(out var newcontentRegionArea); if (ImGui.BeginChild("RightSettings", new System.Numerics.Vector2(newcontentRegionArea.X, newcontentRegionArea.Y), true, WindowFlags.Default)) { DelveMenu(idPop, out var newInt); idPop = newInt; } }
public override void Render() { ImGui.Text($"Entity Save ({total} entities)"); filter.Draw(); foreach (var pair in Datas) { if (filter.PassFilter(pair.Key)) { ImGui.BulletText($"{pair.Key} x{pair.Value.Count}"); } } }
public override void DrawSettings() { ImGui.BulletText($"v{PluginVersion}"); ImGui.BulletText($"Last Updated: {buildDate}"); idPop = 1; ImGui.PushStyleVar(ImGuiStyleVar.ChildRounding, 5.0f); ImGuiExtension.ImGuiExtension_ColorTabs("LeftSettings", 50, SettingName, ref Selected, ref idPop); var newcontentRegionArea = new Vector2(); newcontentRegionArea = ImGuiNative.igGetContentRegionAvail(); if (ImGui.BeginChild("RightSettings", new Vector2(newcontentRegionArea.X, newcontentRegionArea.Y), true, ImGuiWindowFlags.None)) { switch (SettingName[Selected]) { case RANDOM_FEATURES: RandomFeaturesMenu(idPop, out var newInt); idPop = newInt; break; case FUCK_ROMAN_NUMERAS: FuckRomanNumeralsMenu(); break; case WHERES_MY_CURSOR: WheresMyCursorMenu(); break; case TRIALS: TrialMenu(); break; case AREA_TRANSITIONS: AreaTranitionsMenu(); break; case AREA_MOD_WARNINGS: AreaModWarningsMenu(); break; case SKILL_GEM_LEVELING: LevelSkillGemsMenu(); break; case FOSSIL_TIER_SETTINGS: FielTierMenu(); break; } } ImGui.PopStyleVar(); ImGui.EndChild(); }
public static void RenderDebug(JsonValue root) { var item = root["item"].AsString ?? ""; if (ImGui.InputText("Item", ref item, 128)) { root["item"] = item; } if (!Items.Datas.ContainsKey(item)) { ImGui.BulletText("Unknown item!"); } }
public static void RenderDebug(JsonValue root) { root.Checkbox("Only if has none", "oin", false); if (root.Checkbox("Random", "random", false)) { return; } if (!OrbitalRegistry.Has(root.InputText("Orbital", "orbital", "", 128))) { ImGui.BulletText("Unknown orbital!"); } }
public override void Render() { ImGui.Text($"Global Save ({Values.Count} entries)"); filter.Draw(); foreach (var pair in Values) { if (filter.PassFilter(pair.Key)) { ImGui.BulletText(pair.Key); ImGui.SameLine(); ImGui.Text(pair.Value); } } }
public override void DrawSettingsMenu() { ImGui.BulletText($"v{PluginVersion}"); ImGui.BulletText($"Last Updated: {buildDate}"); base.DrawSettingsMenu(); if (ImGui.CollapsingHeader("Module Colors", "ModuleColorHeaders", false, false)) { Settings.OverrideColors = ImGuiExtension.Checkbox("Override Module Colors", Settings.OverrideColors); Settings.DegenTitle = ImGuiExtension.ColorPicker("Degen Title", Settings.DegenTitle); Settings.DegenPositive = ImGuiExtension.ColorPicker("Degen Positive Number", Settings.DegenPositive); Settings.DegenNegitive = ImGuiExtension.ColorPicker("Degen Negitive Number", Settings.DegenNegitive); Settings.DegenBackground = ImGuiExtension.ColorPicker("Degen Background", Settings.DegenBackground); ImGui.Separator(); } }
public static void RenderDebug(JsonValue root) { var stand = root["on_stand"].Bool(false); var random = root["random"].Bool(false); if (ImGui.Checkbox("Spawn on stand?", ref stand)) { root["on_stand"] = stand; } if (ImGui.Checkbox("Random item?", ref random)) { root["random"] = random; } if (stand) { return; } var val = root["amount"].Int(1); if (!random) { var item = root["item"].AsString ?? ""; if (ImGui.InputText("Item", ref item, 128)) { root["item"] = item; } if (!Items.Datas.ContainsKey(item)) { ImGui.BulletText("Unknown item!"); } } if (ImGui.InputInt("Amount", ref val)) { root["amount"] = val; } root.Checkbox("Animate?", "animate", true); root.Checkbox("Hide?", "hide", false); }
public static void RenderDebug(JsonValue root) { var type = root["tp"].String(""); var use = root["use"].String(""); if (ImGui.InputText("Use", ref use, 128)) { root["use"] = use; } var c = !UseRegistry.Uses.ContainsKey(use); if (c) { ImGui.BulletText("Unknown use"); } if (ImGui.InputText("Event type", ref type, 256)) { root["tp"] = type; } try { Type.GetType(type, true, false); } catch (Exception e) { ImGui.BulletText("Unknown type"); } if (c) { return; } var us = root["us"]; if (us == JsonValue.Null) { us = root["us"] = new JsonObject(); } us["id"] = use; ItemEditor.DisplayUse(root, us); }
public static void RenderDebug(JsonValue root) { if (!root["items"].IsJsonArray) { root["items"] = new JsonArray(); } var items = root["items"].AsJsonArray; var toRemove = -1; for (var i = 0; i < items.Count; i++) { var item = items[i].AsString; if (ImGui.InputText($"##item{i}", ref item, 128)) { items[i] = item; } ImGui.SameLine(); if (ImGui.Button("-")) { toRemove = i; } if (!Items.Has(item)) { ImGui.BulletText("Unknown item!"); } } if (toRemove > -1) { items.Remove(toRemove); } if (ImGui.Button("+")) { items.Add(""); } }
public static bool RenderDrop(JsonValue drop) { var id = drop["type"].String("missing"); if (DropRegistry.Defined.TryGetValue(id, out var info)) { if (ImGui.TreeNode($"{id}%##{drop["id"].AsInteger}")) { info.Render(drop); ImGui.TreePop(); return(true); } } else { ImGui.BulletText($"Unknown type {id}"); } return(false); }
public override void DrawSettings() { ImGui.BulletText($"v{PluginVersion}"); ImGui.BulletText($"Last Updated: {_buildDate}"); Settings.PickUpKey = ImGuiExtension.HotkeySelector( "Gemup Key: " + Settings.PickUpKey.Value, Settings.PickUpKey); Settings.ExtraDelay.Value = ImGuiExtension.IntSlider("Extra Click Delay", Settings.ExtraDelay); Settings.MouseSpeed.Value = ImGuiExtension.FloatSlider("Mouse speed", Settings.MouseSpeed); Settings.TimeBeforeNewClick.Value = ImGuiExtension.IntSlider("Time wait for new click", Settings.TimeBeforeNewClick); Settings.IdleGemUp.Value = ImGuiExtension.Checkbox( "Auto Level Up Gems when standing still - MAY BE BUGGY - USE AT OWN RISK", Settings.IdleGemUp); Settings.CheckEveryXTick.Value = ImGuiExtension.IntSlider( "only check every X tick for gems (10)", Settings.CheckEveryXTick); }
private void DisplayEditor() { ImGui.SetNextWindowPos(new System.Numerics.Vector2(Game.Graphics.PreferredBackBufferWidth - 330f, 20f), ImGuiCond.Always); ImGui.SetNextWindowSize(new System.Numerics.Vector2(330f, 90f), ImGuiCond.Always); ImGuiWindowFlags Flags = ImGuiWindowFlags.NoMove | ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoCollapse; ImGui.Begin("Pathfinding", Flags); Vector4 TextColor = Color.Red.ToVector4(); ImGui.BulletText("Use"); ImGui.SameLine(); ImGui.TextColored(new System.Numerics.Vector4(TextColor.X, TextColor.Y, TextColor.Z, TextColor.W), "Left Click"); ImGui.SameLine(); ImGui.Text("to set the end point."); ImGui.Separator(); float EndX = (float)System.Math.Floor(End.X / PathfindingGrid.TileSize); float EndY = (float)System.Math.Floor(End.Y / PathfindingGrid.TileSize); ImGui.BulletText("End Point: " + End); ImGui.BulletText("End Grid Position: [" + (int)EndX + ", " + (int)EndY + "]"); ImGui.End(); }
public void DegenPanel() { if (!Settings.RenderDegen) { return; } var refBool = true; float menuOpacity = ImGui.GetStyle().GetColor(ColorTarget.WindowBg).W; if (Settings.OverrideColors) { ImGui.PushStyleColor(ColorTarget.WindowBg, ToImVector4(Settings.DegenBackground.ToVector4())); menuOpacity = ImGui.GetStyle().GetColor(ColorTarget.WindowBg).W; } ImGui.BeginWindow("Degen Calculator", ref refBool, new ImVector2(200, 150), menuOpacity, Settings.RenderDegenLocked ? WindowFlags.NoCollapse | WindowFlags.NoScrollbar | WindowFlags.NoMove | WindowFlags.NoResize | WindowFlags.NoInputs | WindowFlags.NoBringToFrontOnFocus | WindowFlags.NoTitleBar | WindowFlags.NoFocusOnAppearing : WindowFlags.Default | WindowFlags.NoTitleBar | WindowFlags.ResizeFromAnySide); if (Settings.OverrideColors) { ImGui.PopStyleColor(); } double FinalDegenCalculation = -TryGetStat(GameStat.TotalNonlethalFireDamageTakenPerMinute) / 60; double FinalOtherSourceDegen = -TryGetStat(GameStat.TotalDamageTakenPerMinuteToLife) / 60; double FinalLifeRegen = TryGetStat(GameStat.LifeRegenerationRatePerMinute) / 60; var FinalCombinedDegen = FinalDegenCalculation + FinalOtherSourceDegen; var FinalTotalRegen = FinalLifeRegen + FinalDegenCalculation + FinalOtherSourceDegen; if (FinalTotalRegen < MaxDegenInInstance) { MaxDegenInInstance = FinalTotalRegen; } if (FinalTotalRegen > MaxRegenInInstance) { MaxRegenInInstance = FinalTotalRegen; } if (!Settings.OverrideColors) { var DegenString = $"Degen: {ToNiceString(FinalCombinedDegen)}"; if (Settings.RenderDegenCalculations) { DegenString += " (" + ToNiceString(FinalDegenCalculation) + "," + ToNiceString(FinalOtherSourceDegen) + ")"; } var RegenString = $"Regen: {ToNiceString(FinalLifeRegen)}"; var FinalString = $"Final: {ToNiceString(FinalTotalRegen)}"; if (Settings.RenderDegenCalculations) { FinalString += " (" + ToNiceString(FinalLifeRegen) + "," + ToNiceString(FinalCombinedDegen) + ")"; } ImGui.BulletText("Degen Calcuator"); if (Settings.RenderDegenDegen) { ImGui.Text(DegenString); } if (Settings.RenderDegenRegen) { ImGui.Text(RegenString); } if (Settings.RenderDegenFinal) { ImGui.Text(FinalString); } if (Settings.RenderDegenInstance || Settings.RenderRegenInstance) { ImGui.BulletText("Instance Totals"); } } else { var DegenString = $"Degen: {ToNiceStringColor(FinalCombinedDegen)}"; if (Settings.RenderDegenCalculations) { DegenString += " (" + ToNiceStringColor(FinalDegenCalculation) + "," + ToNiceStringColor(FinalOtherSourceDegen) + ")"; } var RegenString = $"Regen: {ToNiceStringColor(FinalLifeRegen)}"; var FinalString = $"Final: {ToNiceStringColor(FinalTotalRegen)}"; if (Settings.RenderDegenCalculations) { FinalString += " (" + ToNiceStringColor(FinalLifeRegen) + "," + ToNiceStringColor(FinalCombinedDegen) + ")"; } ImGui.BulletText("Degen Calcuator"); if (Settings.RenderDegenDegen) { Coloredtext(DegenString); } if (Settings.RenderDegenRegen) { Coloredtext(RegenString); } if (Settings.RenderDegenFinal) { Coloredtext(FinalString); } if (Settings.RenderDegenInstance || Settings.RenderRegenInstance) { ImGui.Spacing(); ImGui.BulletText("Instance Totals"); if (Settings.RenderDegenInstance) { Coloredtext($"Degen: {ToNiceStringColor(MaxDegenInInstance)}"); } if (Settings.RenderRegenInstance) { Coloredtext($"Regen: {ToNiceStringColor(MaxRegenInInstance)}"); } } } ImGui.EndWindow(); }
private void LoadFileMenu() { float framerate = ImGui.GetIO().Framerate; if (ImGui.BeginMainMenuBar()) { if (ImGui.BeginMenu("File")) { if (ImGui.MenuItem("Open", "Ctrl+O", false, initGlobalShaders)) { OpenFileWithDialog(); } if (ImGui.BeginMenu("Recent")) { for (int i = 0; i < recentFiles.Count; i++) { if (ImGui.Selectable(recentFiles[i])) { LoadFileFormat(recentFiles[i]); } } ImGui.EndMenu(); } var canSave = Outliner.ActiveFileFormat != null && Outliner.ActiveFileFormat.CanSave; if (ImGui.MenuItem("Save", "Ctrl+S", false, canSave)) { SaveFileWithCurrentPath(); } if (ImGui.MenuItem("Save As", "Ctrl+Shift+S", false, canSave)) { SaveFileWithDialog(); } if (ImGui.MenuItem("Clear Workspace")) { ClearWorkspace(); } ImGui.EndMenu(); } if (ImGui.BeginMenu("Setting")) { ImGui.InputFloat("Font Size", ref font_scale, 0.1f); _config.RenderUI(); ImGui.EndMenu(); } if (ImGui.MenuItem("Style Editor")) { showStyleEditor = true; } if (_config.HasValidSMOPath) { if (ImGui.MenuItem("Mario Viewer", initGlobalShaders)) { TryLoadPartInfo(); } } /* if (ImGui.MenuItem("Lighting")) * { * showLightingEditor = true; * }*/ if (ImGui.MenuItem("Batch Render")) { showBatchWindow = true; } if (ImGui.BeginMenu("Help")) { if (ImGui.Selectable($"About")) { showAboutPage = true; } if (ImGui.Selectable($"Donate")) { BrowserHelper.OpenDonation(); } ImGui.EndMenu(); } float size = ImGui.GetWindowWidth(); if (!string.IsNullOrEmpty(status)) { string statusLabel = $"Status: {status}"; float lbSize = ImGui.CalcTextSize(statusLabel).X; ImGui.SetCursorPosX((size - (lbSize)) / 2); ImGui.Text($"Status: {status}"); } ImGui.SetCursorPosX(size - 100); ImGui.Text($"({framerate:0.#} FPS)"); ImGui.EndMainMenuBar(); } if (showBatchWindow) { if (ImGui.Begin("Batch Window", ref showBatchWindow)) { ImguiCustomWidgets.PathSelector("Input Folder", ref BatchRenderingTool.InputFolder); ImguiCustomWidgets.PathSelector("Output Folder", ref BatchRenderingTool.OutputFolder); ImGui.Checkbox("Odyssey Actor", ref BatchRenderingTool.OdysseyActor); ImGui.InputInt("Image Width", ref BatchRenderingTool.ImageWidth); ImGui.InputInt("Image Height", ref BatchRenderingTool.ImageHeight); if (BatchRenderingTool.IsOperationActive) { float progress = (float)BatchRenderingTool.ProcessAmount / BatchRenderingTool.ProcessTotal; ImGui.ProgressBar(progress, new System.Numerics.Vector2(300, 20)); ImGui.Text($"{BatchRenderingTool.ProcessName}"); if (ImGui.Button("Cancel Render")) { BatchRenderingTool.CancelOperation = true; } } if (Directory.Exists(BatchRenderingTool.InputFolder) && Directory.Exists(BatchRenderingTool.OutputFolder) && !BatchRenderingTool.IsOperationActive) { if (ImGui.Button("Start Render")) { string path = BatchRenderingTool.InputFolder; string output = BatchRenderingTool.OutputFolder; int width = BatchRenderingTool.ImageWidth; int height = BatchRenderingTool.ImageHeight; var Thread3 = new Thread((ThreadStart)(() => { BatchRenderingTool batchTool = new BatchRenderingTool(); batchTool.StartRender(path, output, width, height); })); Thread3.Start(); } } ImGui.End(); } } if (ProbeDebugger.DEBUG_MODE) { ProbeDebugger.DrawWindow(); } if (showStyleEditor) { if (ImGui.Begin("Style Editor", ref showStyleEditor)) { ImGui.ShowStyleEditor(); ImGui.End(); } } if (showLightingEditor) { if (lightingEditor == null) { lightingEditor = new BfresEditor.LightingEditor(); } lightingEditor.Render(this.Pipeline._context); } if (showAboutPage) { if (ImGui.Begin($"About", ref showAboutPage)) { if (ImGui.CollapsingHeader($"Credits", ImGuiTreeNodeFlags.DefaultOpen)) { ImGui.BulletText("KillzXGaming - main developer"); ImGui.BulletText("JuPaHe64 - created animation timeline"); ImGui.BulletText("Ryujinx - for shader libraries used to decompile and translate switch binaries into glsl code."); ImGui.BulletText("OpenTK Team - for opengl c# bindings."); ImGui.BulletText("mellinoe and IMGUI Team - for c# port and creating the IMGUI library"); ImGui.BulletText("Syroot - for bfres library and binary IO"); } ImGui.End(); } } }
void OnLayout() { ImGui.SetNextWindowPos(new Vector2(0.0f, 0.0f), ImGuiCond.FirstUseEver); ImGui.SetNextWindowSize(new Vector2(Screen.width * 0.4f, Screen.height * 0.4f), ImGuiCond.FirstUseEver); ImGui.Begin("Viewer States"); foreach (var viewerState in viewerStates.Values) { ImGui.Text($"Viewer (User ID: {viewerState.userId})"); foreach (var receiverState in viewerState.receiverStates) { ImGui.BulletText($"Receiver (Session ID: {receiverState.sessionId})"); ImGui.Indent(); ImGui.Text($" Sender End Point: {receiverState.senderAddress}:{receiverState.senderPort}"); } ImGui.NewLine(); } ImGui.End(); ImGui.SetNextWindowPos(new Vector2(0.0f, Screen.height * 0.4f), ImGuiCond.FirstUseEver); ImGui.SetNextWindowSize(new Vector2(Screen.width * 0.4f, Screen.height * 0.6f), ImGuiCond.FirstUseEver); ImGui.Begin("Scene Templates"); ImGui.BeginTabBar("Scene Templates TabBar"); if (ImGui.BeginTabItem("Default")) { foreach (var viewerStatePair in viewerStates) { } if (ImGui.Button("Set Scene")) { } ImGui.EndTabItem(); } if (ImGui.BeginTabItem("Single Camera")) { ImGui.InputText("Address", ref singleCameraAddress, 30); ImGui.InputInt("Port", ref singleCameraPort); ImGui.InputFloat("Distance", ref singleCameraDistance); if (ImGui.Button("Set Scene")) { foreach (var serverSocket in serverSockets) { var kinectSenderElement = new KinectSenderElement(singleCameraAddress, singleCameraPort, new Vector3(0.0f, 0.0f, singleCameraDistance), Quaternion.identity); var viewerScene = new ViewerScene(); viewerScene.kinectSenderElements = new List <KinectSenderElement>(); viewerScene.kinectSenderElements.Add(kinectSenderElement); viewerScenes[serverSocket] = viewerScene; } } } ImGui.EndTabBar(); ImGui.End(); ImGui.SetNextWindowPos(new Vector2(Screen.width * 0.4f, 0.0f), ImGuiCond.FirstUseEver); ImGui.SetNextWindowSize(new Vector2(Screen.width * 0.6f, Screen.height), ImGuiCond.FirstUseEver); ImGui.Begin("Scene"); ImGui.BeginTabBar("Scene TabBar"); int kinectSenderElementIndex = 0; foreach (var viewerStatePair in viewerStates) { var serverSocket = viewerStatePair.Key; var viewerState = viewerStatePair.Value; var viewerScene = viewerScenes[serverSocket]; if (ImGui.BeginTabItem(viewerState.userId.ToString())) { foreach (var kinectSenderElement in viewerScene.kinectSenderElements.ToList()) { ImGui.InputText("Address##" + kinectSenderElementIndex, ref kinectSenderElement.address, 30); ImGui.InputInt("Port##" + kinectSenderElementIndex, ref kinectSenderElement.port); ImGui.InputFloat3("Position##" + kinectSenderElementIndex, ref kinectSenderElement.position); var eulerAngles = kinectSenderElement.rotation.eulerAngles; if (ImGui.InputFloat3("Rotation##" + kinectSenderElementIndex, ref eulerAngles)) { kinectSenderElement.rotation = Quaternion.Euler(eulerAngles); } if (ImGui.Button("Remove This Sender##" + kinectSenderElementIndex)) { bool removeResult = viewerScene.kinectSenderElements.Remove(kinectSenderElement); print($"removeResult: {removeResult}"); } ImGui.NewLine(); ++kinectSenderElementIndex; } if (ImGui.Button("Add Kinect Sender")) { viewerScene.kinectSenderElements.Add(new KinectSenderElement("127.0.0.1", SENDER_PORT, Vector3.zero, Quaternion.identity)); } if (ImGui.Button("Update Scene")) { string invalidIpAddress = null; foreach (var kinectSenderElement in viewerScene.kinectSenderElements) { if (!IsValidIpAddress(kinectSenderElement.address)) { invalidIpAddress = kinectSenderElement.address; break; } } if (invalidIpAddress == null) { serverSocket.SendViewerScene(viewerScene); } else { print($"Scene not updated since an invalid IP address was found: {invalidIpAddress}"); } } ImGui.EndTabItem(); } } ImGui.EndTabBar(); ImGui.End(); }
private static void AxBySwapper() { ImGui.BulletText("Input Type:"); ImGui.SameLine(); if (ImGuiAddons.BeginComboFixed("##Current AxBy", FfxHelperMethods.AxByToName(SelectedFfxWindow.AxBy))) { if (FfxHelperMethods.AxByColorArray.Contains(SelectedFfxWindow.AxBy)) { foreach (string str in FfxHelperMethods.AxByColorArray) { bool selected = false; if (SelectedFfxWindow.AxBy == str) { selected = true; } if (ImGui.Selectable(FfxHelperMethods.AxByToName(str), selected) & str != SelectedFfxWindow.AxBy) { XElement axbyElement = SelectedFfxWindow.FfxPropertyEditorElement; if (str == "A19B7") { XElement templateXElement = DefParser.TemplateGetter("19", "7"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "19")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "7")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A35B11") { XElement templateXElement = DefParser.TemplateGetter("35", "11"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "35")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "11")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A67B19") { if (SelectedFfxWindow.AxBy == "A4163B35") { var actionListQuick = new List <Action>(); actionListQuick.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "67")); actionListQuick.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "19")); actionListQuick.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionListQuick)); return; } XElement templateXElement = DefParser.TemplateGetter("67", "19"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "67")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "19")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A99B27") { XElement templateXElement = DefParser.TemplateGetter("99", "27"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "99")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "27")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A4163B35") { if (SelectedFfxWindow.AxBy == "A67B19") { var actionListQuick = new List <Action>(); actionListQuick.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "4163")); actionListQuick.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "35")); actionListQuick.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionListQuick)); return; } XElement templateXElement = DefParser.TemplateGetter("4163", "35"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "4163")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "35")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } return; } } } else if (FfxHelperMethods.AxByScalarArray.Contains(SelectedFfxWindow.AxBy)) { foreach (string str in FfxHelperMethods.AxByScalarArray) { bool selected = false; if (SelectedFfxWindow.AxBy == str) { selected = true; } if (ImGui.Selectable(FfxHelperMethods.AxByToName(str), selected) & str != SelectedFfxWindow.AxBy) { XElement axbyElement = SelectedFfxWindow.FfxPropertyEditorElement; if (str == "A0B0") { XElement templateXElement = DefParser.TemplateGetter("0", "0"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "0")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "0")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A16B4") { XElement templateXElement = DefParser.TemplateGetter("16", "4"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "16")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "4")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A32B8") { XElement templateXElement = DefParser.TemplateGetter("32", "8"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "32")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "8")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A64B16") { XElement templateXElement = DefParser.TemplateGetter("64", "16"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "64")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "16")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A96B24") { XElement templateXElement = DefParser.TemplateGetter("96", "24"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "96")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "24")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else if (str == "A4160B32") { XElement templateXElement = DefParser.TemplateGetter("4160", "32"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "4160")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "32")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } return; } } } else { ImGui.Selectable(SelectedFfxWindow.AxBy, true); } ImGuiAddons.EndComboFixed(); } ImGui.SameLine(); if (ImGuiAddons.ButtonGradient("Flip C/S")) { XElement axbyElement = SelectedFfxWindow.FfxPropertyEditorElement; if (FfxHelperMethods.AxByColorArray.Contains(SelectedFfxWindow.AxBy)) { XElement templateXElement = DefParser.TemplateGetter("0", "0"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "0")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "0")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } else { XElement templateXElement = DefParser.TemplateGetter("19", "7"); if (templateXElement != null) { var actionList = new List <Action>(); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumA"), "19")); actionList.Add(new ModifyXAttributeString(axbyElement.Attribute("TypeEnumB"), "7")); actionList.Add(new XElementReplaceChildren(axbyElement, templateXElement)); actionList.Add(new ResetEditorSelection(SelectedFfxWindow)); SelectedFfxWindow.ActionManager.ExecuteAction(new CompoundAction(actionList)); } } } }
private static void DrawScript(Script script) { ImGui.BulletText(GetScriptDetails(script.Name, script.IsActive, script.IsSubroutine)); }
public override void DrawSettings() { Settings.ShowInventoryView.Value = ImGuiExtension.Checkbox("Show Inventory Slots", Settings.ShowInventoryView.Value); Settings.MoveInventoryView.Value = ImGuiExtension.Checkbox("Moveable Inventory Slots", Settings.MoveInventoryView.Value); Settings.PickUpKey = ImGuiExtension.HotkeySelector("Pickup Key: " + Settings.PickUpKey.Value.ToString(), Settings.PickUpKey); Settings.LeftClickToggleNode.Value = ImGuiExtension.Checkbox("Mouse Button: " + (Settings.LeftClickToggleNode ? "Left" : "Right"), Settings.LeftClickToggleNode); Settings.LeftClickToggleNode.Value = ImGuiExtension.Checkbox("Return Mouse To Position Before Click", Settings.ReturnMouseToBeforeClickPosition); Settings.GroundChests.Value = ImGuiExtension.Checkbox("Click Chests If No Items Around", Settings.GroundChests); Settings.PickupRange.Value = ImGuiExtension.IntSlider("Pickup Radius", Settings.PickupRange); Settings.ChestRange.Value = ImGuiExtension.IntSlider("Chest Radius", Settings.ChestRange); Settings.ExtraDelay.Value = ImGuiExtension.IntSlider("Extra Click Delay", Settings.ExtraDelay); Settings.MouseSpeed.Value = ImGuiExtension.FloatSlider("Mouse speed", Settings.MouseSpeed); Settings.TimeBeforeNewClick.Value = ImGuiExtension.IntSlider("Time wait for new click", Settings.TimeBeforeNewClick); //Settings.OverrideItemPickup.Value = ImGuiExtension.Checkbox("Item Pickup Override", Settings.OverrideItemPickup); ImGui.SameLine(); //ImGuiExtension.ToolTip("Override item.CanPickup\n\rDO NOT enable this unless you know what you're doing!"); Settings.LazyLooting.Value = ImGuiExtension.Checkbox("Use Lazy Looting", Settings.LazyLooting); Settings.LazyLootingPauseKey.Value = ImGuiExtension.HotkeySelector("Pause lazy looting for 2 sec: " + Settings.LazyLootingPauseKey.Value, Settings.LazyLootingPauseKey); var tempRef = false; if (ImGui.CollapsingHeader("Pickit Rules", ImGuiTreeNodeFlags.Framed | ImGuiTreeNodeFlags.DefaultOpen)) { if (ImGui.Button("Reload All Files")) { LoadRuleFiles(); } Settings.NormalRuleFile = ImGuiExtension.ComboBox("Normal Rules", Settings.NormalRuleFile, PickitFiles, out tempRef); if (tempRef) { _normalRules = LoadPickit(Settings.NormalRuleFile); } Settings.MagicRuleFile = ImGuiExtension.ComboBox("Magic Rules", Settings.MagicRuleFile, PickitFiles, out tempRef); if (tempRef) { _magicRules = LoadPickit(Settings.MagicRuleFile); } Settings.RareRuleFile = ImGuiExtension.ComboBox("Rare Rules", Settings.RareRuleFile, PickitFiles, out tempRef); if (tempRef) { _rareRules = LoadPickit(Settings.RareRuleFile); } Settings.UniqueRuleFile = ImGuiExtension.ComboBox("Unique Rules", Settings.UniqueRuleFile, PickitFiles, out tempRef); if (tempRef) { _uniqueRules = LoadPickit(Settings.UniqueRuleFile); } Settings.WeightRuleFile = ImGuiExtension.ComboBox("Weight Rules", Settings.WeightRuleFile, PickitFiles, out tempRef); if (tempRef) { _weightsRules = LoadWeights(Settings.WeightRuleFile); } Settings.IgnoreRuleFile = ImGuiExtension.ComboBox("Ignore Rules", Settings.IgnoreRuleFile, PickitFiles, out tempRef); if (tempRef) { _ignoreRules = LoadPickit(Settings.IgnoreRuleFile); } } if (ImGui.CollapsingHeader("Item Logic", ImGuiTreeNodeFlags.Framed | ImGuiTreeNodeFlags.DefaultOpen)) { if (ImGui.TreeNode("Influence Types")) { Settings.ShaperItems.Value = ImGuiExtension.Checkbox("Shaper Items", Settings.ShaperItems); Settings.ElderItems.Value = ImGuiExtension.Checkbox("Elder Items", Settings.ElderItems); Settings.HunterItems.Value = ImGuiExtension.Checkbox("Hunter Items", Settings.HunterItems); Settings.CrusaderItems.Value = ImGuiExtension.Checkbox("Crusader Items", Settings.CrusaderItems); Settings.WarlordItems.Value = ImGuiExtension.Checkbox("Warlord Items", Settings.WarlordItems); Settings.RedeemerItems.Value = ImGuiExtension.Checkbox("Redeemer Items", Settings.RedeemerItems); Settings.FracturedItems.Value = ImGuiExtension.Checkbox("Fractured Items", Settings.FracturedItems); Settings.VeiledItems.Value = ImGuiExtension.Checkbox("Veiled Items", Settings.VeiledItems); ImGui.Spacing(); ImGui.TreePop(); } if (ImGui.TreeNode("Links/Sockets/RGB")) { Settings.RGB.Value = ImGuiExtension.Checkbox("RGB Items", Settings.RGB); Settings.RGBWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RGBWidth", Settings.RGBWidth); Settings.RGBHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RGBHeight", Settings.RGBHeight); ImGui.Spacing(); ImGui.Spacing(); ImGui.Spacing(); Settings.TotalSockets.Value = ImGuiExtension.IntSlider("##Sockets", Settings.TotalSockets); ImGui.SameLine(); Settings.Sockets.Value = ImGuiExtension.Checkbox("Sockets", Settings.Sockets); Settings.LargestLink.Value = ImGuiExtension.IntSlider("##Links", Settings.LargestLink); ImGui.SameLine(); Settings.Links.Value = ImGuiExtension.Checkbox("Links", Settings.Links); ImGui.Separator(); ImGui.TreePop(); } if (ImGui.TreeNode("Overrides")) { Settings.UseWeight.Value = ImGuiExtension.Checkbox("Use Weight", Settings.UseWeight); Settings.IgnoreScrollOfWisdom.Value = ImGuiExtension.Checkbox("Ignore Scroll Of Wisdom", Settings.IgnoreScrollOfWisdom); Settings.PickUpEverything.Value = ImGuiExtension.Checkbox("Pickup Everything", Settings.PickUpEverything); Settings.AllDivs.Value = ImGuiExtension.Checkbox("All Divination Cards", Settings.AllDivs); Settings.AllCurrency.Value = ImGuiExtension.Checkbox("All Currency", Settings.AllCurrency); Settings.AllUniques.Value = ImGuiExtension.Checkbox("All Uniques", Settings.AllUniques); Settings.QuestItems.Value = ImGuiExtension.Checkbox("Quest Items", Settings.QuestItems); Settings.Maps.Value = ImGuiExtension.Checkbox("##Maps", Settings.Maps); ImGui.SameLine(); if (ImGui.TreeNode("Maps")) { Settings.MapTier.Value = ImGuiExtension.IntSlider("Lowest Tier", Settings.MapTier); Settings.UniqueMap.Value = ImGuiExtension.Checkbox("All Unique Maps", Settings.UniqueMap); Settings.MapFragments.Value = ImGuiExtension.Checkbox("Fragments", Settings.MapFragments); ImGui.Spacing(); ImGui.TreePop(); } Settings.GemQuality.Value = ImGuiExtension.IntSlider("##Gems", "Lowest Quality", Settings.GemQuality); ImGui.SameLine(); Settings.Gems.Value = ImGuiExtension.Checkbox("Gems", Settings.Gems); Settings.FlasksQuality.Value = ImGuiExtension.IntSlider("##Flasks", "Lowest Quality", Settings.FlasksQuality); ImGui.SameLine(); Settings.Flasks.Value = ImGuiExtension.Checkbox("Flasks", Settings.Flasks); ImGui.Separator(); ImGui.TreePop(); } Settings.HeistItems.Value = ImGuiExtension.Checkbox("Heist Items", Settings.HeistItems); Settings.Rares.Value = ImGuiExtension.Checkbox("##Rares", Settings.Rares); ImGui.SameLine(); if (ImGui.TreeNode("Rares##asd")) { Settings.RareJewels.Value = ImGuiExtension.Checkbox("Jewels", Settings.RareJewels); Settings.RareRingsilvl.Value = ImGuiExtension.IntSlider("##RareRings", "Lowest iLvl", Settings.RareRingsilvl); ImGui.SameLine(); Settings.RareRings.Value = ImGuiExtension.Checkbox("Rings", Settings.RareRings); Settings.RareAmuletsilvl.Value = ImGuiExtension.IntSlider("##RareAmulets", "Lowest iLvl", Settings.RareAmuletsilvl); ImGui.SameLine(); Settings.RareAmulets.Value = ImGuiExtension.Checkbox("Amulets", Settings.RareAmulets); Settings.RareBeltsilvl.Value = ImGuiExtension.IntSlider("##RareBelts", "Lowest iLvl", Settings.RareBeltsilvl); ImGui.SameLine(); Settings.RareBelts.Value = ImGuiExtension.Checkbox("Belts", Settings.RareBelts); Settings.RareGlovesilvl.Value = ImGuiExtension.IntSlider("##RareGloves", "Lowest iLvl", Settings.RareGlovesilvl); ImGui.SameLine(); Settings.RareGloves.Value = ImGuiExtension.Checkbox("Gloves", Settings.RareGloves); Settings.RareBootsilvl.Value = ImGuiExtension.IntSlider("##RareBoots", "Lowest iLvl", Settings.RareBootsilvl); ImGui.SameLine(); Settings.RareBoots.Value = ImGuiExtension.Checkbox("Boots", Settings.RareBoots); Settings.RareHelmetsilvl.Value = ImGuiExtension.IntSlider("##RareHelmets", "Lowest iLvl", Settings.RareHelmetsilvl); ImGui.SameLine(); Settings.RareHelmets.Value = ImGuiExtension.Checkbox("Helmets", Settings.RareHelmets); Settings.RareArmourilvl.Value = ImGuiExtension.IntSlider("##RareArmours", "Lowest iLvl", Settings.RareArmourilvl); ImGui.SameLine(); Settings.RareArmour.Value = ImGuiExtension.Checkbox("Armours", Settings.RareArmour); ImGui.Spacing(); ImGui.Spacing(); ImGui.Spacing(); Settings.RareShieldilvl.Value = ImGuiExtension.IntSlider("##Shields", "Lowest iLvl", Settings.RareShieldilvl); ImGui.SameLine(); Settings.RareShield.Value = ImGuiExtension.Checkbox("Shields", Settings.RareShield); Settings.RareShieldWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RareShieldWidth", Settings.RareShieldWidth); Settings.RareShieldHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RareShieldHeight", Settings.RareShieldHeight); ImGui.Spacing(); ImGui.Spacing(); ImGui.Spacing(); Settings.RareWeaponilvl.Value = ImGuiExtension.IntSlider("##RareWeapons", "Lowest iLvl", Settings.RareWeaponilvl); ImGui.SameLine(); Settings.RareWeapon.Value = ImGuiExtension.Checkbox("Weapons", Settings.RareWeapon); Settings.RareWeaponWidth.Value = ImGuiExtension.IntSlider("Maximum Width##RareWeaponWidth", Settings.RareWeaponWidth); Settings.RareWeaponHeight.Value = ImGuiExtension.IntSlider("Maximum Height##RareWeaponHeight", Settings.RareWeaponHeight); if (ImGui.TreeNode("Full Rare Set Manager Integration##FRSMI")) { ImGui.BulletText("You must use github.com/DetectiveSquirrel/FullRareSetManager in order to utilize this section\nThis will determine what items are still needed to be picked up\nfor the chaos recipe, it uses FRSM's count to check this.'"); ImGui.Spacing(); Settings.FullRareSetManagerOverride.Value = ImGuiExtension.Checkbox("Override Rare Pickup with Full Rare Set Managers' needed pieces", Settings.FullRareSetManagerOverride); Settings.FullRareSetManagerOverrideAllowIdentifiedItems.Value = ImGuiExtension.Checkbox("Pickup Identified items?", Settings.FullRareSetManagerOverrideAllowIdentifiedItems); ImGui.Spacing(); ImGui.Spacing(); ImGui.BulletText("Set the number you wish to pickup for Full Rare Set Manager overrides\nDefault: -1\n-1 will disable these overrides"); ImGui.Spacing(); Settings.FullRareSetManagerPickupOverrides.Weapons = ImGuiExtension.IntSlider("Max Weapons(s)##FRSMOverrides1", Settings.FullRareSetManagerPickupOverrides.Weapons, -1, 100); Settings.FullRareSetManagerPickupOverrides.Helmets = ImGuiExtension.IntSlider("Max Helmets##FRSMOverrides2", Settings.FullRareSetManagerPickupOverrides.Helmets, -1, 100); Settings.FullRareSetManagerPickupOverrides.BodyArmors = ImGuiExtension.IntSlider("Max Body Armors##FRSMOverrides3", Settings.FullRareSetManagerPickupOverrides.BodyArmors, -1, 100); Settings.FullRareSetManagerPickupOverrides.Gloves = ImGuiExtension.IntSlider("Max Gloves##FRSMOverrides4", Settings.FullRareSetManagerPickupOverrides.Gloves, -1, 100); Settings.FullRareSetManagerPickupOverrides.Boots = ImGuiExtension.IntSlider("Max Boots##FRSMOverrides5", Settings.FullRareSetManagerPickupOverrides.Boots, -1, 100); Settings.FullRareSetManagerPickupOverrides.Belts = ImGuiExtension.IntSlider("Max Belts##FRSMOverrides6", Settings.FullRareSetManagerPickupOverrides.Belts, -1, 100); Settings.FullRareSetManagerPickupOverrides.Amulets = ImGuiExtension.IntSlider("Max Amulets##FRSMOverrides7", Settings.FullRareSetManagerPickupOverrides.Amulets, -1, 100); Settings.FullRareSetManagerPickupOverrides.Rings = ImGuiExtension.IntSlider("Max Ring Sets##FRSMOverrides8", Settings.FullRareSetManagerPickupOverrides.Rings, -1, 100); ImGui.Spacing(); ImGui.Spacing(); ImGui.BulletText("Set the ilvl Min/Max you wish to pickup for Full Rare Set Manager overrides\nIt is up to you how to use these two features\nit does not change how FullRareSetManager counts its sets.\nDefault: -1\n-1 will disable these overrides"); ImGui.Spacing(); Settings.FullRareSetManagerPickupOverrides.MinItemLevel = ImGuiExtension.IntSlider("Minimum Item Level##FRSMOverrides9", Settings.FullRareSetManagerPickupOverrides.MinItemLevel, -1, 100); Settings.FullRareSetManagerPickupOverrides.MaxItemLevel = ImGuiExtension.IntSlider("Max Item Level##FRSMOverrides10", Settings.FullRareSetManagerPickupOverrides.MaxItemLevel, -1, 100); ImGui.TreePop(); } ImGui.TreePop(); } } }
public void RenderWindow() { ImGui.Separator(); ImGui.Text($"Time: {Math.Floor(Time / 3600f)}h {Math.Floor(Time / 60f % 60f)}m {Math.Floor(Time % 60f)}s"); ImGui.Text($"Won: {Won}"); ImGui.Text($"Loop: {Run.Loop}"); ImGui.Text($"Max Depth: {MaxDepth}"); ImGui.Text($"Game Version: {GameVersion}"); Run.CalculateScore(); ImGui.Text($"Score: {Run.Score}"); ImGui.Separator(); if (ImGui.TreeNode("Items")) { foreach (var item in Items) { ImGui.BulletText(item); } ImGui.TreePop(); } if (ImGui.TreeNode("Banned items")) { foreach (var item in Banned) { ImGui.BulletText(item); } ImGui.TreePop(); } ImGui.Separator(); ImGui.Text($"Coins Collected: {CoinsObtained}"); ImGui.Text($"Keys Collected: {KeysObtained}"); ImGui.Text($"Bombs Collected: {BombsObtained}"); ImGui.Text($"Hearts Collected: {HeartsCollected}"); ImGui.Text($"Heart Containers Collected: {MaxHealth}"); ImGui.Separator(); ImGui.Text($"Damage Taken: {DamageTaken}"); ImGui.Text($"Damage Dealt: {DamageDealt}"); ImGui.Text($"Mobs Killed: {MobsKilled}"); ImGui.Text($"Rooms Explored: {RoomsExplored} / {RoomsTotal}"); ImGui.Text($"Secret Rooms Explored: {SecretRoomsFound} / {SecretRoomsTotal}"); ImGui.Separator(); ImGui.Text($"Date Started: {Day} {Year}"); ImGui.Text($"Tiles Walked: {TilesWalked}"); ImGui.Text($"Pits Fallen: {PitsFallen}"); ImGui.Text($"Bosses Defeated: {BossesDefeated}"); ImGui.Text($"Spikes Triggered: {SpikesTriggered}"); ImGui.Text($"Paintings Broke: {GlobalSave.GetInt("paintings_destroyed")}"); ImGui.Separator(); ImGui.Text($"Luck: {Run.Luck}"); ImGui.Text($"Scourge: {Run.Scourge}"); if (ImGui.TreeNode("Scourges")) { foreach (var curse in Scourge.Defined) { var v = Scourge.IsEnabled(curse); if (ImGui.Checkbox(curse, ref v)) { if (v) { Scourge.Enable(curse); } else { Scourge.Disable(curse); } } } ImGui.TreePop(); } }
public static void Render() { if (!WindowManager.Debug) { return; } if (!ImGui.Begin("Debug", ImGuiWindowFlags.AlwaysAutoResize)) { ImGui.End(); return; } if (Engine.Instance.StateRenderer is PixelPerfectGameRenderer pr) { ImGui.Checkbox("Enable Clip", ref pr.EnableClip); } if (Input.Blocked > 0) { ImGui.Text("Input blocked"); } else { ImGui.Text("Input free"); } ImGui.Text($"Multiplayer: {InGameState.Multiplayer}"); ImGui.Text($"Camera targets: {Camera.Instance.Targets.Count}"); var current = 0; var t = Engine.Instance.State.GetType(); for (var i = 0; i < types.Length; i++) { if (t == types[i]) { current = i; break; } } var old = current; if (ImGui.Combo("State", ref current, states, states.Length) && old != current) { if (current == 0) { Engine.Instance.SetState(new LoadState()); } else { Engine.Instance.SetState((GameState)Activator.CreateInstance(types[current])); } } if (ImGui.CollapsingHeader("Performance")) { lastMem += Engine.Delta; ImGui.Text($"Update time: {Engine.UpdateTime} ms"); ImGui.Text($"Render time: {Engine.RenderTime} ms"); float mem; using (var data = Process.GetCurrentProcess()) { mem = data.PrivateMemorySize64 / (1024f * 1024f); } ImGui.Text($"Memory: {mem} mb"); ImGui.SameLine(); if (ImGui.Button("GC")) { GC.Collect(); } if (lastMem > 0.5f) { lastMem = 0; for (var i = 1; i < memUsage.Length; i++) { memUsage[i - 1] = memUsage[i]; } memUsage[memUsage.Length - 1] = mem; } ImGui.PlotHistogram("Memory", ref memUsage[0], memUsage.Length, 0, null, 0, 2048, new System.Numerics.Vector2(300, 100)); ImGui.Text($"FPS: {Engine.Instance.Counter.CurrentFramesPerSecond}"); lastFps += Engine.Delta; if (lastFps > 0.5f) { lastFps = 0; for (var i = 1; i < fps.Length; i++) { fps[i - 1] = fps[i]; } fps[fps.Length - 1] = Engine.Instance.Counter.AverageFramesPerSecond; } ImGui.PlotHistogram("FPS", ref fps[0], fps.Length, 0, null, 0, 60); if (lastCall < (int)Engine.Time) { lastCall = (int)Engine.Time; for (var i = 1; i < cpuUsage.Length; i++) { cpuUsage[i - 1] = cpuUsage[i]; } cpuUsage[cpuUsage.Length - 1] = (float)Math.Round(cpuCounter.NextValue()); } ImGui.PlotHistogram("CPU", ref cpuUsage[0], cpuUsage.Length, 0, null, 0, 100); ImGui.DragFloat("Speed", ref Engine.Instance.Speed, 0.01f, 0.1f, 2f); ImGui.Text($"Draw calls: {Engine.Graphics.GraphicsDevice.Metrics.DrawCount}"); ImGui.Text($"Clear calls: {Engine.Graphics.GraphicsDevice.Metrics.ClearCount}"); ImGui.Text($"FBO binds: {Engine.Graphics.GraphicsDevice.Metrics.TargetCount}"); ImGui.Text($"Shader binds: {Engine.Graphics.GraphicsDevice.Metrics.PixelShaderCount}"); ImGui.Text($"Texture count: {Engine.Graphics.GraphicsDevice.Metrics.TextureCount}"); ImGui.Spacing(); ImGui.Checkbox("Enable batcher", ref GameRenderer.EnableBatcher); ImGui.Checkbox("Enable item shader", ref ItemShader); } if (ImGui.CollapsingHeader("Run info")) { ImGui.Text($"Run ID: {GlobalSave.RunId}"); ImGui.Text($"Type: {Run.Type}"); ImGui.Text($"Seed: {Run.Seed}"); ImGui.Text($"Kills: {Run.KillCount}"); ImGui.Text($"Time: {Run.FormatTime()}"); ImGui.Text($"Has run: {Run.HasRun}"); ImGui.Text($"Luck: {Run.Luck}"); ImGui.Text($"Scourge: {Run.Scourge}"); } if (ImGui.CollapsingHeader("Camera")) { var c = Camera.Instance; var v = c.X; if (ImGui.DragFloat("X", ref v)) { c.X = v; } v = c.Y; if (ImGui.DragFloat("Y", ref v)) { c.Y = v; } ImGui.Checkbox("Detatched", ref c.Detached); v = c.Zoom; if (ImGui.InputFloat("Zoom", ref v)) { c.Zoom = v; } ImGui.InputFloat("Texture zoom", ref c.TextureZoom); } ImGui.BulletText($"{GlobalSave.Emeralds} emeralds"); if (ImGui.Button("Go to hall (0)")) { Run.Depth = 0; } ImGui.SameLine(); if (ImGui.Button("Go to hub (-1)")) { Run.Depth = -1; } if (ImGui.Button("New run")) { Run.StartNew(); } ImGui.SameLine(); if (ImGui.Button("Kill")) { LocalPlayer.Locate(Run.Level.Area)?.GetComponent <HealthComponent>().Kill(null); } ImGui.Separator(); if (Run.Level != null) { var player = LocalPlayer.Locate(Run.Level.Area); if (player != null) { ImGui.Checkbox("Unhittable", ref player.GetComponent <HealthComponent>().Unhittable); } } ImGui.End(); }