protected override void AfterLoadData() { CmdManager.GetOrCreateGroup("/rhd", GetChatCommands()); FontManager.Init(); BindManager.Init(); MasterConfig.Load(true); }
public override void BeforeClose() { UnregisterClientHandler(); MasterConfig.Save(); MasterConfig.ClearSubscribers(); if (ExceptionHandler.Reloading) { for (int n = clients.Count - 1; n >= 0; n--) { clients[n].Unregister(); } clients.Clear(); } }
private CmdGroupInitializer GetChatCommands() { return(new CmdGroupInitializer { { "resetBinds", x => MasterBinds.Cfg = BindsConfig.Defaults }, { "save", x => MasterConfig.SaveStart() }, { "load", x => MasterConfig.LoadStart() }, { "resetConfig", x => MasterConfig.ResetConfig() }, { "open", x => RichHudTerminal.OpenMenu() }, { "close", x => RichHudTerminal.CloseMenu() }, { "toggleCursor", x => HudMain.EnableCursor = !HudMain.EnableCursor }, { "crash", x => ThrowException() }, { "toggleDebug", x => RichHudDebug.EnableDebug = !RichHudDebug.EnableDebug }, { "textBench", TextBench, 2 }, { "printConIDs", x => ExceptionHandler.WriteToLog(StringListToString(BindManager.SeControlIDs)) }, { "printMouseConIDs", x => ExceptionHandler.WriteToLog(StringListToString(BindManager.SeMouseControlIDs)) } }); }