예제 #1
0
        /// <summary>
        /// Checks any if fields have invalid values and resets them to the default if necessary.
        /// </summary>
        public void Validate()
        {
            ApiHudConfig defaults = Defaults;

            if (maxVisible == default(int))
            {
                maxVisible = defaults.maxVisible;
            }

            if (hudScale == default(float))
            {
                hudScale = defaults.hudScale;
            }

            colors.Validate();
        }
예제 #2
0
        public void Validate()
        {
            if (apiHudConfig != null)
            {
                apiHudConfig.Validate();
            }
            else
            {
                apiHudConfig = ApiHudConfig.Defaults;
            }

            if (fallbackHudConfig != null)
            {
                fallbackHudConfig.Validate();
            }
            else
            {
                fallbackHudConfig = NotifHudConfig.Defaults;
            }
        }
예제 #3
0
 public ApiHud(ApiHudConfig cfg)
 {
     menu = new HudUtilities.ScrollMenu(20);
     Cfg  = cfg;
 }