示例#1
0
        public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
        {
            try {
                if (pluginInterface.ClientState.LocalPlayer.ClassJob.GameData.Role != 1)
                {
                    return(false);
                }
                // Check have stance
                if (pluginInterface.ClientState.LocalPlayer.StatusEffects.Any(s => tankStatusEffectIDs.Contains((uint)s.EffectId)))
                {
                    return(false);
                }
                // Check other tanks have stance


                foreach (var a in pluginInterface.ClientState.Actors)
                {
                    if (!(a is PlayerCharacter pc))
                    {
                        continue;
                    }
                    if (pc.ClassJob.GameData.Role != 1 || pc.ActorId == pluginInterface.ClientState.LocalPlayer.ActorId)
                    {
                        continue;
                    }
                    if (pc.StatusEffects.Any(s => tankStatusEffectIDs.Contains((uint)s.EffectId)))
                    {
                        return(false);
                    }
                }
                return(true);
            } catch {
                return(false);
            }
        }
示例#2
0
 public void ClickHandler(RemindMe plugin, object param)
 {
     if (param is Actor a)
     {
         plugin.PluginInterface.ClientState.Targets.SetCurrentTarget(a);
     }
 }
示例#3
0
 public override bool HasClickHandle(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     if (_retainers == null || _retainerContainer == null)
     {
         return(false);
     }
     return(_retainerContainer->Ready == 0);
 }
示例#4
0
 public override ushort GetIconID(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     try {
         return(pluginInterface.Data.Excel.GetSheet <Action>().GetRow(18322).Icon);
     } catch {
         return(0);
     }
 }
 public override ushort GetIconID(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     try {
         return(pluginInterface.Data.Excel.GetSheet <Action>().GetRow(pluginInterface.ClientState.LocalPlayer.Level >= 40 ? 63U : 60U).Icon);
     } catch {
         return(0);
     }
 }
示例#6
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     try {
         var action = pluginInterface.Data.Excel.GetSheet <Action>().GetRow(TankStanceActions[pluginInterface.ClientState.LocalPlayer.ClassJob.Id]);
         return($"盾姿未开启: {action.Name}");
     } catch {
         return("盾姿未开启");
     }
 }
示例#7
0
 public override ushort GetIconID(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     try {
         var action = pluginInterface.Data.Excel.GetSheet <Action>().GetRow(petIcons[pluginInterface.ClientState.LocalPlayer.ClassJob.Id]);
         return(action.Icon);
     } catch {
         return(0);
     }
 }
示例#8
0
        public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
        {
            var actionBar = pluginInterface.Framework.Gui.GetUiObjectByName("_ActionBar", 1);

            if (actionBar == IntPtr.Zero)
            {
                return(false);
            }
            return(Marshal.ReadByte(actionBar, 0x23F) == 0);
        }
示例#9
0
        public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
        {
            if (_retainers == null || _retainerContainer == null)
            {
                return("Error");
            }
            if (_retainerContainer->Ready == 0)
            {
                return("Retainer List Unloaded");
            }

            return($"{count} Inactive Retainer{(count>1?"s":"")}");
        }
示例#10
0
        public override void ClickHandler(RemindMe plugin, object param)
        {
            if (_retainers == null || _retainerContainer == null)
            {
                return;
            }
            if (_retainerContainer->Ready != 0)
            {
                return;
            }
            var agent = RemindMe.Client.UiModule.AgentModule.GetAgent <AgentUnknown>();

            ((delegate * < AgentUnknownStruct *, void * >)agent.Data->vfunc[2])(agent.Data);
        }
示例#11
0
 public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     if (!petJobs.Contains(pluginInterface.ClientState.LocalPlayer.ClassJob.Id))
     {
         return(false);
     }
     if (pluginInterface.ClientState.LocalPlayer.ClassJob.Id == 28 && plugin.ActorsWithStatus.ContainsKey(791) && plugin.ActorsWithStatus[791].Contains(pluginInterface.ClientState.LocalPlayer))
     {
         return(false);
     }
     if (pluginInterface.ClientState.Actors.Any(a => a.ObjectKind == ObjectKind.BattleNpc && a is BattleNpc bNpc && bNpc.OwnerId == pluginInterface.ClientState.LocalPlayer.ActorId))
     {
         return(false);
     }
     return(true);
 }
