Extra checks for SolverRunning in macro editor
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"Name": "Craftimizer",
|
||||
"Punchline": "Simulate crafts, create computer-assisted macros, and get mid-craft suggestions from the comfort of your own game!",
|
||||
"Description": "Allows you to generate macros and simulate all sorts of crafts without having to open another app. Open your crafting log to get started!",
|
||||
"RepoUrl": "https://github.com/WorkingRobot/craftimizer",
|
||||
"RepoUrl": "https://github.com/WorkingRobot/Craftimizer",
|
||||
"InternalName": "Craftimizer",
|
||||
"ApplicableVersion": "any",
|
||||
"Tags": [
|
||||
@@ -21,10 +21,10 @@
|
||||
"CategoryTags": [
|
||||
"Jobs"
|
||||
],
|
||||
"IconUrl": "https://git.camora.dev/asriel/craftimizer/raw/branch/main/icon.png",
|
||||
"IconUrl": "https://git.camora.dev/asriel/Craftimizer/raw/branch/main/icon.png",
|
||||
"ImageUrls": [
|
||||
"https://git.camora.dev/asriel/craftimizer/raw/branch/main/Images/RecipeNote.png",
|
||||
"https://git.camora.dev/asriel/craftimizer/raw/branch/main/Images/SynthHelper.png",
|
||||
"https://git.camora.dev/asriel/craftimizer/raw/branch/main/Images/MacroEditor.png",
|
||||
"https://git.camora.dev/asriel/Craftimizer/raw/branch/main/Images/RecipeNote.png",
|
||||
"https://git.camora.dev/asriel/Craftimizer/raw/branch/main/Images/SynthHelper.png",
|
||||
"https://git.camora.dev/asriel/Craftimizer/raw/branch/main/Images/MacroEditor.png",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -953,7 +953,7 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
{
|
||||
var actionBase = actions[i].Base();
|
||||
var canUse = actionBase.CanUse(sim);
|
||||
if (ImGui.ImageButton(actions[i].GetIcon(RecipeData!.ClassJob).ImGuiHandle, new(imageSize), default, Vector2.One, 0, default, !canUse ? new(1, 1, 1, ImGui.GetStyle().DisabledAlpha) : Vector4.One))
|
||||
if (ImGui.ImageButton(actions[i].GetIcon(RecipeData!.ClassJob).ImGuiHandle, new(imageSize), default, Vector2.One, 0, default, !canUse ? new(1, 1, 1, ImGui.GetStyle().DisabledAlpha) : Vector4.One) && !SolverRunning)
|
||||
AddStep(actions[i]);
|
||||
if (!canUse &&
|
||||
(CharacterStats.Level < actionBase.Level ||
|
||||
@@ -1223,6 +1223,8 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGuiUtils.Tooltip($"{action.GetName(RecipeData!.ClassJob)}\n{actionBase.GetTooltip(CreateSim(lastState), true)}");
|
||||
|
||||
if (!SolverRunning)
|
||||
{
|
||||
using var _padding = ImRaii.PushStyle(ImGuiStyleVar.WindowPadding, Vector2.Zero);
|
||||
using (var _source = ImRaii.DragDropSource())
|
||||
{
|
||||
@@ -1242,6 +1244,7 @@ public sealed class MacroEditor : Window, IDisposable
|
||||
Macro.Insert(i, newAction);
|
||||
}
|
||||
}
|
||||
}
|
||||
lastState = state;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user