Example #1
0
        public virtual ConfigNode Load(ConfigNode config)
        {
            if (config.HasNode(configNodeName))
            {
                ConfigNode windowConfig = config.GetNode(configNodeName);

                windowPos.x      = DialogUtils.GetValue(windowConfig, "x", windowPos.x);
                windowPos.y      = DialogUtils.GetValue(windowConfig, "y", windowPos.y);
                windowPos.width  = DialogUtils.GetValue(windowConfig, "width", windowPos.width);
                windowPos.height = DialogUtils.GetValue(windowConfig, "height", windowPos.height);

                bool newValue = DialogUtils.GetValue(windowConfig, "visible", visible);
                SetVisible(newValue);

                return(windowConfig);
            }
            else
            {
                return(null);
            }
        }