示例#12
0
        public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
        {
            if (!_isSetup)
            {
                try {
                    _retainerContainer = (RetainerContainer *)pluginInterface.TargetModuleScanner.GetStaticAddressFromSig("48 8B E9 48 8D 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 85 C0 74 4E");
                    PluginLog.Log($"RetainerContainer: {(ulong)_retainerContainer:X} - {(ulong)&_retainerContainer->Ready:X}");
                    _retainers = (Retainer *)_retainerContainer->Retainers;
                } catch (Exception ex) {
                    PluginLog.LogError(ex, "Failed to find retainer static address");
                }

                _isSetup = true;
                return(false);
            }

            if (_retainers == null || _retainerContainer == null)
            {
                return(false);
            }
            if (_retainerContainer->Ready == 0)
            {
                return(true);
            }
            count = 0;
            var timeNow = DateTime.UtcNow.Ticks / 10000000L - 62135596800L;

            for (var i = 0; i < _retainerContainer->RetainerCount; i++)
            {
                var retainer = _retainers[i];
                if (retainer.RetainerID == 0 || retainer.Available == 0 || retainer.ClassJob == 0)
                {
                    continue;
                }
                if (retainer.VentureComplete < timeNow)
                {
                    count++;
                }
            }

            return(count > 0);
        }
示例#13
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return("Dance Partner");
 }
示例#14
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return("Summon Pet");
 }
