All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.czyzby.lml.parser.impl.attribute.ScaleXLmlAttribute Maven / Gradle / Ivy

package com.github.czyzby.lml.parser.impl.attribute;

import com.badlogic.gdx.scenes.scene2d.Actor;
import com.github.czyzby.lml.parser.LmlParser;
import com.github.czyzby.lml.parser.tag.LmlAttribute;
import com.github.czyzby.lml.parser.tag.LmlTag;

/** Sets actor's X scale. Expects a float. By default, mapped to "scaleX" attribute name.
 *
 * @author MJ */
public class ScaleXLmlAttribute implements LmlAttribute {
    @Override
    public Class getHandledType() {
        return Actor.class;
    }

    @Override
    public void process(final LmlParser parser, final LmlTag tag, final Actor actor, final String rawAttributeData) {
        actor.setScaleX(parser.parseFloat(rawAttributeData, actor));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy