public void AreaTranitionsMenu()
 {
     Settings.AreaTransition.Value = ImGuiExtension.Checkbox("Shows Area Transition Names", Settings.AreaTransition.Value);
     Settings.AreaTransitionHideLocalTranition.Value  = ImGuiExtension.Checkbox("Hide Same Area Transitions", Settings.AreaTransitionHideLocalTranition.Value);
     Settings.AreaTransitionHideInTownOrHideout.Value = ImGuiExtension.Checkbox("Hide In Town/Hideout", Settings.AreaTransitionHideInTownOrHideout.Value);
     Settings.AreaTransitionMaxLength.Value           = ImGuiExtension.IntSlider("Text Wrap Length", Settings.AreaTransitionMaxLength);
     Settings.AreaTransitionLargeMapYOffset.Value     = ImGuiExtension.IntSlider("large Map Text Y Offset", Settings.AreaTransitionLargeMapYOffset);
     Settings.AreaTransitionSizeSmall.Value           = ImGuiExtension.IntSlider("Text Size On Small Map", Settings.AreaTransitionSizeSmall);
     Settings.AreaTransitionSize.Value      = ImGuiExtension.IntSlider("Text Size", Settings.AreaTransitionSize);
     Settings.AreaTransitionColor           = ImGuiExtension.ColorPicker("Text Color", Settings.AreaTransitionColor);
     Settings.AreaTransitionColorBackground = ImGuiExtension.ColorPicker("Text Color Background", Settings.AreaTransitionColorBackground);
     Settings._Debug.Value = ImGuiExtension.Checkbox("Debug", Settings._Debug);
 }
Exemple #2
0
        public void TrialMenu()
        {
            ImGui.Text("Normal Trials");
            ImGui.Separator();
            ImGui.Columns(2, "normalTrials", true);
            for (var i = 0; i < 6; i++)
            {
                if (i == 3)
                {
                    ImGui.NextColumn();
                }
                TrialString(i);
            }

            ImGuiExtension.EndColumn();
            ImGui.Separator();
            ImGuiExtension.Spacing(4);
            ImGui.Text("Cruel Trials");
            ImGui.Separator();
            for (var i = 6; i < 9; i++)
            {
                TrialString(i);
            }
            ImGui.Separator();
            ImGuiExtension.Spacing(4);
            ImGui.Text("Merciless Trials");
            ImGui.Separator();
            for (var i = 9; i < 12; i++)
            {
                TrialString(i);
            }
            ImGui.Separator();
            ImGuiExtension.Spacing(4);
            ImGui.Text("Uber Trials");
            ImGui.Separator();
            ImGui.Columns(2, "uberTrials", true);
            for (var i = 12; i < 18; i++)
            {
                if (i == 15)
                {
                    ImGui.NextColumn();
                }
                TrialString(i);
            }

            ImGui.Separator();
            ImGuiExtension.EndColumn();
            Settings._Debug.Value = ImGuiExtension.Checkbox("Debug", Settings._Debug);
        }
Exemple #3
0
 private void WheresMyCursorMenu()
 {
     Settings.WmcMain.Value     = ImGuiExtension.Checkbox("Enable##FRNToggle", Settings.WmcMain);
     Settings.WmcLineType.Value = ImGuiExtension.ComboBox("Line Type?", Settings.WmcLineType.Value, new List <string>
     {
         "Maximum Length To Cursor",
         "Draw To The Mouse",
         "Draw To The Edge Of The Screen"
     });
     Settings.WmcLineColor.Value  = ImGuiExtension.ColorPicker("Line Color", Settings.WmcLineColor);
     Settings.WmcLineLength.Value = ImGuiExtension.IntSlider("Line Max Length", Settings.WmcLineLength);
     Settings.WmcLineSize.Value   = ImGuiExtension.IntSlider("Line Thickness", Settings.WmcLineSize);
     ImGui.Spacing();
     Settings.WmcPlayerOffsetX.Value = ImGuiExtension.IntSlider("Player Offset X", Settings.WmcPlayerOffsetX.Value, -100, 100);
     Settings.WmcPlayerOffsetY.Value = ImGuiExtension.IntSlider("Player Offset Y", Settings.WmcPlayerOffsetY.Value, -100, 100);
 }
Exemple #4
0
        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 void Render()
        {
            Plugin.Settings.TicksPerSecond.Value = ImGuiExtension.IntSlider("Ticks Per Second", Plugin.Settings.TicksPerSecond);
            Plugin.Settings.Debug = ImGuiExtension.Checkbox("Debug", Plugin.Settings.Debug);

            if (ImGui.TreeNodeEx("Individual Flask Settings", TreeNodeFlags.DefaultOpen))
            {
                for (int i = 0; i < 5; i++)
                {
                    FlaskSetting currentFlask = Plugin.Settings.FlaskSettings[i];
                    if (ImGui.TreeNodeEx("Flask " + (i + 1) + " Settings", TreeNodeFlags.DefaultOpen))
                    {
                        currentFlask.Hotkey.Value = ImGuiExtension.HotkeySelector("Hotkey", currentFlask.Hotkey);
                        ImGui.TreePop();
                    }
                }

                ImGui.TreePop();
            }
        }
Exemple #6
0
        public override bool CreateConfigurationMenu(ExtensionParameter extensionParameter, ref Dictionary <String, Object> Parameters)
        {
            ImGui.TextDisabled("Condition Info");
            ImGuiExtension.ToolTipWithText("(?)", "This condition will return true if the player has any of the selected ailments or a minimum of the specified corrupted blood stacks.");

            base.CreateConfigurationMenu(extensionParameter, ref Parameters);

            RemFrozen = ImGuiExtension.Checkbox("Frozen", RemFrozen);
            Parameters[RemFrozenString] = RemFrozen.ToString();

            RemBurning = ImGuiExtension.Checkbox("Burning", RemBurning);
            Parameters[RemBurningString] = RemBurning.ToString();

            RemShocked = ImGuiExtension.Checkbox("Shocked", RemShocked);
            Parameters[RemShockedString] = RemShocked.ToString();

            RemCurse = ImGuiExtension.Checkbox("Curse", RemCurse);
            Parameters[RemCurseString] = RemCurse.ToString();

            RemPoison = ImGuiExtension.Checkbox("Poison", RemPoison);
            Parameters[RemPoisonString] = RemPoison.ToString();

            RemBleed = ImGuiExtension.Checkbox("Bleed", RemBleed);
            Parameters[RemBleedString] = RemBleed.ToString();

            CorruptCount = ImGuiExtension.IntSlider("Corruption Count", CorruptCount, 0, 20);
            Parameters[CorruptCountString] = CorruptCount.ToString();

            RemMaim = ImGuiExtension.Checkbox("Maim", RemMaim);
            Parameters[RemMaimString] = RemMaim.ToString();

            HinderCount = ImGuiExtension.IntSlider("Hinder Count", HinderCount, 0, 20);
            Parameters[HinderCountString] = HinderCount.ToString();

            IgnoreInfiniteTimer = ImGuiExtension.Checkbox("Ignore Infinite Timer", IgnoreInfiniteTimer);
            Parameters[IgnoreInfiniteTimerString] = IgnoreInfiniteTimer.ToString();
            return(true);
        }
        public override bool CreateConfigurationMenu(ExtensionParameter extensionParameter, ref Dictionary <String, Object> Parameters)
        {
            ImGui.TextDisabled("Condition Info");
            ImGuiExtension.ToolTipWithText("(?)", "This condition will return true if any of the selected player's resistances\nare reduced by more than or equal to the specified amount.\nReduced max resistance modifiers are taken into effect automatically (e.g. -res map mods).");


            base.CreateConfigurationMenu(extensionParameter, ref Parameters);

            MinimumMonsterCount = ImGuiExtension.IntSlider("Minimum Monster Count", MinimumMonsterCount, 1, 50);
            Parameters[MinimumMonsterCountString] = MinimumMonsterCount.ToString();

            MaxDistance = ImGuiExtension.FloatSlider("Maximum Distance", MaxDistance, 1.0f, 5000.0f);
            Parameters[MaxDistanceString] = MaxDistance.ToString();

            PreviewDistance = ImGuiExtension.Checkbox("Preview distance", PreviewDistance);

            if (PreviewDistance)
            {
                //extensionParameter.Plugin.PlayerHelper.DrawSquareToWorld(extensionParameter.Plugin.GameController.Player.Pos, MaxDistance);
            }

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            ColdResistanceThreshold = ImGuiExtension.IntSlider("Cold Resist Above", ColdResistanceThreshold, 0, 75);
            Parameters[ColdResistanceThresholdString] = ColdResistanceThreshold.ToString();

            FireResistanceThreshold = ImGuiExtension.IntSlider("Fire Resist Above", FireResistanceThreshold, 0, 75);
            Parameters[FireResistanceThresholdString] = FireResistanceThreshold.ToString();

            LightningResistanceThreshold = ImGuiExtension.IntSlider("Lightning Resist Above", LightningResistanceThreshold, 0, 75);
            Parameters[LightningResistanceThresholdString] = LightningResistanceThreshold.ToString();

            ChaosResistanceThreshold = ImGuiExtension.IntSlider("Chaos Resist Above", ChaosResistanceThreshold, 0, 75);
            Parameters[ChaosResistanceThresholdString] = ChaosResistanceThreshold.ToString();

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            CountWhiteMonsters = ImGuiExtension.Checkbox("White Monsters", CountWhiteMonsters);
            Parameters[CountWhiteMonstersString] = CountWhiteMonsters.ToString();

            CountRareMonsters = ImGuiExtension.Checkbox("Rare Monsters", CountRareMonsters);
            Parameters[CountRareMonstersString] = CountRareMonsters.ToString();

            CountMagicMonsters = ImGuiExtension.Checkbox("Magic Monsters", CountMagicMonsters);
            Parameters[CountMagicMonstersString] = CountMagicMonsters.ToString();

            CountUniqueMonsters = ImGuiExtension.Checkbox("Unique Monsters", CountUniqueMonsters);
            Parameters[CountUniqueMonstersString] = CountUniqueMonsters.ToString();

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            MonsterHealthPercentThreshold = ImGuiExtension.IntSlider("Monster Health Percent", MonsterHealthPercentThreshold, 0, 100);
            Parameters[MonsterHealthPercentThresholdString] = MonsterHealthPercentThreshold.ToString();

            MonsterAboveHealthThreshold = ImGuiExtension.Checkbox("Above Health Threshold", MonsterAboveHealthThreshold);
            Parameters[MonsterAboveHealthThresholdString] = MonsterAboveHealthThreshold.ToString();

            return(true);
        }
        public override bool CreateConfigurationMenu(ExtensionParameter extensionParameter, ref Dictionary <String, Object> Parameters)
        {
            ImGui.TextDisabled("Action Info");
            ImGuiExtension.ToolTipWithText("(?)", "This action is used to use a specific type(s) of flask.\nFlask Hotkey will be pulled from plugin settings.\nFlask types will be pulled from the file /config/flaskinfo.json");

            useLife = ImGuiExtension.Checkbox("Life", useLife);
            Parameters[useLifeString] = useLife.ToString();

            ImGui.SameLine();
            useMana = ImGuiExtension.Checkbox("Mana", useMana);
            Parameters[useManaString] = useMana.ToString();

            ImGui.SameLine();
            useHybrid = ImGuiExtension.Checkbox("Hybrid", useHybrid);
            Parameters[useHybridString] = useHybrid.ToString();

            useInstant = ImGuiExtension.Checkbox("Use Instant", useInstant);
            ImGuiExtension.ToolTipWithText("(?)", "This only makes sense to use with life/mana/hybrid flasks");

            Parameters[useInstantString] = useInstant.ToString();

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            useDefense = ImGuiExtension.Checkbox("Defense", useDefense);
            Parameters[useDefenseString] = useDefense.ToString();


            ImGui.SameLine();
            useOffense = ImGuiExtension.Checkbox("Offense", useOffense);
            Parameters[useOffenseString] = useOffense.ToString();

            useUtility = ImGuiExtension.Checkbox("Utility", useUtility);
            Parameters[useUtilityString] = useUtility.ToString();

            ImGui.SameLine();
            useSpeedrun = ImGuiExtension.Checkbox("Speedrun", useSpeedrun);
            Parameters[useSpeedrunString] = useSpeedrun.ToString();

            useUnique = ImGuiExtension.Checkbox("Unique", useUnique);
            Parameters[useUniqueString] = useUnique.ToString();

            useOffenseAndSpeedrun = ImGuiExtension.Checkbox("Offense and Speedrun", useOffenseAndSpeedrun);
            Parameters[useOffenseAndSpeedrunString] = useOffenseAndSpeedrun.ToString();

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            usePoison = ImGuiExtension.Checkbox("Poison", usePoison);
            Parameters[usePoisonString] = usePoison.ToString();

            ImGui.SameLine();
            useFreeze = ImGuiExtension.Checkbox("Freeze", useFreeze);
            Parameters[useFreezeString] = useFreeze.ToString();

            useIgnite = ImGuiExtension.Checkbox("Ignite", useIgnite);
            Parameters[useIgniteString] = useIgnite.ToString();

            ImGui.SameLine();
            useShock = ImGuiExtension.Checkbox("Shock", useShock);
            Parameters[useShockString] = useShock.ToString();

            useBleed = ImGuiExtension.Checkbox("Bleed", useBleed);
            Parameters[useBleedString] = useBleed.ToString();

            ImGui.SameLine();
            useCurse = ImGuiExtension.Checkbox("Curse", useCurse);
            Parameters[useCurseString] = useCurse.ToString();

            ImGui.Spacing();
            ImGui.Separator();
            ImGui.Spacing();

            reserveFlaskCharges = ImGuiExtension.IntSlider("Reserved Charges", reserveFlaskCharges, 0, 5);
            Parameters[reserveFlaskChargesString] = reserveFlaskCharges.ToString();

            return(true);
        }
        public override void DrawSettings()
        {
            //base.DrawSettings();

            ImGuiTreeNodeFlags collapsingHeaderFlags = ImGuiTreeNodeFlags.CollapsingHeader;

            if (ImGui.TreeNodeEx("Plugin Options", collapsingHeaderFlags))
            {
                Settings.EnableInHideout.Value = ImGuiExtension.Checkbox("Enable in Hideout", Settings.EnableInHideout);
                ImGui.Separator();
                Settings.TicksPerSecond.Value = ImGuiExtension.IntSlider("Ticks Per Second", Settings.TicksPerSecond); ImGuiExtension.ToolTipWithText("(?)", "Determines how many times the plugin checks flasks every second.\nLower for less resources, raise for faster response (but higher chance to chug potions).");
                ImGui.Separator();
                Settings.Debug.Value = ImGuiExtension.Checkbox("Debug Mode", Settings.Debug);
                ImGui.Separator();
                Settings.BossingModeToggle.Value = ImGuiExtension.Checkbox("Disable Defensive and Offensive Flasking", Settings.BossingModeToggle);
                ImGui.Separator();
                Settings.BossingModeHotkey.Value = ImGuiExtension.HotkeySelector("BossingModeHotkey", Settings.BossingModeHotkey.Value);
                ImGui.TreePop();
            }


            if (ImGui.TreeNodeEx("Flask Options", collapsingHeaderFlags))
            {
                if (ImGui.TreeNode("Individual Flask Settings"))
                {
                    for (int i = 0; i < 5; i++)
                    {
                        FlaskSetting currentFlask = Settings.FlaskSettings[i];
                        if (ImGui.TreeNode("Flask " + (i + 1) + " Settings"))
                        {
                            currentFlask.Enabled.Value      = ImGuiExtension.Checkbox("Enable", currentFlask.Enabled);
                            currentFlask.Hotkey.Value       = ImGuiExtension.HotkeySelector("Hotkey", currentFlask.Hotkey);
                            currentFlask.ReservedUses.Value =
                                ImGuiExtension.IntSlider("Reserved Uses", currentFlask.ReservedUses);
                            ImGuiExtension.ToolTipWithText("(?)",
                                                           "The absolute number of uses reserved on a flask.\nSet to 1 to always have 1 use of the flask available for manual use.");
                            ImGui.TreePop();
                        }
                    }

                    ImGui.TreePop();
                }

                if (ImGui.TreeNode("Health and Mana"))
                {
                    Settings.AutoFlask.Value = ImGuiExtension.Checkbox("Enable", Settings.AutoFlask);

                    ImGuiExtension.SpacedTextHeader("Settings");
                    Settings.ForceBubblingAsInstantOnly.Value =
                        ImGuiExtension.Checkbox("Force Bubbling as Instant only", Settings.ForceBubblingAsInstantOnly);
                    ImGuiExtension.ToolTipWithText("(?)",
                                                   "When enabled, flasks with the Bubbling mod will only be used as an instant flask.");
                    Settings.ForcePanickedAsInstantOnly.Value =
                        ImGuiExtension.Checkbox("Force Panicked as Instant only", Settings.ForcePanickedAsInstantOnly);
                    ImGuiExtension.ToolTipWithText("(?)",
                                                   "When enabled, flasks with the Panicked mod will only be used as an instant flask. \nNote, Panicked will not be used until under 35%% with this enabled."); //
                    ImGuiExtension.SpacedTextHeader("Health Flask");
                    Settings.HPPotion.Value        = ImGuiExtension.IntSlider("Min Life % Auto HP Flask", Settings.HPPotion);
                    Settings.InstantHPPotion.Value =
                        ImGuiExtension.IntSlider("Min Life % Auto Instant HP Flask", Settings.InstantHPPotion);
                    Settings.DisableLifeSecUse.Value =
                        ImGuiExtension.Checkbox("Disable Life/Hybrid Flask Offensive/Defensive Usage",
                                                Settings.DisableLifeSecUse);

                    ImGuiExtension.SpacedTextHeader("Mana Flask");
                    ImGui.Spacing();
                    Settings.ManaPotion.Value =
                        ImGuiExtension.IntSlider("Min Mana % Auto Mana Flask", Settings.ManaPotion);
                    Settings.InstantManaPotion.Value = ImGuiExtension.IntSlider("Min Mana % Auto Instant MP Flask",
                                                                                Settings.InstantManaPotion);
                    Settings.MinManaFlask.Value =
                        ImGuiExtension.IntSlider("Min Mana Auto Mana Flask", Settings.MinManaFlask);
                    ImGui.TreePop();
                }

                if (ImGui.TreeNode("Remove Ailments"))
                {
                    Settings.RemAilment.Value = ImGuiExtension.Checkbox("Enable", Settings.RemAilment);

                    ImGuiExtension.SpacedTextHeader("Ailments");
                    Settings.RemFrozen.Value = ImGuiExtension.Checkbox("Frozen", Settings.RemFrozen);
                    ImGui.SameLine();
                    Settings.RemBurning.Value = ImGuiExtension.Checkbox("Burning", Settings.RemBurning);
                    Settings.RemShocked.Value = ImGuiExtension.Checkbox("Shocked", Settings.RemShocked);
                    ImGui.SameLine();
                    Settings.RemCurse.Value  = ImGuiExtension.Checkbox("Cursed", Settings.RemCurse);
                    Settings.RemPoison.Value = ImGuiExtension.Checkbox("Poison", Settings.RemPoison);
                    ImGui.SameLine();
                    Settings.RemBleed.Value     = ImGuiExtension.Checkbox("Bleed", Settings.RemBleed);
                    Settings.CorruptCount.Value =
                        ImGuiExtension.IntSlider("Corrupting Blood Stacks", Settings.CorruptCount);
                    ImGui.TreePop();
                }

                if (ImGui.TreeNode("Speed Flasks"))
                {
                    Settings.SpeedFlaskEnable.Value = ImGuiExtension.Checkbox("Enable", Settings.SpeedFlaskEnable);

                    ImGuiExtension.SpacedTextHeader("Flasks");
                    Settings.QuicksilverFlaskEnable.Value =
                        ImGuiExtension.Checkbox("Quicksilver Flask", Settings.QuicksilverFlaskEnable);
                    Settings.SilverFlaskEnable.Value =
                        ImGuiExtension.Checkbox("Silver Flask", Settings.SilverFlaskEnable);

                    ImGuiExtension.SpacedTextHeader("Settings");
                    Settings.MinMsPlayerMoving.Value =
                        ImGuiExtension.IntSlider("Milliseconds Spent Moving", Settings.MinMsPlayerMoving);
                    ImGuiExtension.ToolTipWithText("(?)",
                                                   "Milliseconds spent moving before flask will be used.\n1000 milliseconds = 1 second");
                    ImGui.TreePop();
                }

                if (ImGui.TreeNode("Defensive Flasks"))
                {
                    Settings.DefensiveFlaskEnable.Value =
                        ImGuiExtension.Checkbox("Enable", Settings.DefensiveFlaskEnable);
                    ImGui.Spacing();
                    ImGui.Separator();
                    Settings.HPPercentDefensive.Value =
                        ImGuiExtension.IntSlider("Min Life %", Settings.HPPercentDefensive);
                    Settings.ESPercentDefensive.Value =
                        ImGuiExtension.IntSlider("Min ES %", Settings.ESPercentDefensive);
                    Settings.OffensiveAsDefensiveEnable.Value =
                        ImGuiExtension.Checkbox("Use offensive flasks for defense",
                                                Settings.OffensiveAsDefensiveEnable);
                    ImGui.Separator();

                    Settings.DefensiveMonsterCount.Value =
                        ImGuiExtension.IntSlider("Monster Count", Settings.DefensiveMonsterCount);
                    Settings.DefensiveMonsterDistance.Value =
                        ImGuiExtension.IntSlider("Monster Distance", Settings.DefensiveMonsterDistance);
                    Settings.DefensiveCountNormalMonsters.Value =
                        ImGuiExtension.Checkbox("Normal Monsters", Settings.DefensiveCountNormalMonsters);
                    Settings.DefensiveCountRareMonsters.Value =
                        ImGuiExtension.Checkbox("Rare Monsters", Settings.DefensiveCountRareMonsters);
                    Settings.DefensiveCountMagicMonsters.Value =
                        ImGuiExtension.Checkbox("Magic Monsters", Settings.DefensiveCountMagicMonsters);
                    Settings.DefensiveCountUniqueMonsters.Value =
                        ImGuiExtension.Checkbox("Unique Monsters", Settings.DefensiveCountUniqueMonsters);
                    Settings.DefensiveIgnoreFullHealthUniqueMonsters.Value =
                        ImGuiExtension.Checkbox("Ignore Full Health Unique Monsters", Settings.DefensiveIgnoreFullHealthUniqueMonsters);
                    ImGui.TreePop();
                }

                if (ImGui.TreeNode("Offensive Flasks"))
                {
                    Settings.OffensiveFlaskEnable.Value =
                        ImGuiExtension.Checkbox("Enable", Settings.OffensiveFlaskEnable);
                    ImGui.Spacing();
                    ImGui.Separator();
                    Settings.HPPercentOffensive.Value =
                        ImGuiExtension.IntSlider("Min Life %", Settings.HPPercentOffensive);
                    Settings.ESPercentOffensive.Value =
                        ImGuiExtension.IntSlider("Min ES %", Settings.ESPercentOffensive);
                    ImGui.Separator();
                    Settings.OffensiveMonsterCount.Value =
                        ImGuiExtension.IntSlider("Monster Count", Settings.OffensiveMonsterCount);
                    Settings.OffensiveMonsterDistance.Value =
                        ImGuiExtension.IntSlider("Monster Distance", Settings.OffensiveMonsterDistance);
                    Settings.OffensiveCountNormalMonsters.Value =
                        ImGuiExtension.Checkbox("Normal Monsters", Settings.OffensiveCountNormalMonsters);
                    Settings.OffensiveCountRareMonsters.Value =
                        ImGuiExtension.Checkbox("Rare Monsters", Settings.OffensiveCountRareMonsters);
                    Settings.OffensiveCountMagicMonsters.Value =
                        ImGuiExtension.Checkbox("Magic Monsters", Settings.OffensiveCountMagicMonsters);
                    Settings.OffensiveCountUniqueMonsters.Value =
                        ImGuiExtension.Checkbox("Unique Monsters", Settings.OffensiveCountUniqueMonsters);
                    Settings.OffensiveIgnoreFullHealthUniqueMonsters.Value =
                        ImGuiExtension.Checkbox("Ignore Full Health Unique Monsters", Settings.OffensiveIgnoreFullHealthUniqueMonsters);
                    ImGui.TreePop();
                }

                ImGui.TreePop();
            }
        }
