Add props.compileCondition to actually use exposed SGCondition.
This commit is contained in:
parent
4b00bb3067
commit
43f8ce0870
1 changed files with 13 additions and 0 deletions
|
@ -281,6 +281,19 @@ var nodeList = func {
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
##
|
||||||
|
# Compiles a <condition> property branch according to the rules
|
||||||
|
# set out in $FG_ROOT/Docs/README.conditions into a Condition object.
|
||||||
|
# The 'test' method of the returend object can be used to evaluate
|
||||||
|
# the condition.
|
||||||
|
# The function returns nil on error.
|
||||||
|
#
|
||||||
|
var compileCondition = func(p) {
|
||||||
|
if(p == nil) return nil;
|
||||||
|
if(!isa(p, Node)) p = props.globals.getNode(p);
|
||||||
|
return _createCondition(p._g);
|
||||||
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
# Evaluates a <condition> property branch according to the rules
|
# Evaluates a <condition> property branch according to the rules
|
||||||
# set out in $FG_ROOT/Docs/README.conditions. Undefined conditions
|
# set out in $FG_ROOT/Docs/README.conditions. Undefined conditions
|
||||||
|
|
Loading…
Reference in a new issue