protected virtual void Dispose(bool disposing) { if (!disposing) { return; } IPC.Dispose(); Config.Save(); new CameraConfigPreset().Apply(); DalamudApi.Framework.Update -= Update; DalamudApi.ClientState.Login -= Login; DalamudApi.ClientState.Logout -= Logout; DalamudApi.PluginInterface.UiBuilder.OpenConfigUi -= ToggleConfig; DalamudApi.PluginInterface.UiBuilder.Draw -= Draw; DalamudApi.Dispose(); if (FreeCam.Enabled) { FreeCam.Toggle(); } Game.Dispose(); Memory.Dispose(); }
private static unsafe void DrawOtherSettings() { ImGui.TextUnformatted("QoL Bar Status:"); if (!IPC.QoLBarEnabled) { ImGui.SameLine(); ImGui.TextColored(new Vector4(1, 0, 0, 1), "Disabled"); ImGui.SameLine(); ImGui.PushFont(UiBuilder.IconFont); if (ImGui.SmallButton($"{FontAwesomeIcon.UndoAlt.ToIconString()}##CheckQoLBar")) { IPC.Dispose(); IPC.Initialize(); } ImGui.PopFont(); } else { ImGui.SameLine(); ImGui.TextColored(new Vector4(0, 1, 0, 1), "Enabled"); } ImGui.Spacing(); ImGui.Columns(3, null, false); { var _ = Game.GetCameraTargetHook.IsEnabled; if (ImGui.Checkbox("Spectate Focus / Soft Target", ref _)) { Game.ToggleSpectate(); } } { ImGui.NextColumn(); var _ = FreeCam.Enabled; if (ImGui.Checkbox("Free Cam", ref _)) { FreeCam.Toggle(); } } ImGui.NextColumn(); if (ImGui.Checkbox("Toggle Free Cam on Death/Revive", ref Cammy.Config.FreeCamOnDeath)) { Cammy.Config.Save(); } if (Game.cameraNoCollideReplacer.IsValid) { ImGui.NextColumn(); var _ = Game.cameraNoCollideReplacer.IsEnabled; if (ImGui.Checkbox("Disable Camera Collision", ref _)) { Game.cameraNoCollideReplacer.Toggle(); } } ImGui.Columns(1); ImGui.Spacing(); { ImGui.PushFont(UiBuilder.IconFont); if (ImGui.Button($"{FontAwesomeIcon.UndoAlt.ToIconString()}##Reset???")) { Game.cameraManager->WorldCamera->Mode = 1; } ImGui.PopFont(); ImGui.SameLine(); var _ = Game.cameraManager->WorldCamera->Mode; if (ImGui.SliderInt("???", ref _, 0, 2)) { Game.cameraManager->WorldCamera->Mode = _; } } }