fix methods setup so that android also auto-adds methods from PGraphics/PImage

This commit is contained in:
benfry
2012-07-21 15:05:08 +00:00
parent ab958db8bf
commit f7752ae687
6 changed files with 856 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ import org.apache.tools.ant.Task;
public class PAppletMethods extends Task {
private File baseDir;
private boolean includeRecorder;
public PAppletMethods() {
@@ -30,6 +31,11 @@ public class PAppletMethods extends Task {
}
public void setRecorder(boolean rec) {
includeRecorder = rec;
}
public void execute() throws BuildException {
// Do a bunch of checks...
if (baseDir == null) {
@@ -247,7 +253,7 @@ public class PAppletMethods extends Task {
gline += ");";
rline += ");";
if (!gotStatic && returns.equals("")) {
if (!gotStatic && returns.equals("") && includeRecorder) {
out.append(rline);
out.append('\n');
}