/// <summary> /// Called by the game when the mod options panel is setup. /// </summary> public void OnSettingsUI(UIHelperBase helper) { // Language drop down. UIDropDown languageDropDown = (UIDropDown)helper.AddDropdown(Translations.Translate("TRN_CHOICE"), Translations.LanguageList, Translations.Index, (index) => { Translations.Index = index; SettingsUtils.SaveSettings(); }); languageDropDown.autoSize = false; languageDropDown.width = 270f; // Hotkey control. languageDropDown.parent.parent.gameObject.AddComponent <OptionsKeymapping>(); }
/// <summary> /// Called by the game when the mod is enabled. /// </summary> public void OnEnabled() { // Load the settings file. SettingsUtils.LoadSettings(); }