Add force notification warning

This commit is contained in:
Asriel Camora
2023-10-24 01:39:13 -07:00
parent 56383d4e6e
commit c0ba4407b5
2 changed files with 15 additions and 9 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ public static class MacroCopy
}
if (s.Count > 0)
{
if (s.Count < MacroSize)
if (s.Count < MacroSize || (config.Type != MacroCopyConfiguration.CopyType.CopyToMacro && config.CombineMacro))
{
if (GetEndCommand(macros.Count, true, config) is { } endCommand)
s.Add(endCommand);
+14 -8
View File
@@ -295,14 +295,20 @@ public sealed class Settings : Window, IDisposable
if (Config.MacroCopy.AddNotification)
{
DrawOption(
"Force Notification",
"Prioritize always having a notification sound at the end of\n" +
"every macro. Keeping this off prevents macros with only 1 action.",
Config.MacroCopy.ForceNotification,
v => Config.MacroCopy.ForceNotification = v,
ref isDirty
);
var isForceUseful = Config.MacroCopy.Type == MacroCopyConfiguration.CopyType.CopyToMacro || !Config.MacroCopy.CombineMacro;
using (var d = ImRaii.Disabled(!isForceUseful))
{
DrawOption(
"Force Notification",
"Prioritize always having a notification sound at the end of\n" +
"every macro. Keeping this off prevents macros with only 1 action.",
Config.MacroCopy.ForceNotification,
v => Config.MacroCopy.ForceNotification = v,
ref isDirty
);
}
if (!isForceUseful && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
ImGui.SetTooltip("Only useful when Combine Macro is off");
DrawOption(
"Add Notification Sound",