Exemple #10
0
        public override void DrawSettingsMenu()
        {
            bool outBool;

            if (ImGuiExtension.Checkbox(Settings.Resolution ? "Background: Plain Square" : "Background: Image suitable for 1920x1080 only", Settings.Resolution, out outBool) && ImGui.TreeNode("Background Settings"))
            {
                Settings.ResolutionTop.Value    = ImGuiExtension.IntSlider("Top", Settings.ResolutionTop);
                Settings.ResolutionBottom.Value = ImGuiExtension.IntSlider("Bottom", Settings.ResolutionBottom);
                Settings.ResolutionLeft.Value   = ImGuiExtension.IntSlider("Left", Settings.ResolutionLeft);
                Settings.ResolutionRight.Value  = ImGuiExtension.IntSlider("Right", Settings.ResolutionRight);
                Settings.LevelBackColor         = ImGuiExtension.ColorPicker("Background Color", Settings.LevelBackColor);
                ImGui.Separator();
                ImGui.TreePop();
            }

            Settings.Resolution.Value = outBool;
            if (ImGui.TreeNode("Health/Mana Boxes"))
            {
                ImGui.SetNextTreeNodeOpen(true, Condition.Once);
                if (ImGui.TreeNode("Health %"))
                {
                    Settings.HealthToggle      = ImGuiExtension.Checkbox("Health % (" + (Settings.HealthToggle ? "Show" : "Hide") + ")", Settings.HealthToggle);
                    Settings.HpPositionX.Value = ImGuiExtension.IntSlider("HP X", Settings.HpPositionX);
                    Settings.HpPositionY.Value = ImGuiExtension.IntSlider("HP Y", Settings.HpPositionY);
                    Settings.HpTextColor       = ImGuiExtension.ColorPicker("HP Text", Settings.HpTextColor);
                    Settings.HpBackColor       = ImGuiExtension.ColorPicker("HP Background", Settings.HpBackColor);
                    ImGui.TreePop();
                }

                ImGui.SetNextTreeNodeOpen(true, Condition.Once);
                if (ImGui.TreeNode("Mana %"))
                {
                    Settings.ManaToggle        = ImGuiExtension.Checkbox("Mana % (" + (Settings.ManaToggle ? "Show" : "Hide") + ")", Settings.ManaToggle);
                    Settings.MpPositionX.Value = ImGuiExtension.IntSlider("MP X", Settings.MpPositionX);
                    Settings.MpPositionY.Value = ImGuiExtension.IntSlider("MP Y", Settings.MpPositionY);
                    Settings.MpTextColor       = ImGuiExtension.ColorPicker("MP Text", Settings.MpTextColor);
                    Settings.MpBackColor       = ImGuiExtension.ColorPicker("MP Background", Settings.MpBackColor);
                    ImGui.Separator();
                    ImGui.TreePop();
                }

                ImGui.TreePop();
            }

            if (ImGui.TreeNode("Player Resistance UI"))
            {
                Settings.Resistances        = ImGuiExtension.Checkbox("Player Resistance UI (" + (Settings.Resistances ? "Show" : "Hide") + ")", Settings.Resistances);
                Settings.ResistanceX.Value  = ImGuiExtension.IntSlider("Res X", Settings.ResistanceX);
                Settings.ResistanceY.Value  = ImGuiExtension.IntSlider("Res Y", Settings.ResistanceY);
                Settings.ResistanceTextSize = ImGuiExtension.IntSlider("Res Text Size", Settings.ResistanceTextSize, 1, 40);
                ImGui.Spacing();
                Settings.FireResistanceColor      = ImGuiExtension.ColorPicker("Fire Res Color", Settings.FireResistanceColor);
                Settings.ColdResistanceColor      = ImGuiExtension.ColorPicker("Cold Res Color", Settings.ColdResistanceColor);
                Settings.LightningResistanceColor = ImGuiExtension.ColorPicker("Light Res Color", Settings.LightningResistanceColor);
                Settings.ChaosResistanceColor     = ImGuiExtension.ColorPicker("Chaos Res Color", Settings.ChaosResistanceColor);
                ImGui.Separator();
                ImGui.TreePop();
            }

            if (ImGui.TreeNode("Delve Info UI"))
            {
                Settings.Delveinfo         = ImGuiExtension.Checkbox("Delve Info UI (" + (Settings.Delveinfo ? "Show" : "Hide") + ")", Settings.Delveinfo);
                Settings.DelveinfoX.Value  = ImGuiExtension.IntSlider("Delveinfo X", Settings.DelveinfoX);
                Settings.DelveinfoY.Value  = ImGuiExtension.IntSlider("Delveinfo Y", Settings.DelveinfoY);
                Settings.DelveinfoTextSize = ImGuiExtension.IntSlider("Delveinfo Text Size", Settings.DelveinfoTextSize, 1, 40);
                ImGui.Spacing();
                Settings.DelveinfoSulphiteColor = ImGuiExtension.ColorPicker("Sulphite Color", Settings.DelveinfoSulphiteColor);
                Settings.DelveinfoAzuriteColor  = ImGuiExtension.ColorPicker("Azurite Color", Settings.DelveinfoAzuriteColor);
                ImGui.Separator();
                ImGui.TreePop();
            }

            if (ImGui.TreeNode("Instance Information"))
            {
                Settings.LevelToggle            = ImGuiExtension.Checkbox("Instance Information (" + (Settings.LevelToggle ? "Show" : "Hide") + ")", Settings.LevelToggle);
                Settings.SaveToFile.Value       = ImGuiExtension.Checkbox("Log To File", Settings.SaveToFile);
                Settings.LastAreaDuration.Value = ImGuiExtension.IntSlider("Last Area Log In Seconds", Settings.LastAreaDuration);
                ImGui.Spacing();
                Settings.LevelPositionX.Value = ImGuiExtension.IntSlider("Instance Info X", Settings.LevelPositionX);
                Settings.LevelPositionY.Value = ImGuiExtension.IntSlider("Instance Info Y", Settings.LevelPositionY);
                Settings.LevelTextColor       = ImGuiExtension.ColorPicker("Instance Info Text Color", Settings.LevelTextColor);
                Settings.LevelTextSize.Value  = ImGuiExtension.IntSlider("Instance Info Text Size", Settings.LevelTextSize);
                ImGui.TreePop();
            }

            if (ImGui.TreeNode("Experience Bar"))
            {
                Settings.ExperienceBar = ImGuiExtension.Checkbox("Experience Bar Percent (" + (Settings.ExperienceBar ? "Show" : "Hide") + ")", Settings.ExperienceBar);
                ImGui.TreePop();
            }

            ImGui.BeginChild("CharacteLogs", true, WindowFlags.AlwaysVerticalScrollbar);
            var levelLogs     = new LevelLogs();
            var path1         = $"{PluginDirectory}\\Level Entry\\{LocalPlayer.Name}\\";
            var path2         = $"{path1}JsonLog.json";
            var directoryName = Path.GetDirectoryName(path1);

            if (!Directory.Exists(directoryName) && directoryName != null)
            {
                Directory.CreateDirectory(directoryName);
            }
            try
            {
                var str = File.ReadAllText(path2);
                if (string.IsNullOrEmpty(str.Trim()))
                {
                    throw new Exception();
                }
                if (str == "null")
                {
                    throw new Exception();
                }
                var m0 = JsonConvert.DeserializeObject <LevelLogs>(str);
                m0.Entries.Reverse();
                foreach (var entry in m0.Entries)
                {
                    if (ImGui.TreeNode(entry.Id))
                    {
                        ImGui.SetNextTreeNodeOpen(true, Condition.Appearing);
                        if (ImGui.TreeNode("Info"))
                        {
                            ImGui.Text($"Date: {entry.Info.Date}");
                            ImGui.SetNextTreeNodeOpen(true, Condition.Appearing);
                            if (ImGui.TreeNode("Level"))
                            {
                                ImGuiNative.igIndent();
                                ImGui.Text($"Current LvL: {entry.Info.Level.CurrentLevel}");
                                ImGui.Text($"Current LvL %%: {entry.Info.Level.CurrentLevelPercent}");
                                ImGui.Text($"Exp Gained: {entry.Info.Level.ExperiencedGained}");
                                ImGui.Text($"Exp Gained %%: {entry.Info.Level.ExperienceGainedPercent}");
                                ImGui.Text($"Level Ups: {entry.Info.Level.LevelUps}");
                                ImGuiNative.igUnindent();
                                ImGui.TreePop();
                            }

                            ImGui.SetNextTreeNodeOpen(true, Condition.Appearing);
                            if (ImGui.TreeNode("Area"))
                            {
                                ImGuiNative.igIndent();
                                ImGui.Text($"Area: {entry.Info.Area.Name}");
                                ImGui.Text($"LvL Difference: {entry.Info.Area.LevelDifference}");
                                ImGui.Text($"Run Time: {entry.Info.Area.TimeSpent}");
                                ImGui.Text($"Same Area LvL ETA: {entry.Info.Area.SameAreaEta.Left}/{entry.Info.Area.SameAreaEta.TotalForLevel}");
                                ImGuiNative.igUnindent();
                                ImGui.TreePop();
                            }

                            ImGui.TreePop();
                        }

                        ImGui.TreePop();
                    }
                }
            }
            catch
            {
            }

            ImGui.EndChild();
        }