示例#15
0
        public void DrawConfigEditor(RemindMeConfig mainConfig, RemindMe plugin, ref Guid?deletedMonitor, ref MonitorDisplay copiedDisplay)
        {
            ImGui.Indent(10);
            if (ImGui.Checkbox($"Enabled##{this.Guid}", ref this.Enabled))
            {
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"Lock Display##{this.Guid}", ref this.Locked))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.SetNextItemWidth(150);
            if (ImGui.InputText($"###displayName{this.Guid}", ref this.Name, 32))
            {
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"Clickable##{this.Guid}", ref this.AllowClicking))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.TextDisabled("A clickable display will allow selecting targets from status effects\nbut may get in the way of other activity.");
            ImGui.Separator();
            if (ImGui.Combo($"Display Type##{Guid}", ref DisplayType, _displayTypes, _displayTypes.Length))
            {
                mainConfig.Save();
            }


            if ((DisplayType == 1 || DisplayType == 2) && ImGui.Checkbox($"Right to Left##{Guid}", ref DirectionRtL))
            {
                mainConfig.Save();
            }
            if ((DisplayType == 0 || DisplayType == 2) && ImGui.Checkbox($"Bottom to Top##{Guid}", ref DirectionBtT))
            {
                mainConfig.Save();
            }
            if (DisplayType == 2 && ImGui.Checkbox($"Vertical Stack##{Guid}", ref IconVerticalStack))
            {
                mainConfig.Save();
            }

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

            ImGui.Text("Colours");
            ImGui.Separator();

            if (ImGui.ColorEdit4($"Ability Ready##{Guid}", ref AbilityReadyColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"Ability Cooldown##{Guid}", ref AbilityCooldownColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"Status Effect##{Guid}", ref StatusEffectColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"Bar Background##{Guid}", ref BarBackgroundColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"Text##{Guid}", ref TextColor))
            {
                mainConfig.Save();
            }

            ImGui.Separator();
            ImGui.Separator();
            ImGui.Text("Display Options");
            ImGui.Separator();
            if (ImGui.Checkbox($"Hide outside of combat##{this.Guid}", ref this.OnlyInCombat))
            {
                mainConfig.Save();
            }

            if (OnlyInCombat)
            {
                ImGui.Indent(20);
                if (ImGui.Checkbox($"Keep visible for###keepVisibleOutsideCombat{this.Guid}", ref this.KeepVisibleOutsideCombat))
                {
                    mainConfig.Save();
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.InputInt($"seconds after exiting combat.###keepVisibleOutsideCombatSeconds{this.Guid}", ref KeepVisibleOutsideCombatSeconds))
                {
                    mainConfig.Save();
                }
                if (KeepVisibleOutsideCombatSeconds < 0)
                {
                    KeepVisibleOutsideCombatSeconds = 0;
                    mainConfig.Save();
                }
                ImGui.Indent(-20);
            }

            if (ImGui.Checkbox($"Don't show complete cooldowns##{this.Guid}", ref this.OnlyShowCooldown))
            {
                OnlyShowReady = false;
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"Only show complete cooldowns##{this.Guid}", ref this.OnlyShowReady))
            {
                OnlyShowCooldown = false;
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"Fill bar to complete##{this.Guid}", ref this.FillToComplete))
            {
                mainConfig.Save();
            }
            if (DisplayType < 2 && ImGui.Checkbox($"Reverse fill direction##{this.Guid}", ref this.ReverseFill))
            {
                mainConfig.Save();
            }
            if (DisplayType == 2)
            {
                ImGui.BeginGroup();
                plugin.DrawBar(ImGui.GetCursorScreenPos(), new Vector2(22, 22), 0.45f, IconDisplayFillDirection, new Vector4(0.3f, 0.3f, 0.3f, 1), new Vector4(0.8f, 0.8f, 0.8f, 1), 3);
                ImGui.SameLine();
                ImGui.Text("Fill Direction");
                ImGui.EndGroup();
                if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                {
                    IconDisplayFillDirection = (RemindMe.FillDirection)((((int)IconDisplayFillDirection) + 1) % Enum.GetValues(typeof(RemindMe.FillDirection)).Length);
                }
            }


            if (ImGui.Checkbox($"Show Ability Icon##{this.Guid}", ref this.ShowActionIcon))
            {
                mainConfig.Save();
            }
            if (this.ShowActionIcon)
            {
                switch (DisplayType)
                {
                case 0: {
                    ImGui.SameLine();
                    ImGui.SetNextItemWidth(75);
                    var v    = ReverseSideIcon ? 1 : 0;
                    var text = ReverseSideIcon ? "Right" : "Left";
                    ImGui.SliderInt($"###actionIconReverse##{Guid}", ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                    {
                        ReverseSideIcon = !ReverseSideIcon;
                    }
                    break;
                }

                case 1: {
                    ImGui.SameLine();
                    var v    = ReverseSideIcon ? 1 : 0;
                    var text = ReverseSideIcon ? "Top" : "Bottom";
                    ImGui.VSliderInt($"###actionIconReverse##{Guid}", new Vector2(60, 25), ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                    {
                        ReverseSideIcon = !ReverseSideIcon;
                    }
                    break;
                }
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###actionIconScale{this.Guid}", ref this.ActionIconScale, 0.1f, 1f, "Scale"))
                {
                    mainConfig.Save();
                }
            }

            if ((DisplayType == 0 || DisplayType == 1) && ImGui.Checkbox($"Show Skill Name##{this.Guid}", ref this.ShowSkillName))
            {
                mainConfig.Save();
            }

            if (DisplayType == 0 && this.ShowSkillName)
            {
                ImGui.SameLine();
                ImGui.SetNextItemWidth(75);
                var v    = SkillNameRight ? 1 : 0;
                var text = SkillNameRight ? "Right" : "Left";
                ImGui.SliderInt("###skillNameAlign", ref v, 0, 1, text);
                if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                {
                    SkillNameRight = !SkillNameRight;
                }
            }

            if ((DisplayType == 0 || DisplayType == 1) && ShowSkillName && ImGui.Checkbox($"Show Status Effect Target Name##{this.Guid}", ref this.ShowStatusEffectTarget))
            {
                mainConfig.Save();
            }

            if ((DisplayType == 0 || DisplayType == 1) && ShowSkillName && ShowStatusEffectTarget && ImGui.Checkbox($"Only show target name on status effects##{this.Guid}", ref this.StatusOnlyShowTargetName))
            {
                mainConfig.Save();
            }

            if (ImGui.Checkbox($"Show Countdown##{this.Guid}", ref this.ShowCountdown))
            {
                mainConfig.Save();
            }
            if (ShowCountdown)
            {
                switch (DisplayType)
                {
                case 0: {
                    ImGui.SameLine();
                    ImGui.SetNextItemWidth(75);
                    var v    = ReverseCountdownSide ? 0 : 1;
                    var text = ReverseCountdownSide ? "Left" : "Right";
                    ImGui.SliderInt($"###actionCountdownReverse##{Guid}", ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                    {
                        ReverseCountdownSide = !ReverseCountdownSide;
                    }
                    break;
                }

                case 1: {
                    ImGui.SameLine();
                    var v    = ReverseCountdownSide ? 0 : 1;
                    var text = ReverseCountdownSide ? "Bottom" : "Top";
                    ImGui.VSliderInt($"###countdownReverse##{Guid}", new Vector2(60, 25), ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(ImGuiMouseButton.Left))
                    {
                        ReverseCountdownSide = !ReverseCountdownSide;
                    }
                    break;
                }
                }



                ImGui.Indent(20);
                if (ImGui.Checkbox($"Show Countup while ready##{this.Guid}", ref this.ShowCountdownReady))
                {
                    mainConfig.Save();
                }
                ImGui.Indent(-20);
            }
            if (ImGui.Checkbox($"Pulse when ready##{this.Guid}", ref this.PulseReady))
            {
                mainConfig.Save();
            }

            if (this.PulseReady)
            {
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###pulseSpeed{this.Guid}", ref this.PulseSpeed, 0.5f, 2f, "Speed"))
                {
                    mainConfig.Save();
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###pulseIntensity{this.Guid}", ref this.PulseIntensity, 0.1f, 2f, "Intensity"))
                {
                    mainConfig.Save();
                }
            }

            ImGui.Separator();
            if (ImGui.Checkbox($"###limitDisplay{this.Guid}", ref this.LimitDisplayTime))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.Text("Only show when below");
            ImGui.SameLine();
            ImGui.SetNextItemWidth(90);
            if (ImGui.InputInt($"seconds##limitSeconds{this.Guid}", ref LimitDisplayTimeSeconds))
            {
                mainConfig.Save();
            }

            if (ImGui.Checkbox($"###limitDisplayReady{this.Guid}", ref this.LimitDisplayReadyTime))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.Text("Don't show ready abilities after");
            ImGui.SameLine();
            ImGui.SetNextItemWidth(90);
            if (ImGui.InputInt($"seconds##limitReadySeconds{this.Guid}", ref LimitDisplayReadyTimeSeconds))
            {
                mainConfig.Save();
            }

            ImGui.Separator();
            if (ImGui.InputInt($"Bar Height##{this.Guid}", ref this.RowSize, 1, 5))
            {
                if (this.RowSize < 8)
                {
                    this.RowSize = 8;
                }
                mainConfig.Save();
            }
            if (ImGui.InputInt($"Bar Spacing##{this.Guid}", ref this.BarSpacing, 1, 2))
            {
                if (this.BarSpacing < 0)
                {
                    this.BarSpacing = 0;
                }
                mainConfig.Save();
            }
            if (ImGui.InputFloat($"Text Scale##{this.Guid}", ref this.TextScale, 0.01f, 0.1f))
            {
                if (this.RowSize < 8)
                {
                    this.RowSize = 8;
                }
                mainConfig.Save();
            }

            if (ImGui.InputInt($"Update Interval##{this.Guid}", ref this.UpdateInterval, 1, 50))
            {
                if (this.UpdateInterval < 1)
                {
                    this.UpdateInterval = 1;
                }
                mainConfig.Save();
            }

            ImGui.Separator();

            if (tryCopy)
            {
                ImGui.Text("Copy with actions and statuses?");
                ImGui.SameLine();

                ImGui.PushStyleColor(ImGuiCol.Button, 0x88888800);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99999900);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAAAAAA00);
                if (ImGui.Button($"Yes##copyWithActionsAndStatus{Guid}"))
                {
                    tryCopy       = false;
                    copiedDisplay = MakeCopy(true);
                }
                if (ImGui.IsItemHovered())
                {
                    ImGui.SetTooltip("Copy the display and all the configured reminders.");
                }
                ImGui.SameLine();
                if (ImGui.Button($"No##copyWithActionsAndStatus{Guid}"))
                {
                    tryCopy       = false;
                    copiedDisplay = MakeCopy(false);
                }
                if (ImGui.IsItemHovered())
                {
                    ImGui.SetTooltip("Only copy the base display settings.");
                }

                ImGui.PopStyleColor(3);
                ImGui.SameLine();
                if (ImGui.Button($"Don't Copy##{Guid}"))
                {
                    tryCopy = false;
                }
            }
            else if (tryDelete)
            {
                ImGui.Text("Delete this display?");
                ImGui.SameLine();
                if (ImGui.Button($"Don't Delete##{Guid}"))
                {
                    tryDelete = false;
                }
                ImGui.SameLine();
                ImGui.PushStyleColor(ImGuiCol.Button, 0x88000088);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99000099);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAA0000AA);
                if (ImGui.Button($"Delete this display##{Guid}confirm"))
                {
                    deletedMonitor = Guid;
                }
                ImGui.PopStyleColor(3);
            }
            else
            {
                ImGui.PushStyleColor(ImGuiCol.Button, 0x88000088);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99000099);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAA0000AA);
                if (ImGui.Button($"Delete this display##{Guid}"))
                {
                    tryDelete = true;
                }
                ImGui.PopStyleColor(3);
                ImGui.SameLine();
                ImGui.Dummy(new Vector2(15 * ImGui.GetIO().FontGlobalScale, 1));
                ImGui.SameLine();

                ImGui.PushStyleColor(ImGuiCol.Button, 0x88888800);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99999900);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAAAAAA00);
                if (ImGui.Button($"Copy this display##{Guid}"))
                {
                    tryCopy = true;
                }
                ImGui.PopStyleColor(3);
            }



            ImGui.Separator();
            ImGui.Indent(-10);
        }
