Conditionally disable some UI buttons

This commit is contained in:
Liza 2024-08-16 22:34:59 +02:00
parent e3e9ffed3a
commit 9cef8c160f
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -148,7 +148,7 @@ internal sealed class CreationUtilsComponent
ImGui.SameLine();
ImGui.Text($"QM: {gameObject->NamePlateIconId}");
ImGui.BeginDisabled(!_movementController.IsNavmeshReady);
ImGui.BeginDisabled(!_movementController.IsNavmeshReady || _gameFunctions.IsOccupied());
if (!_movementController.IsPathfinding)
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Bullseye, "To Target"))
@ -177,6 +177,7 @@ internal sealed class CreationUtilsComponent
ImGui.EndDisabled();
ImGui.BeginDisabled(_gameFunctions.IsOccupied());
ImGui.SameLine();
bool interact = ImGuiComponents.IconButton(FontAwesomeIcon.MousePointer);
if (ImGui.IsItemHovered())
@ -187,7 +188,7 @@ internal sealed class CreationUtilsComponent
(GameObject*)_targetManager.Target.Address, false);
_logger.LogInformation("XXXXX Interaction Result: {Result}", result);
}
ImGui.EndDisabled();
ImGui.SameLine();
bool copy = ImGuiComponents.IconButton(FontAwesomeIcon.Copy);