Exemple #11
0
        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();
                }
            }
        }
Exemple #12
0
        public void LevelSkillGemsMenu()
        {
            Settings.LevelSkillGems.Value = ImGuiExtension.Checkbox("Active Skill Gem Leveling Functions", Settings.LevelSkillGems.Value);
            ImGui.Spacing();
            Settings.LevelSkillGemsHotkey = PoeHUD.Hud.UI.ImGuiExtension.HotkeySelector("Level Up Skill Gems", Settings.LevelSkillGemsHotkey);
            ImGui.Separator();
            Settings.LevlSkillGemIsLeftClick = PoeHUD.Hud.UI.ImGuiExtension.Checkbox("Left click to level Gems Up, Unticked if Right Click", Settings.LevlSkillGemIsLeftClick);
            ImGui.Separator();
            ImGui.Spacing();

            bool WeExistInRuleSet = false;
            var  PlayerName       = GameController.Player.GetComponent <Player>().PlayerName;

            if (Settings.SkillGemStopList == null)
            {
                Settings.SkillGemStopList.Add(new Person()
                {
                    Character = PlayerName,
                    Rules     = new List <GemLevelRule>()
                });
            }
            if (Settings.SkillGemStopList.Any(t => t.Character == PlayerName))
            {
                WeExistInRuleSet = true;
            }

            if (!WeExistInRuleSet)
            {
                Settings.SkillGemStopList.Add(new Person
                {
                    Character = PlayerName,
                    Rules     = new List <GemLevelRule>()
                });
            }

            if (ImGui.CollapsingHeader($"Gem Leveling Rules For - {PlayerName}", "##GemLevelingRules", true, true))
            {
                ImGui.Text("How Does It Work");
                PoeHUD.Hud.UI.ImGuiExtension.ToolTip("All gems are leveled up UNLESS the rules below catch the gem\n"
                                                     + "Example, you dont want CWDT to be leveled past 3\n"
                                                     + "Add \"Cast When Damage Taken Support\" with max level of 3\n"
                                                     + "When the gem is level 3 it will right click to hide that gem and it wont be leveled any further");

                var i = -1;
                for (int index = 0; index < Settings.SkillGemStopList.Count; index++)
                {
                    Person PersonCheck = Settings.SkillGemStopList[index];
                    if (PersonCheck.Character == GameController.Player.GetComponent <Player>().PlayerName)
                    {
                        i = index;
                    }
                }

                var RulesToRemove = new List <int>();

                ImGui.Separator();
                ImGui.Columns(3, "Columns", true);
                ImGui.SetColumnWidth(0, 30f);
                ImGui.Text("");
                ImGui.NextColumn();
                ImGui.Text("Full Gem Name");
                ImGui.NextColumn();
                ImGui.Text("Maximum Level");
                ImGui.NextColumn();
                if (Settings.SkillGemStopList[i].Rules.Count != 0)
                {
                    ImGui.Separator();
                }
                for (int j = 0; j < Settings.SkillGemStopList[i].Rules.Count; j++)
                {
                    if (ImGui.Button($"X##REMOVERULE{i}{j}"))
                    {
                        RulesToRemove.Add(j);
                    }

                    ImGui.NextColumn();
                    ImGui.PushItemWidth(ImGui.GetContentRegionAvailableWidth());
                    Settings.SkillGemStopList[i].Rules[j].GemName =
                        PoeHUD.Hud.UI.ImGuiExtension.InputText($"##GN{i}{j}", Settings.SkillGemStopList[i].Rules[j].GemName, 35,
                                                               InputTextFlags.Default);
                    ImGui.PopItemWidth();
                    //ImGui.SameLine();
                    ImGui.NextColumn();
                    ImGui.PushItemWidth(ImGui.GetContentRegionAvailableWidth());
                    Settings.SkillGemStopList[i].Rules[j].MaxLevel =
                        PoeHUD.Hud.UI.ImGuiExtension.IntSlider($"##ML{i}{j}", Settings.SkillGemStopList[i].Rules[j].MaxLevel, 1, 20);
                    ImGui.NextColumn();
                    ImGui.PopItemWidth();
                }

                foreach (int i1 in RulesToRemove)
                {
                    Settings.SkillGemStopList[i].Rules.Remove(Settings.SkillGemStopList[i].Rules[i1]);
                }

                ImGui.Separator();
                ImGui.Columns(1, "", false);
                if (ImGui.Button($"Add New##AN{i}"))
                {
                    Settings.SkillGemStopList[i]
                    .Rules.Add(new GemLevelRule
                    {
                        GemName  = "Cast when Damage Taken Support",
                        MaxLevel = 1
                    });
                }
            }
        }
        public bool Render()
        {
            TriggerComposite.Name = ImGuiExtension.InputText("Trigger Name", TriggerComposite.Name, 50, ImGuiInputTextFlags.AlwaysInsertMode);

            bool shouldPerformClear = false;
            int  radioTarget        = (int)TriggerComposite.Type;

            shouldPerformClear |= ImGui.RadioButton("PrioritySelector", ref radioTarget, (int)TriggerType.PrioritySelector);
            ImGuiExtension.ToolTipWithText("(?)", "A PrioritySelector runs a list of composites in order from first to last until one of the composites returns true.");

            ImGui.SameLine();
            shouldPerformClear |= ImGui.RadioButton("Sequence", ref radioTarget, (int)TriggerType.Sequence);
            ImGuiExtension.ToolTipWithText("(?)", "A Sequence runs a list of composites in order from first to last until one of the composites returns false.");

            shouldPerformClear |= ImGui.RadioButton("Decorator", ref radioTarget, (int)TriggerType.Decorator);
            ImGuiExtension.ToolTipWithText("(?)", "A Decorator will run its child if all conditions return true.\nThink of this as an if condition.");

            ImGui.SameLine();
            var choseAction = ImGui.RadioButton("Action", ref radioTarget, (int)TriggerType.Action);

            ImGuiExtension.ToolTipWithText("(?)", "An action is a final point in a behavior tree.\nActions can return true or false.\nAll branches MUST end in an action.");

            if (choseAction && TriggerComposite.Children != null && TriggerComposite.Children.Any() || // If we chose action, make sure we don't have any children
                (TriggerType)radioTarget == TriggerType.Decorator && TriggerComposite.Children != null && TriggerComposite.Children.Count > 1)    // if we chose decorator, make sure we don't have more than 1 child
            {
                OpenOKMenu = true;
                OKMessage  = "Trigger has too many children to change to this type.\nRemove unnecessary children and try again.";

                // Reset everything so the below logic can remain the same
                shouldPerformClear = false;
                choseAction        = false;
                radioTarget        = (int)TriggerComposite.Type;
            }

            if (shouldPerformClear || choseAction)
            {
                ActiveWorkingTriggerCondition = null;
                TriggerComposite.Action       = null;
                SelectedOption1 = -1;
                SelectedOption2 = -1;
            }

            // Save off the selected type into the composite
            TriggerComposite.Type = (TriggerType)radioTarget;

            // There is no configuration unless we are an action or decorator
            if (TriggerComposite.Type == TriggerType.Action || TriggerComposite.Type == TriggerType.Decorator)
            {
                if (ImGui.TreeNodeEx("Configuration", ImGuiTreeNodeFlags.Leaf))
                {
                    if (TriggerComposite.Type == TriggerType.Action)
                    {
                        // TODO: HashSet is not guaranteed ordered. This should be fixed later
                        var filterList = ExtensionParameter.Plugin.ExtensionCache.ActionFilterList.ToList();
                        FilterOption = ImGuiExtension.ComboBox("Filter Type", FilterOption, filterList);

                        var actionList = ExtensionParameter.Plugin.ExtensionCache.ActionList;
                        if (filterList[FilterOption] != ExtensionComponentFilterType.None)
                        {
                            actionList = actionList.Where(x => x.GetFilterTypes().Contains(filterList[FilterOption])).ToList();
                        }

                        int previouslySelectedAction = SelectedOption1;
                        SelectedOption1 = ImGuiExtension.ComboBox("Action List", SelectedOption1, actionList.Select(x => x.Owner + ": " + x.Name).ToList());
                        if (SelectedOption1 >= 0)
                        {
                            // If we do not have an extension action cached OR we swapped actions... initialize values
                            if (ActiveWorkingExtensionAction == null || previouslySelectedAction != SelectedOption1)
                            {
                                var action = actionList[SelectedOption1];
                                if (TriggerComposite.Action == null)
                                {
                                    TriggerComposite.Action = new TriggerAction(action.Owner, action.Name);
                                }

                                ActiveWorkingExtensionAction = action.GetAction();
                            }

                            // Render the menu and ensure the parameters get saved to the action
                            ActiveWorkingExtensionAction.CreateConfigurationMenu(ExtensionParameter, ref TriggerComposite.Action.Parameters);
                        }
                    }
                    else if (TriggerComposite.Type == TriggerType.Decorator)
                    {
                        TriggerComposite.AlwaysContinue = ImGuiExtension.Checkbox("Always Continue", TriggerComposite.AlwaysContinue);
                        ImGuiExtension.ToolTipWithText("(?)", "When enabled, the decorator will not end a sequence, even if its child fails.");

                        SelectedOption1 = ImGuiExtension.ComboBox("Conditions", SelectedOption1, TriggerComposite.ConditionList.Select(x => x.Owner + ": " + x.Name).ToList());
                        if (ImGui.Button("AddCondition"))
                        {
                            //if (ActiveWorkingTriggerCondition == null)
                            //{
                            ActiveWorkingTriggerCondition = new TriggerCondition();
                            //}

                            ImGui.OpenPopup("Add Condition");
                        }

                        var selectedCondition = TriggerComposite.ConditionList.ElementAtOrDefault(SelectedOption1);
                        if (selectedCondition != null)
                        {
                            ImGui.SameLine();

                            if (ImGui.Button("Edit"))
                            {
                                //if (ActiveWorkingTriggerCondition == null)
                                //{
                                ActiveWorkingTriggerCondition = new TriggerCondition(selectedCondition);
                                EditedTriggerCondition        = selectedCondition;
                                //}

                                ImGui.OpenPopup("Add Condition");
                            }

                            ImGui.SameLine();

                            if (ImGui.Button("Remove"))
                            {
                                TriggerComposite.ConditionList.Remove(TriggerComposite.ConditionList[SelectedOption1]);
                            }
                        }

                        RenderAddConditionMenu();
                    }
                    ImGui.TreePop();
                }
            }

            if (ImGui.Button("Save Trigger"))
            {
                // Validation
                if (TriggerComposite.Name == null || TriggerComposite.Name.Length == 0)
                {
                    OpenOKMenu = true;
                    OKMessage  = "Must give a trigger name.";
                }
                else
                {
                    if (EditedTrigger != null)
                    {
                        // We are editing. Copy everything from the new trigger to the old instance
                        EditedTrigger.Name          = TriggerComposite.Name;
                        EditedTrigger.Type          = TriggerComposite.Type;
                        EditedTrigger.Children      = TriggerComposite.Children;
                        EditedTrigger.ConditionList = TriggerComposite.ConditionList;
                        EditedTrigger.Action        = TriggerComposite.Action;
                        // Finally, clear out our TriggerCompsite. Otherwise, the caller will think we are adding a new trigger
                        TriggerComposite = null;
                    }
                    return(false);
                }
            }


            ImGui.SameLine();

            if (ImGui.Button("Cancel trigger"))
            {
                TriggerComposite = null;
                return(false);
            }

            if (OpenOKMenu)
            {
                ImGui.OpenPopup("OK Menu");
                OpenOKMenu = false;
            }

            bool testOpen = true;

            if (ImGui.BeginPopupModal("OK Menu", ref testOpen, ImGuiWindowFlags.AlwaysAutoResize))
            {
                ImGui.TextDisabled(OKMessage);
                if (ImGui.SmallButton("OK"))
                {
                    ImGui.CloseCurrentPopup();
                }
                ImGui.EndPopup();
            }

            return(true);
        }