示例#16
0
 public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return(pluginInterface.ClientState.LocalPlayer.ClassJob.Id == 36 &&
            pluginInterface.ClientState.LocalPlayer.StatusEffects.All(s => s.EffectId != 2124 && s.EffectId != 2125 && s.EffectId != 2126));
 }
示例#17
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return("Aetherial Mimicry");
 }
示例#18
0
 public override ushort GetIconID(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display) {
     return 5; //60840;
 }
示例#19
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display) {
     return "热键栏未锁定";
 }
示例#20
0
        public void DrawConfigEditor(RemindMeConfig mainConfig, RemindMe plugin, ref Guid?deletedMonitor)
        {
            ImGui.Indent(10);
            if (ImGui.Checkbox($"锁定显示区##{this.Guid}", ref this.Locked))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.SetNextItemWidth(150);
            if (ImGui.InputText($"###displayName{this.Guid}", ref this.Name, 32))
            {
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"可点击操作##{this.Guid}", ref this.AllowClicking))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.TextDisabled("一个可点击的显示区允许你点击状态来快捷选中目标\n但它可能会妨碍你执行其他操作。");
            ImGui.Separator();
            if (ImGui.Combo("显示类型", ref DisplayType, _displayTypes, _displayTypes.Length))
            {
                mainConfig.Save();
            }


            if ((DisplayType == 1 || DisplayType == 2) && ImGui.Checkbox("从右到左", ref DirectionRtL))
            {
                mainConfig.Save();
            }
            if ((DisplayType == 0 || DisplayType == 2) && ImGui.Checkbox("从下到上", ref DirectionBtT))
            {
                mainConfig.Save();
            }
            if (DisplayType == 2 && ImGui.Checkbox("垂直堆叠", ref IconVerticalStack))
            {
                mainConfig.Save();
            }

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

            ImGui.Text("列");
            ImGui.Separator();

            if (ImGui.ColorEdit4($"可用技能##{Guid}", ref AbilityReadyColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"CD中技能##{Guid}", ref AbilityCooldownColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"状态效果##{Guid}", ref StatusEffectColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"条背景色##{Guid}", ref BarBackgroundColor))
            {
                mainConfig.Save();
            }
            if (ImGui.ColorEdit4($"文本##{Guid}", ref TextColor))
            {
                mainConfig.Save();
            }

            ImGui.Separator();
            ImGui.Separator();
            ImGui.Text("显示设置");
            ImGui.Separator();
            if (ImGui.Checkbox($"脱战时隐藏##{this.Guid}", ref this.OnlyInCombat))
            {
                mainConfig.Save();
            }

            if (OnlyInCombat)
            {
                ImGui.Indent(20);
                if (ImGui.Checkbox($"保持显示到脱战后###keepVisibleOutsideCombat{this.Guid}", ref this.KeepVisibleOutsideCombat))
                {
                    mainConfig.Save();
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.InputInt($"秒。###keepVisibleOutsideCombatSeconds{this.Guid}", ref KeepVisibleOutsideCombatSeconds))
                {
                    mainConfig.Save();
                }
                if (KeepVisibleOutsideCombatSeconds < 0)
                {
                    KeepVisibleOutsideCombatSeconds = 0;
                    mainConfig.Save();
                }
                ImGui.Indent(-20);
            }

            if (ImGui.Checkbox($"不显示可用技能##{this.Guid}", ref this.OnlyShowCooldown))
            {
                OnlyShowReady = false;
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"只显示可用技能##{this.Guid}", ref this.OnlyShowReady))
            {
                OnlyShowCooldown = false;
                mainConfig.Save();
            }
            if (ImGui.Checkbox($"使用填充模式##{this.Guid}", ref this.FillToComplete))
            {
                mainConfig.Save();
            }
            if (DisplayType < 2 && ImGui.Checkbox($"反转填充方向##{this.Guid}", ref this.ReverseFill))
            {
                mainConfig.Save();
            }
            if (DisplayType == 2)
            {
                ImGui.BeginGroup();
                plugin.DrawBar(ImGui.GetCursorScreenPos(), new Vector2(22, 22), 0.45f, IconDisplayFillDirection, new Vector4(0.3f, 0.3f, 0.3f, 1), new Vector4(0.8f, 0.8f, 0.8f, 1), 3);
                ImGui.SameLine();
                ImGui.Text("填充方向");
                ImGui.EndGroup();
                if (ImGui.IsItemClicked(0))
                {
                    IconDisplayFillDirection = (RemindMe.FillDirection)((((int)IconDisplayFillDirection) + 1) % Enum.GetValues(typeof(RemindMe.FillDirection)).Length);
                }
            }


            if (ImGui.Checkbox($"显示技能图标##{this.Guid}", ref this.ShowActionIcon))
            {
                mainConfig.Save();
            }
            if (this.ShowActionIcon)
            {
                switch (DisplayType)
                {
                case 0: {
                    ImGui.SameLine();
                    ImGui.SetNextItemWidth(75);
                    var v    = ReverseSideIcon ? 1 : 0;
                    var text = ReverseSideIcon ? "右侧" : "左侧";
                    ImGui.SliderInt("###actionIconReverse", ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(0))
                    {
                        ReverseSideIcon = !ReverseSideIcon;
                    }
                    break;
                }

                case 1: {
                    ImGui.SameLine();
                    var v    = ReverseSideIcon ? 1 : 0;
                    var text = ReverseSideIcon ? "上方" : "下方";
                    ImGui.VSliderInt("###actionIconReverse", new Vector2(60, 25), ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(0))
                    {
                        ReverseSideIcon = !ReverseSideIcon;
                    }
                    break;
                }
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###actionIconScale{this.Guid}", ref this.ActionIconScale, 0.1f, 1f, "缩放", 1f))
                {
                    mainConfig.Save();
                }
            }

            if ((DisplayType == 0 || DisplayType == 1) && ImGui.Checkbox($"显示技能名称##{this.Guid}", ref this.ShowSkillName))
            {
                mainConfig.Save();
            }

            if (DisplayType == 0 && this.ShowSkillName)
            {
                ImGui.SameLine();
                ImGui.SetNextItemWidth(75);
                var v    = SkillNameRight ? 1 : 0;
                var text = SkillNameRight ? "右侧" : "左侧";
                ImGui.SliderInt("###skillNameAlign", ref v, 0, 1, text);
                if (ImGui.IsItemClicked(0))
                {
                    SkillNameRight = !SkillNameRight;
                }
            }

            if ((DisplayType == 0 || DisplayType == 1) && ShowSkillName && ImGui.Checkbox($"显示状态效果对象名称##{this.Guid}", ref this.ShowStatusEffectTarget))
            {
                mainConfig.Save();
            }

            if (ImGui.Checkbox($"显示计时##{this.Guid}", ref this.ShowCountdown))
            {
                mainConfig.Save();
            }
            if (ShowCountdown)
            {
                switch (DisplayType)
                {
                case 0: {
                    ImGui.SameLine();
                    ImGui.SetNextItemWidth(75);
                    var v    = ReverseCountdownSide ? 0 : 1;
                    var text = ReverseCountdownSide ? "左侧" : "右侧";
                    ImGui.SliderInt("###actionCountdownReverse", ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(0))
                    {
                        ReverseCountdownSide = !ReverseCountdownSide;
                    }
                    break;
                }

                case 1: {
                    ImGui.SameLine();
                    var v    = ReverseCountdownSide ? 0 : 1;
                    var text = ReverseCountdownSide ? "下方" : "上方";
                    ImGui.VSliderInt("###countdownReverse", new Vector2(60, 25), ref v, 0, 1, text);
                    if (ImGui.IsItemClicked(0))
                    {
                        ReverseCountdownSide = !ReverseCountdownSide;
                    }
                    break;
                }
                }



                ImGui.Indent(20);
                if (ImGui.Checkbox($"准备就绪时仍然显示计时##{this.Guid}", ref this.ShowCountdownReady))
                {
                    mainConfig.Save();
                }
                ImGui.Indent(-20);
            }
            if (ImGui.Checkbox($"准备就绪时闪烁##{this.Guid}", ref this.PulseReady))
            {
                mainConfig.Save();
            }

            if (this.PulseReady)
            {
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###pulseSpeed{this.Guid}", ref this.PulseSpeed, 0.5f, 2f, "速度", 2f))
                {
                    mainConfig.Save();
                }
                ImGui.SameLine();
                ImGui.SetNextItemWidth(100);
                if (ImGui.SliderFloat($"###pulseIntensity{this.Guid}", ref this.PulseIntensity, 0.1f, 2f, "强度"))
                {
                    mainConfig.Save();
                }
            }

            ImGui.Separator();
            if (ImGui.Checkbox($"###limitDisplay{this.Guid}", ref this.LimitDisplayTime))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.Text("仅显示剩余");
            ImGui.SameLine();
            ImGui.SetNextItemWidth(90);
            if (ImGui.InputInt($"秒内的效果##limitSeconds{this.Guid}", ref LimitDisplayTimeSeconds))
            {
                mainConfig.Save();
            }

            if (ImGui.Checkbox($"###limitDisplayReady{this.Guid}", ref this.LimitDisplayReadyTime))
            {
                mainConfig.Save();
            }
            ImGui.SameLine();
            ImGui.Text("不要显示超过");
            ImGui.SameLine();
            ImGui.SetNextItemWidth(90);
            if (ImGui.InputInt($"秒以上CD的技能##limitReadySeconds{this.Guid}", ref LimitDisplayReadyTimeSeconds))
            {
                mainConfig.Save();
            }

            ImGui.Separator();
            if (ImGui.InputInt($"条高度##{this.Guid}", ref this.RowSize, 1, 5))
            {
                if (this.RowSize < 8)
                {
                    this.RowSize = 8;
                }
                mainConfig.Save();
            }
            if (ImGui.InputInt($"条间距##{this.Guid}", ref this.BarSpacing, 1, 2))
            {
                if (this.BarSpacing < 0)
                {
                    this.BarSpacing = 0;
                }
                mainConfig.Save();
            }
            if (ImGui.InputFloat($"文本大小##{this.Guid}", ref this.TextScale, 0.01f, 0.1f))
            {
                if (this.RowSize < 8)
                {
                    this.RowSize = 8;
                }
                mainConfig.Save();
            }

            if (ImGui.InputInt($"更新间隔##{this.Guid}", ref this.UpdateInterval, 1, 50))
            {
                if (this.UpdateInterval < 1)
                {
                    this.UpdateInterval = 1;
                }
                mainConfig.Save();
            }

            ImGui.Separator();


            if (tryDelete)
            {
                ImGui.Text("删除显示区?");
                ImGui.SameLine();
                if (ImGui.Button("不要删除"))
                {
                    tryDelete = false;
                }
                ImGui.SameLine();
                ImGui.PushStyleColor(ImGuiCol.Button, 0x88000088);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99000099);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAA0000AA);
                if (ImGui.Button("删除这个显示区"))
                {
                    deletedMonitor = Guid;
                }
                ImGui.PopStyleColor(3);
            }
            else
            {
                ImGui.PushStyleColor(ImGuiCol.Button, 0x88000088);
                ImGui.PushStyleColor(ImGuiCol.ButtonHovered, 0x99000099);
                ImGui.PushStyleColor(ImGuiCol.ButtonActive, 0xAA0000AA);
                if (ImGui.Button("删除这个显示区"))
                {
                    tryDelete = true;
                }
                ImGui.PopStyleColor(3);
            }



            ImGui.Separator();
            ImGui.Indent(-10);
        }
示例#21
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return("Lock Hotbar");
 }
示例#22
0
 public override string GetText(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return("Apply Fists");
 }
示例#23
0
 public override bool ShouldShow(DalamudPluginInterface pluginInterface, RemindMe plugin, MonitorDisplay display)
 {
     return((pluginInterface.ClientState.LocalPlayer.ClassJob.Id == 2 || pluginInterface.ClientState.LocalPlayer.ClassJob.Id == 20) &&
            pluginInterface.ClientState.LocalPlayer.Level >= 15 &&
            pluginInterface.ClientState.LocalPlayer.StatusEffects.All(s => s.EffectId != 103 && s.EffectId != 104 && s.EffectId != 105));
 }