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

            if (name == "choicetype")
            {
                _choiceType = parser.ParseInteger();
                return(true);
            }
            else if (name == "currentchoice")
            {
                _currentChoice = parser.ParseInteger();
                return(true);
            }

            return(base.ParseInternalVariable(name, parser));
        }
Beispiel #2
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);
        }