Exemple #14
0
        public void DelveMenu(int idIn, out int idPop)
        {
            idPop = idIn;
            if (ImGui.TreeNode("Delve Map Grid - Shown only when fully zoomed in"))
            {
                ImGui.PushID(idPop);
                Settings.DelveGridMap.Value = ImGuiExtension.Checkbox(Settings.DelveGridMap.Value ? "Show" : "Hidden", Settings.DelveGridMap);
                ImGui.PopID();
                idPop++;
                ImGui.PushID(idPop);
                if (ImGui.Button("Set current Delve Zoom as the zoom you want to show grid\r\nZoom in all the way then press the button"))
                {
                    Settings.DelveGridMapScale = CurrentDelveMapZoom;
                }
                ImGui.PopID();
                idPop++;
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Delve Path's"))
            {
                ImGui.PushID(idPop);
                Settings.DelvePathWays.Value = ImGuiExtension.Checkbox(Settings.DelvePathWays.Value ? "Show" : "Hidden", Settings.DelvePathWays);
                ImGui.PopID();
                idPop++;

                ImGui.Spacing();
                ImGui.PushID(idPop);
                Settings.DelvePathWaysNodeSize.Value = ImGuiExtension.IntSlider("Size", Settings.DelvePathWaysNodeSize);
                ImGui.PopID();
                idPop++;
                ImGui.PushID(idPop);
                Settings.DelvePathWaysNodeColor = ImGuiExtension.ColorPicker("Color", Settings.DelvePathWaysNodeColor);
                ImGui.PopID();
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveWall.Value = ImGuiExtension.Checkbox($"Breakable Wall##{idPop}", Settings.DelveWall);
                idPop++;
                Settings.DelveWallSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveWallSize);
                idPop++;
                Settings.DelveWallColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveWallColor);
                idPop++;
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Delve Chests"))
            {
                ImGui.PushID(idPop);
                Settings.DelveChests.Value = ImGuiExtension.Checkbox(Settings.DelveChests.Value ? "Show" : "Hidden", Settings.DelveChests);
                ImGui.PopID();
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelvePathwayChest.Value = ImGuiExtension.Checkbox($"Hidden Chests on the way##{idPop}", Settings.DelvePathwayChest);
                idPop++;
                Settings.DelvePathwayChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelvePathwayChestSize);
                idPop++;
                Settings.DelvePathwayChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelvePathwayChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveMiningSuppliesDynamiteChest.Value = ImGuiExtension.Checkbox($"Dynamite Supplies##{idPop}", Settings.DelveMiningSuppliesDynamiteChest);
                idPop++;
                Settings.DelveMiningSuppliesDynamiteChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesDynamiteChestSize);
                idPop++;
                Settings.DelveMiningSuppliesDynamiteChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesDynamiteChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveMiningSuppliesFlaresChest.Value = ImGuiExtension.Checkbox($"Flare Supplies##{idPop}", Settings.DelveMiningSuppliesFlaresChest);
                idPop++;
                Settings.DelveMiningSuppliesFlaresChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesFlaresChestSize);
                idPop++;
                Settings.DelveMiningSuppliesFlaresChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesFlaresChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveCurrencyChest.Value = ImGuiExtension.Checkbox($"Currency Chests##{idPop}", Settings.DelveCurrencyChest);
                idPop++;
                Settings.DelveCurrencyChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveCurrencyChestSize);
                idPop++;
                Settings.DelveCurrencyChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveCurrencyChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveAzuriteVeinChest.Value = ImGuiExtension.Checkbox($"Azurite Veins##{idPop}", Settings.DelveAzuriteVeinChest);
                idPop++;
                Settings.DelveAzuriteVeinChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveAzuriteVeinChestSize);
                idPop++;
                Settings.DelveAzuriteVeinChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveAzuriteVeinChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveResonatorChest.Value = ImGuiExtension.Checkbox($"Resonator Chests##{idPop}", Settings.DelveResonatorChest);
                idPop++;
                Settings.DelveResonatorChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveResonatorChestSize);
                idPop++;
                Settings.DelveResonatorChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveResonatorChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveFossilChest.Value = ImGuiExtension.Checkbox($"Fossil Chests##{idPop}", Settings.DelveFossilChest);
                idPop++;
                Settings.DelveFossilChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveFossilChestSize);
                idPop++;
                Settings.DelveFossilChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveFossilChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Delve Helpers"))
            {
                ImGui.PushID(idPop);
                Settings.DelveHelpers.Value = ImGuiExtension.Checkbox(Settings.DelveHelpers.Value ? "Show" : "Hidden", Settings.DelveHelpers);
                ImGui.PopID();
                idPop++;
                ImGui.Spacing();
                ImGui.PushID(idPop);
                Settings.PosX.Value = ImGuiExtension.IntSlider($"Position X##{idPop}", Settings.PosX);
                ImGui.PopID();
                idPop++;
                ImGui.PushID(idPop);
                Settings.PosY.Value = ImGuiExtension.IntSlider($"Position Y##{idPop}", Settings.PosY);
                ImGui.PopID();
                idPop++;
                ImGui.TreePop();
            }
        }
