public NestedForEachLmlMacroTag( final LmlParser parser, final LmlTag parentTag, final String rawTagData) { super(parser, parentTag, rawTagData); final int argumentsAmount = GdxArrays.sizeOf(getAttributes()); if (argumentsAmount <= 0) { parser.throwErrorIfStrict("Nested for each macro needs array attributes to iterate over."); indexes = null; argumentNames = null; values = null; } else { indexes = new IntArray(argumentsAmount); argumentNames = GdxArrays.newArray(argumentsAmount); values = GdxArrays.newArray(argumentsAmount); fillArrays(); } }
@Override public void process( final LmlParser parser, final LmlTag tag, final VisTextField actor, final String rawAttributeData) { final String passwordCharacter = parser.parseString(rawAttributeData, actor); if (Strings.isEmpty(passwordCharacter)) { parser.throwError( "Password character setting cannot be empty. String with length of 1 is required."); } else if (passwordCharacter.length() != 1) { parser.throwErrorIfStrict( "String with length of 1 is required for password character setting."); } // At this point, string must have at least 1 character. actor.setPasswordCharacter(passwordCharacter.charAt(0)); }