Ejemplo n.º 1
0
        /// <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>();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Called by the game when the mod is enabled.
 /// </summary>
 public void OnEnabled()
 {
     // Load the settings file.
     SettingsUtils.LoadSettings();
 }