Fix context menu disabling.

This commit is contained in:
Ottermandias 2023-07-26 18:11:54 +02:00
parent a32d134c45
commit 65b65f572d

View file

@ -21,7 +21,6 @@ public class ContextMenuService : IDisposable
private readonly StateManager _state; private readonly StateManager _state;
private readonly ObjectManager _objects; private readonly ObjectManager _objects;
private readonly GameGui _gameGui; private readonly GameGui _gameGui;
private readonly Configuration _config;
public ContextMenuService(ItemManager items, StateManager state, ObjectManager objects, GameGui gameGui, Configuration config) public ContextMenuService(ItemManager items, StateManager state, ObjectManager objects, GameGui gameGui, Configuration config)
{ {
@ -29,8 +28,8 @@ public class ContextMenuService : IDisposable
_state = state; _state = state;
_objects = objects; _objects = objects;
_gameGui = gameGui; _gameGui = gameGui;
_config = config; if (config.EnableGameContextMenu)
Enable(); Enable();
} }
public void Enable() public void Enable()