public override void OnLevelLoaded(LoadMode mode)
        {
            ModConfiguration config = Configuration <ModConfiguration> .Load();

            // Load the configuration
            replaceRoadTextures(config.RoadTheme);
            Debug.Log("valuexml: " + config.RoadTheme);
        }
예제 #2
0
        public void OnSettingsUI(UIHelperBase helper)
        {
            // Load the configuration
            ModConfiguration config = Configuration <ModConfiguration> .Load();

            ModLoading loadinginstuc = new ModLoading();

            // Small Roads
            int roadtexture = GetSelectedOptionIndex(config.RoadTheme);

            helper.AddDropdown("Texture Theme", OptionLabels, roadtexture, sel =>
            {
                // Change config value and save config
                config.RoadTheme = OptionValues[sel];
                Configuration <ModConfiguration> .Save();
                loadinginstuc.replaceRoadTextures(config.RoadTheme);
            });
        }