public void OnSettingsUI(UIHelperBase helper) { if (string.IsNullOrEmpty(modPath)) { helper?.AddGroup(NoWorkshopMessage); return; } if (helper == null || configProvider == null) { return; } if (configProvider.Configuration == null) { Log.Warning("The 'Real Time' mod wants to display the configuration page, but the configuration is unexpectedly missing."); configProvider.LoadDefaultConfiguration(); } IViewItemFactory itemFactory = new CitiesViewItemFactory(helper); CloseConfigUI(); configUI = ConfigUI.Create(configProvider, itemFactory); ApplyLanguage(); }
public void OnSettingsUI(UIHelperBase helper) { if (helper == null) { return; } if (config == null) { Log.Warning("The 'Real Time' mod wants to display the configuration page, but the configuration is unexpectedly missing."); config = ConfigurationProvider.LoadConfiguration(); } IViewItemFactory itemFactory = new CitiesViewItemFactory(helper); configUI = ConfigUI.Create(config, itemFactory); ApplyLanguage(); }