Remove NavigationShortcutController
This commit is contained in:
parent
052c366ea0
commit
263e0b9a24
@ -1,39 +0,0 @@
|
||||
using System.Numerics;
|
||||
using Dalamud.Plugin.Services;
|
||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||
using Questionable.Functions;
|
||||
using Questionable.Model;
|
||||
|
||||
namespace Questionable.Controller;
|
||||
|
||||
internal sealed class NavigationShortcutController
|
||||
{
|
||||
private readonly IGameGui _gameGui;
|
||||
private readonly MovementController _movementController;
|
||||
private readonly GameFunctions _gameFunctions;
|
||||
|
||||
public NavigationShortcutController(IGameGui gameGui, MovementController movementController,
|
||||
GameFunctions gameFunctions)
|
||||
{
|
||||
_gameGui = gameGui;
|
||||
_movementController = movementController;
|
||||
_gameFunctions = gameFunctions;
|
||||
}
|
||||
|
||||
public unsafe void HandleNavigationShortcut()
|
||||
{
|
||||
var inputData = UIInputData.Instance();
|
||||
if (inputData == null)
|
||||
return;
|
||||
|
||||
if (inputData->IsGameWindowFocused &&
|
||||
inputData->UIFilteredMouseButtonReleasedFlags.HasFlag(MouseButtonFlags.LBUTTON) &&
|
||||
inputData->GetKeyState(SeVirtualKey.MENU).HasFlag(KeyStateFlags.Down) &&
|
||||
_gameGui.ScreenToWorld(new Vector2(inputData->CursorXPosition, inputData->CursorYPosition),
|
||||
out Vector3 worldPos))
|
||||
{
|
||||
_movementController.NavigateTo(EMovementType.Shortcut, null, worldPos,
|
||||
_gameFunctions.IsFlyingUnlockedInCurrentZone(), true);
|
||||
}
|
||||
}
|
||||
}
|
@ -16,7 +16,6 @@ internal sealed class DalamudInitializer : IDisposable
|
||||
private readonly IFramework _framework;
|
||||
private readonly QuestController _questController;
|
||||
private readonly MovementController _movementController;
|
||||
private readonly NavigationShortcutController _navigationShortcutController;
|
||||
private readonly WindowSystem _windowSystem;
|
||||
private readonly QuestWindow _questWindow;
|
||||
private readonly ConfigWindow _configWindow;
|
||||
@ -29,7 +28,6 @@ internal sealed class DalamudInitializer : IDisposable
|
||||
QuestController questController,
|
||||
MovementController movementController,
|
||||
GameUiController gameUiController,
|
||||
NavigationShortcutController navigationShortcutController,
|
||||
WindowSystem windowSystem,
|
||||
QuestWindow questWindow,
|
||||
DebugOverlay debugOverlay,
|
||||
@ -44,7 +42,6 @@ internal sealed class DalamudInitializer : IDisposable
|
||||
_framework = framework;
|
||||
_questController = questController;
|
||||
_movementController = movementController;
|
||||
_navigationShortcutController = navigationShortcutController;
|
||||
_windowSystem = windowSystem;
|
||||
_questWindow = questWindow;
|
||||
_configWindow = configWindow;
|
||||
@ -71,7 +68,6 @@ internal sealed class DalamudInitializer : IDisposable
|
||||
private void FrameworkUpdate(IFramework framework)
|
||||
{
|
||||
_questController.Update();
|
||||
_navigationShortcutController.HandleNavigationShortcut();
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -182,7 +182,6 @@ public sealed class QuestionablePlugin : IDalamudPlugin
|
||||
serviceCollection.AddSingleton<QuestRegistry>();
|
||||
serviceCollection.AddSingleton<QuestController>();
|
||||
serviceCollection.AddSingleton<GameUiController>();
|
||||
serviceCollection.AddSingleton<NavigationShortcutController>();
|
||||
serviceCollection.AddSingleton<CombatController>();
|
||||
serviceCollection.AddSingleton<GatheringController>();
|
||||
serviceCollection.AddSingleton<ContextMenuController>();
|
||||
|
Loading…
Reference in New Issue
Block a user