Beispiel #1
0
        public static void Init()
        {
            // load custom shortcuts first
            if (!File.Exists(CustomShortcutsPath))
            {
                File.WriteAllText(CustomShortcutsPath, "[\n]");
            }

            _watcher = new FileSystemWatcher
            {
                Path                = Editor.Current.EditorDocumentsPath,
                Filter              = "KeyboardShortcuts.json",
                NotifyFilter        = NotifyFilters.LastWrite,
                EnableRaisingEvents = true,
            };
            _watcher.Changed += (s, e) => ReloadKeymap();

            _defaultShortcutsJson = ContentProvider.DownloadString("editor://KeyboardShortcuts.json");
            ReloadKeymap();
        }
Beispiel #2
0
 static IconProvider()
 {
     _icons =
         HttpService.JsonDecode <Dictionary <string, string> >(
             ContentProvider.DownloadString("editor://IconDictionary.json"));
 }