示例#1
0
 /// <summary>
 /// Applied after OnKeyDown runs.
 /// </summary>
 internal static void Postfix(KButtonEvent e)
 {
     if (inGameSettings != null && !e.Consumed && e.TryConsume(inGameSettings.
                                                               GetKAction()))
     {
         POptions.ShowNow(typeof(ToastControlOptions), onClose: (_) =>
                          ToastControlPopups.ReloadOptions());
     }
 }
示例#2
0
 public static void OnLoad()
 {
     PUtil.InitLibrary();
     PLocalization.Register();
     LocString.CreateLocStringKeys(typeof(ToastControlStrings.UI));
     POptions.RegisterOptions(typeof(ToastControlOptions));
     PUtil.RegisterPatchClass(typeof(ToastControlPopups));
     ToastControlPopups.ReloadOptions();
     // No default key bind
     inGameSettings = PAction.Register(ToastControlStrings.ACTION_KEY,
                                       ToastControlStrings.ACTION_TITLE);
 }
 public override void OnLoad(Harmony harmony)
 {
     base.OnLoad(harmony);
     PUtil.InitLibrary();
     new PLocalization().Register();
     LocString.CreateLocStringKeys(typeof(ToastControlStrings.UI));
     new POptions().RegisterOptions(this, typeof(ToastControlOptions));
     new PPatchManager(harmony).RegisterPatchClass(typeof(ToastControlPopups));
     ToastControlPopups.ReloadOptions();
     // No default key bind
     inGameSettings = new PActionManager().CreateAction(ToastControlStrings.ACTION_KEY,
                                                        ToastControlStrings.ACTION_TITLE);
     new PVersionCheck().Register(this, new SteamVersionChecker());
 }