Exemple #15
0
        public void Render()
        {
            if (!Settings.Enable.Value)
            {
                return;
            }

            var opened = Settings.Enable.Value;

            Settings.IsCollapsed = !DrawInfoWindow("PoeHUD  " + PoeHUDVersion, ref opened,
                                                   Settings.MenuWindowPos.X, Settings.MenuWindowPos.Y, Settings.MenuWindowSize.X, Settings.MenuWindowSize.Y,
                                                   WindowFlags.Default, Condition.Appearing);
            Settings.Enable.Value = opened;

            if (!Settings.IsCollapsed)
            {
                ImGuiNative.igGetContentRegionAvail(out newcontentRegionArea);
                if (ImGui.BeginChild("PluginsList", new Vector2(PluginNameWidth + 60, newcontentRegionArea.Y), true, WindowFlags.Default))
                {
                    PluginNameWidth = 120;
                    var coreOpened = ImGui.TreeNodeEx("", Settings.CorePluginsTreeState);

                    ImGui.SameLine();
                    if (ImGui.Selectable(CoreMenu.Plugin.PluginName, SelectedPlugin == CoreMenu.Plugin))
                    {
                        SelectedPlugin = CoreMenu.Plugin;
                    }

                    if (coreOpened)
                    {
                        foreach (var defPlugin in CoreMenu.Childs)
                        {
                            if (defPlugin.Childs.Count == 0)
                            {
                                DrawPlugin(defPlugin.Plugin, 20);
                            }
                            else
                            {
                                defPlugin.Plugin.Settings.Enable =
                                    ImGuiExtension.Checkbox($"##{defPlugin.Plugin.PluginName}Enabled", defPlugin.Plugin.Settings.Enable.Value);

                                ImGui.SameLine();
                                var pluginOpened = ImGui.TreeNodeEx($"##{defPlugin.Plugin.PluginName}", TreeNodeFlags.OpenOnArrow);
                                ImGui.SameLine();

                                var labelSize = ImGui.GetTextSize(defPlugin.Plugin.PluginName).X + 30;
                                if (PluginNameWidth < labelSize)
                                {
                                    PluginNameWidth = labelSize;
                                }

                                if (ImGui.Selectable(defPlugin.Plugin.PluginName, SelectedPlugin == defPlugin.Plugin))
                                {
                                    SelectedPlugin = defPlugin.Plugin;
                                }

                                if (pluginOpened)
                                {
                                    foreach (var plugin in defPlugin.Childs)
                                    {
                                        DrawPlugin(plugin.Plugin, 30);
                                    }

                                    ImGuiNative.igUnindent();
                                }
                            }
                        }
                        ImGui.TreePop();
                        Settings.CorePluginsTreeState = TreeNodeFlags.DefaultOpen | TreeNodeFlags.OpenOnArrow;

                        ImGui.Text("");
                    }
                    else
                    {
                        Settings.CorePluginsTreeState = TreeNodeFlags.OpenOnArrow;
                    }

                    if (ImGui.TreeNodeEx("Installed Plugins", Settings.InstalledPluginsTreeNode))
                    {
                        foreach (var plugin in PluginExtensionPlugin.Plugins)
                        {
                            if (Settings.DeveloperMode.Value && Settings.ShowPluginsMS.Value)
                            {
                                var extPlugin = (plugin as ExternalPluginHolder).BPlugin;
                                if (extPlugin == null)    //This can happen while plugin update (using plugin updator) or recompile
                                {
                                    continue;
                                }
                                ImGuiExtension.Label(extPlugin.AwerageMs.ToString());
                                ImGui.SameLine();
                            }

                            DrawPlugin(plugin, 20);
                        }

                        ImGui.TreePop();
                        Settings.InstalledPluginsTreeNode = TreeNodeFlags.DefaultOpen;
                    }
                    else
                    {
                        Settings.InstalledPluginsTreeNode = (TreeNodeFlags)0;
                    }
                }

                ImGui.EndChild();
                ImGui.SameLine();


                if (SelectedPlugin != null)
                {
                    ImGuiNative.igGetContentRegionAvail(out newcontentRegionArea);
                    ImGui.BeginChild("PluginOptions", new Vector2(newcontentRegionArea.X, newcontentRegionArea.Y), true, WindowFlags.Default);

                    var extPlugin = SelectedPlugin as ExternalPluginHolder;
                    if (Settings.DeveloperMode.Value && extPlugin != null)
                    {
                        if (ImGuiExtension.Button("Reload Plugin"))
                        {
                            extPlugin.ReloadPlugin();
                        }

                        if (extPlugin.BPlugin != null)
                        {
                            ImGui.SameLine();
                            ImGuiExtension.Label("CurrentMS: " + extPlugin.BPlugin.CurrentMs);
                            ImGui.SameLine();
                            ImGuiExtension.Label("AwerageMS: " + extPlugin.BPlugin.AwerageMs);
                            ImGui.SameLine();
                            ImGuiExtension.Label("TopMS: " + extPlugin.BPlugin.TopMs);
                        }
                    }
                    SelectedPlugin.DrawSettingsMenu();

                    ImGui.EndChild();
                }

                Settings.MenuWindowSize = ImGui.GetWindowSize();
            }

            Settings.MenuWindowPos = ImGui.GetWindowPosition();
            ImGui.EndWindow();

            if (Settings.ShowImguiDemo.Value)
            {
                bool tmp = Settings.ShowImguiDemo.Value;
                ImGuiNative.igShowDemoWindow(ref tmp);
                Settings.ShowImguiDemo.Value = tmp;
            }
        }
