Ejemplo n.º 1
0
 public FindModeHandler(IKeybindingsModeSelector modeSelector, RemoteCommandsManager remoteCommandsManager, KeybindingsOverlayReference overlay)
 {
     _modeSelector          = modeSelector;
     _remoteCommandsManager = remoteCommandsManager;
     _overlay     = overlay;
     _fuzzyFinder = new FuzzyFinder();
 }
Ejemplo n.º 2
0
 public GlobalCommands(JSONStorable owner, Atom containingAtom, ISelectionHistoryManager selectionHistoryManager, RemoteCommandsManager remoteCommandsManager)
 {
     _owner                   = owner;
     _containingAtom          = containingAtom;
     _selectionHistoryManager = selectionHistoryManager;
     _remoteCommandsManager   = remoteCommandsManager;
 }
 public NormalModeHandler(
     MonoBehaviour owner,
     IKeybindingsSettings settings,
     IKeyMapManager keyMapManager,
     KeybindingsOverlayReference overlay,
     RemoteCommandsManager remoteCommandsManager
     )
 {
     _owner                 = owner;
     _settings              = settings;
     _keyMapManager         = keyMapManager;
     _overlay               = overlay;
     _remoteCommandsManager = remoteCommandsManager;
 }
Ejemplo n.º 4
0
    public override void Init()
    {
        if (containingAtom.type != "SessionPluginManager")
        {
            SuperController.LogError("Keybindings plugin can only be installed as a session plugin.");
            CreateTextField(new JSONStorableString("Error", "Keybindings plugin can only be installed as a session plugin."));
            enabledJSON.val = false;
            return;
        }

        _settings                = new KeybindingsSettings();
        _prefabManager           = new PrefabManager();
        _keyMapManager           = new KeyMapManager();
        _analogMapManager        = new AnalogMapManager();
        _selectionHistoryManager = new SelectionHistoryManager();
        _remoteCommandsManager   = new RemoteCommandsManager(this, _selectionHistoryManager);
        _globalCommands          = new GlobalCommands(this, containingAtom, _selectionHistoryManager, _remoteCommandsManager);
        _storage          = new KeybindingsStorage(this, _keyMapManager, _analogMapManager, _settings);
        _overlayReference = new KeybindingsOverlayReference();

        _analogHandler     = new AnalogHandler(_remoteCommandsManager, _analogMapManager, _settings);
        _normalModeHandler = new NormalModeHandler(this, _settings, _keyMapManager, _overlayReference, _remoteCommandsManager);
        _findModeHandler   = new FindModeHandler(this, _remoteCommandsManager, _overlayReference);

        SuperController.singleton.StartCoroutine(_prefabManager.LoadUIAssets());

        AcquireBuiltInCommands();
        _globalCommands.Init();
        AcquireAllAvailableBroadcastingPlugins();

        _storage.ImportDefaults();

        EnterNormalMode();
        // TODO: Map multiple bindings to the same action?

        _valid = true;
    }
Ejemplo n.º 5
0
 public AnalogHandler(RemoteCommandsManager remoteCommandsManager, AnalogMapManager analogMapManager, IKeybindingsSettings settings)
 {
     _remoteCommandsManager = remoteCommandsManager;
     _analogMapManager      = analogMapManager;
     _settings = settings;
 }