コード例 #1
0
        public void Validate()
        {
            if (versionID != BvMain.configVersionID)
            {
                versionID = BvMain.configVersionID;
            }

            if (menu != null)
            {
                menu.Validate();
            }
            else
            {
                menu = PropMenuConfig.Defaults;
            }

            if (binds != null)
            {
                binds.Validate();
            }
            else
            {
                binds = BindsConfig.Defaults;
            }

            if (propertyBlock != null)
            {
                propertyBlock.Validate();
            }
            else
            {
                propertyBlock = PropBlockConfig.Defaults;
            }
        }
コード例 #2
0
 /// <summary>
 /// Returns the current instance or creates one if necessary.
 /// </summary>
 public static void Init(PropMenuConfig cfg)
 {
     if (Instance == null)
     {
         Instance = new PropertiesMenu(cfg);
     }
 }
コード例 #3
0
        private PropertiesMenu(PropMenuConfig cfg)
        {
            apiHud      = new ApiHud(cfg.apiHudConfig);
            fallbackHud = new NotifHud(cfg.fallbackHudConfig);
            target      = null;

            index     = 0;
            selection = -1;
            menuOpen  = false;
            Cfg       = cfg;
        }