Exemple #16
0
        public void DelveMenu(int idIn, out int idPop)
        {
            idPop = idIn;
            if (ImGui.TreeNode("Delve Path's"))
            {
                ImGui.PushID(idPop);
                Settings.DelvePathWays.Value = ImGuiExtension.Checkbox(Settings.DelvePathWays.Value ? "Show" : "Hidden", Settings.DelvePathWays);
                ImGui.PopID();
                idPop++;

                ImGui.Spacing();
                ImGui.PushID(idPop);
                Settings.DelvePathWaysNodeSize.Value = ImGuiExtension.IntSlider("Size", Settings.DelvePathWaysNodeSize);
                ImGui.PopID();
                idPop++;
                ImGui.PushID(idPop);
                Settings.DelvePathWaysNodeColor = ImGuiExtension.ColorPicker("Color", Settings.DelvePathWaysNodeColor);
                ImGui.PopID();
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveWall.Value = ImGuiExtension.Checkbox($"Breakable Wall##{idPop}", Settings.DelveWall);
                idPop++;
                Settings.DelveWallSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveWallSize);
                idPop++;
                Settings.DelveWallColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveWallColor);
                idPop++;
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Delve Chests"))
            {
                ImGui.PushID(idPop);
                Settings.DelveChests.Value = ImGuiExtension.Checkbox(Settings.DelveChests.Value ? "Show" : "Hidden", Settings.DelveChests);
                ImGui.PopID();
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelvePathwayChest.Value = ImGuiExtension.Checkbox($"Hidden Chests on the way##{idPop}", Settings.DelvePathwayChest);
                idPop++;
                Settings.DelvePathwayChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelvePathwayChestSize);
                idPop++;
                Settings.DelvePathwayChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelvePathwayChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveMiningSuppliesDynamiteChest.Value = ImGuiExtension.Checkbox($"Dynamite Supplies##{idPop}", Settings.DelveMiningSuppliesDynamiteChest);
                idPop++;
                Settings.DelveMiningSuppliesDynamiteChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesDynamiteChestSize);
                idPop++;
                Settings.DelveMiningSuppliesDynamiteChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesDynamiteChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveMiningSuppliesFlaresChest.Value = ImGuiExtension.Checkbox($"Flare Supplies##{idPop}", Settings.DelveMiningSuppliesFlaresChest);
                idPop++;
                Settings.DelveMiningSuppliesFlaresChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesFlaresChestSize);
                idPop++;
                Settings.DelveMiningSuppliesFlaresChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesFlaresChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveCurrencyChest.Value = ImGuiExtension.Checkbox($"Currency Chests##{idPop}", Settings.DelveCurrencyChest);
                idPop++;
                Settings.DelveCurrencyChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveCurrencyChestSize);
                idPop++;
                Settings.DelveCurrencyChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveCurrencyChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveAzuriteVeinChest.Value = ImGuiExtension.Checkbox($"Azurite Veins##{idPop}", Settings.DelveAzuriteVeinChest);
                idPop++;
                Settings.DelveAzuriteVeinChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveAzuriteVeinChestSize);
                idPop++;
                Settings.DelveAzuriteVeinChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveAzuriteVeinChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveResonatorChest.Value = ImGuiExtension.Checkbox($"Resonator Chests##{idPop}", Settings.DelveResonatorChest);
                idPop++;
                Settings.DelveResonatorChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveResonatorChestSize);
                idPop++;
                Settings.DelveResonatorChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveResonatorChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                Settings.DelveFossilChest.Value = ImGuiExtension.Checkbox($"Fossil Chests##{idPop}", Settings.DelveFossilChest);
                idPop++;
                Settings.DelveFossilChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveFossilChestSize);
                idPop++;
                Settings.DelveFossilChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveFossilChestColor);
                idPop++;
                ImGui.Spacing();
                ImGui.Spacing();
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Delve Mine Map Stuff"))
            {
                ImGui.PushID(idPop);
                Settings.DelveMineMapConnections.Value = ImGuiExtension.Checkbox($"Show Connections###{idPop}", Settings.DelveMineMapConnections.Value);
                ImGui.PopID();
                idPop++;
                Settings.ShowRadiusPercentage.Value = ImGuiExtension.IntSlider($"Radius (%)##{idPop}", Settings.ShowRadiusPercentage);
                idPop++;
                ImGui.TreePop();
            }
            if (ImGui.TreeNode("Debug Mode"))
            {
                ImGui.PushID(idPop);
                Settings.DebugHotkey.Value = ImGuiExtension.HotkeySelector($"Debug Mode Hotkey", Settings.DebugHotkey.Value);
                ImGui.PopID();
                idPop++;
                Settings.DebugMode.Value = ImGuiExtension.Checkbox($"Debug Mode##{idPop}", Settings.DebugMode);
                idPop++;
                Settings.ShouldHideOnOpen.Value = ImGuiExtension.Checkbox($"Hide Chest Name When Opened##{idPop}", Settings.ShouldHideOnOpen);
                idPop++;
                ImGui.TreePop();
            }
        }