Skip to content
This repository was archived by the owner on Feb 11, 2024. It is now read-only.

Commit ffd433a

Browse files
committed
Updated configmanbutton
1 parent 5a6c100 commit ffd433a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

COM3D2.ConfigManButton/Main.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,20 @@ private void Awake()
4343
logger = Logger;
4444

4545
//Binds the configuration. In other words it sets your ConfigEntry var to your config setup.
46-
DisableManagerHotkey = Config.Bind("General", "Disable ConfigManager Hotkey", false, "Will turn off the F1 key from activating config manager.");
46+
DisableManagerHotkey = Config.Bind("General", "Use ConfigManager Hotkey", false, "Will turn off the F1 key from activating config manager.");
47+
48+
DisableManagerHotkey.SettingChanged += (s,e) =>
49+
{
50+
ConfigMan.OverrideHotkey = !DisableManagerHotkey.Value;
51+
};
52+
4753

4854
ConfigMan = GetComponent<ConfigurationManager.ConfigurationManager>();
4955

5056
Button = COM3D2.GUIAPI.ButtonHandler.CreateConfigTabButton("PLUGINS", new EventDelegate(() =>
5157
{
5258
ConfigMan.DisplayingWindow = !ConfigMan.DisplayingWindow;
59+
ConfigMan.OverrideHotkey = !DisableManagerHotkey.Value;
5360
}));
5461
}
5562
}

0 commit comments

Comments
 (0)