OSDN Git Service

Merge branch 'Split_renderers' into vgd
[automap/automap.git] / Automap / AutomapMod.cs
index f4d7771..3f34eb9 100644 (file)
@@ -19,41 +19,39 @@ namespace Automap
             return forSide.IsClient();
         }
 
-        public override void StartClientSide(ICoreClientAPI api)
-        {
-            this.API = api;
+               public override void StartClientSide(ICoreClientAPI api)
+               {
+                       this.API = api;
 
-            if (api.Side == EnumAppSide.Client)
-            {
-                this.ClientAPI = api as ICoreClientAPI;
-                this.Logger = Mod.Logger;
+                       if (api.Side == EnumAppSide.Client)
+                       {
+                               this.ClientAPI = api as ICoreClientAPI;
+                               this.Logger = Mod.Logger;
 
 
-                ClientAPI.Logger.VerboseDebug("Automap Present!");
-                _localAutomap = new AutomapSystem(this.ClientAPI, this.Logger);
-                _automapDialog = new AutomapGUIDialog(ClientAPI, _localAutomap);
+                               ClientAPI.Logger.VerboseDebug("Automap Present!");
+                               _localAutomap = new AutomapSystem(this.ClientAPI, this.Logger);
+                               _automapDialog = new AutomapGUIDialog(ClientAPI, _localAutomap);
 
-                ClientAPI.Input.RegisterHotKey(AutomapGUIDialog._automapControlPanelKey, "Automap control panel", GlKeys.A, HotkeyType.GUIOrOtherControls);
-                ClientAPI.Input.SetHotKeyHandler(AutomapGUIDialog._automapControlPanelKey, ToggleAM_Dialog);
-            }
+                               ClientAPI.Input.RegisterHotKey(AutomapGUIDialog._automapControlPanelKey, "Automap control panel", GlKeys.M, HotkeyType.GUIOrOtherControls, shiftPressed: true);
+                               ClientAPI.Input.SetHotKeyHandler(AutomapGUIDialog._automapControlPanelKey, ToggleAM_Dialog);
+                       }
 
             base.StartClientSide(api);
         }
 
-        public override double ExecuteOrder()
-        {
-            return 0.2;
-        }
-
-        private bool ToggleAM_Dialog(KeyCombination comb)
-        {
-            if (_automapDialog.IsOpened()) _automapDialog.TryClose();
-            else _automapDialog.TryOpen();
-
-            return true;
-        }
+               public override double ExecuteOrder()
+               {
+                       return 0.2;
+               }
 
+               private bool ToggleAM_Dialog(KeyCombination comb)
+               {
+                       if (_automapDialog.IsOpened()) _automapDialog.TryClose();
+                       else _automapDialog.TryOpen();
 
-    }
+                       return true;
+               }
+       }
 }