use of com.b3dgs.lionengine.game.feature.ActionConfig in project lionengine by b3dgs.
the class UtilActionnable method createAction.
/**
* Create a default action.
*
* @param description The description.
* @param area The button.
* @return The temp media.
*/
public static Media createAction(String description, Area area) {
final Media media = Medias.create("action.xml");
final String name = "name";
final ActionConfig action = new ActionConfig(name, description, (int) area.getX(), (int) area.getY(), area.getWidth(), area.getHeight());
final Xml root = new Xml("test");
root.add(ActionConfig.exports(action));
root.save(media);
return media;
}
Aggregations