Ejemplo n.º 1
0
        protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
        {
            string nameLower = name.ToLower();

            if (nameLower == "maxchars")
            {
                _maxChars = parser.ParseInteger();
            }
            else if (nameLower == "numeric")
            {
                _numeric = parser.ParseBool();
            }
            else if (nameLower == "wrap")
            {
                _wrap = parser.ParseBool();
            }
            else if (nameLower == "readonly")
            {
                _readOnly = parser.ParseBool();
            }
            else if (nameLower == "forcescroll")
            {
                _forceScroll = parser.ParseBool();
            }
            else if (nameLower == "source")
            {
                _sourceFile = ParseString(parser);
            }
            else if (nameLower == "password")
            {
                _password.Set(parser.ParseBool());
            }
            else if (nameLower == "cvarmax")
            {
                _cvarMax = parser.ParseInteger();
            }
            else
            {
                return(base.ParseInternalVariable(name, parser));
            }

            return(true);
        }
Ejemplo n.º 2
0
        protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
        {
            string nameLower = name.ToLower();

            if ((nameLower == "stepsize") || (nameLower == "step"))
            {
                _stepSize = parser.ParseFloat();
            }
            else if (nameLower == "low")
            {
                _low = parser.ParseFloat();
            }
            else if (nameLower == "high")
            {
                _high = parser.ParseFloat();
            }
            else if (nameLower == "vertical")
            {
                _vertical = parser.ParseBool();
            }
            else if (nameLower == "verticalflip")
            {
                _verticalFlip = parser.ParseBool();
            }
            else if (nameLower == "scrollbar")
            {
                _scrollBar = parser.ParseBool();
            }
            else if (nameLower == "thumbshader")
            {
                _thumbMaterialName = ParseString(parser);
                idE.DeclManager.FindMaterial(_thumbMaterialName);
            }
            else
            {
                return(base.ParseInternalVariable(name, parser));
            }

            return(true);
        }
Ejemplo n.º 3
0
        protected override bool ParseInternalVariable(string name, Text.idScriptParser parser)
        {
            string nameLower = name.ToLower();

            if (nameLower == "horizontal")
            {
                _horizontal = parser.ParseBool();
            }
            else if (nameLower == "listname")
            {
                _listName = ParseString(parser);
            }
            else if (nameLower == "tabstops")
            {
                _tabStopString = ParseString(parser);
            }
            else if (nameLower == "tabaligns")
            {
                _tabAlignString = ParseString(parser);
            }
            else if (nameLower == "multiplesel")
            {
                _multipleSelection = parser.ParseBool();
            }
            else if (nameLower == "tabvaligns")
            {
                _tabVerticalAlignString = ParseString(parser);
            }
            else if (nameLower == "tabtypes")
            {
                _tabTypeString = ParseString(parser);
            }
            else if (nameLower == "tabiconsizes")
            {
                _tabIconSizeString = ParseString(parser);
            }
            else if (nameLower == "tabiconvoffset")
            {
                _tabIconVerticalOffsetString = ParseString(parser);
            }
            else if (nameLower.StartsWith("mtr_") == true)
            {
                string materialName = ParseString(parser);

                idMaterial material = idE.DeclManager.FindMaterial(materialName);
                material.ImageClassification = 1;                 // just for resource tracking

                if ((material != null) && (material.TestMaterialFlag(MaterialFlags.Defaulted) == false))
                {
                    material.Sort = (float)MaterialSort.Gui;
                }

                _iconMaterials.Add(name, material);
            }
            else
            {
                return(base.ParseInternalVariable(name, parser));
            }

            return(true);
        }