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 > 0)
{ {
if (s.Count < MacroSize) if (s.Count < MacroSize || (config.Type != MacroCopyConfiguration.CopyType.CopyToMacro && config.CombineMacro))
{ {
if (GetEndCommand(macros.Count, true, config) is { } endCommand) if (GetEndCommand(macros.Count, true, config) is { } endCommand)
s.Add(endCommand); s.Add(endCommand);
+14 -8
View File
@@ -295,14 +295,20 @@ public sealed class Settings : Window, IDisposable
if (Config.MacroCopy.AddNotification) if (Config.MacroCopy.AddNotification)
{ {
DrawOption( var isForceUseful = Config.MacroCopy.Type == MacroCopyConfiguration.CopyType.CopyToMacro || !Config.MacroCopy.CombineMacro;
"Force Notification", using (var d = ImRaii.Disabled(!isForceUseful))
"Prioritize always having a notification sound at the end of\n" + {
"every macro. Keeping this off prevents macros with only 1 action.", DrawOption(
Config.MacroCopy.ForceNotification, "Force Notification",
v => Config.MacroCopy.ForceNotification = v, "Prioritize always having a notification sound at the end of\n" +
ref isDirty "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( DrawOption(
"Add Notification Sound", "Add Notification Sound",