feat: Per-combo reset options and preserve-position toggle
- Per-combo reset when: Game timer (default), Never, On target change, After X seconds. Never = cycle sequence without time/target reset. After seconds uses configurable 0.5–300s window. - Per-combo 'Preserve position when using other actions' (default on): when on, using another combo or any ability never resets this combo's step; it only resets per its own 'Reset when' setting. When off (original), using an action not in this combo resets it to step 1. - Optional ITargetManager via constructor for On target change; plugin loads if service unavailable (On target change no-op when null). Made-with: Cursor
This commit is contained in:
@@ -195,6 +195,48 @@ public class ConfigWindow : Window
|
||||
Service.Configuration.Save();
|
||||
}
|
||||
|
||||
// Reset behavior (per-combo)
|
||||
ImGui.Text("Reset combo when:");
|
||||
ImGui.SameLine();
|
||||
var resetMode = combo.ResetMode;
|
||||
ImGui.SetNextItemWidth(180);
|
||||
if (ImGui.BeginCombo("##resetMode", resetMode.ToString().Replace("_", " ")))
|
||||
{
|
||||
foreach (ComboResetMode mode in Enum.GetValues(typeof(ComboResetMode)))
|
||||
{
|
||||
if (ImGui.Selectable(mode.ToString().Replace("_", " "), resetMode == mode))
|
||||
{
|
||||
combo.ResetMode = mode;
|
||||
Service.Configuration.Save();
|
||||
}
|
||||
}
|
||||
ImGui.EndCombo();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip("Game timer: reset when game combo timer expires (~15s).\nNever: always run through sequence (cycle after last step).\nOn target change: reset when you change target.\nAfter seconds: reset after the time below with no combo use.");
|
||||
if (combo.ResetMode == ComboResetMode.AfterSeconds)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
float sec = combo.ResetAfterSeconds;
|
||||
ImGui.SetNextItemWidth(80);
|
||||
if (ImGui.InputFloat("##resetSec", ref sec, 0.5f, 1f, "%.1fs", ImGuiInputTextFlags.CharsDecimal))
|
||||
{
|
||||
combo.ResetAfterSeconds = Math.Clamp(sec, 0.5f, 300f);
|
||||
Service.Configuration.Save();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip("Seconds of no combo use before reset (0.5–300).");
|
||||
}
|
||||
|
||||
bool preservePosition = combo.PreservePositionWhenUsingOtherActions;
|
||||
if (ImGui.Checkbox("Preserve position when using other actions", ref preservePosition))
|
||||
{
|
||||
combo.PreservePositionWhenUsingOtherActions = preservePosition;
|
||||
Service.Configuration.Save();
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGui.SetTooltip("On (default): Using another combo or any ability never resets this combo's step; it only resets per \"Reset when\" above.\nOff (original): Using an action not in this combo resets this combo to step 1.");
|
||||
|
||||
// Action list
|
||||
ImGui.Text("Action sequence (first = hotbar slot; order: 1, 2, 3a/3b on other keys...)");
|
||||
ImGui.TextColored(new Vector4(0.9f, 0.85f, 0.4f, 1f), "First action must be the combo starter (e.g. Spinning Edge for NIN), or the icon/state won't advance.");
|
||||
|
||||
Reference in New Issue
Block a user