예제 #1
0
 public static void SaveConfig(ICoreClientAPI capi, bool force = false)
 {
     if (allowSaving || force)
     {
         capi.StoreModConfig(Config, "vshud.json");
         allowSaving = true;
     }
 }
예제 #2
0
 internal void SaveConfig()
 {
     ClientAPI.StoreModConfig(
         Configs,
         CONFIG_PATH
         );
     Logger.Debug("Saved alias config.");
 }
예제 #3
0
        public override void StartClientSide(ICoreClientAPI api)
        {
            capi = api;

            capi.Logger.Event("Hello from ZoomButton!");

            // load config file or write it with defaults
            config = api.LoadModConfig <ModConfig>("zoombutton.json");
            if (config == null)
            {
                config = new ModConfig();
                api.StoreModConfig(config, "zoombutton.json");
            }

            api.Input.RegisterHotKey(HOTKEY_CODE, "Zoom in", GlKeys.Z, HotkeyType.CharacterControls);
            api.Event.RegisterGameTickListener(OnGameTick, MAX_FRAMERATE_MS);

            renderer = new SquintOverlayRenderer(api);
        }
예제 #4
0
 public static void SaveConfig(ICoreClientAPI capi) => capi.StoreModConfig(Config, "vshud.json");
예제 #5
0
 public void Store()
 {
     capi.StoreModConfig(this as ModSettingsBase, "ShadersMod.json");
 }
예제 #6
0
 public void SaveConfig() => capi.StoreModConfig(Config, "waypointutils.json");