Skip to content

Commit 660817b

Browse files
authored
Update for JRubyArt-3.2.1
1 parent 9cd44c1 commit 660817b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

samples/JRubyArt/JRubyArt.pde

+10-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ boolean acceptOver = false;
1818
boolean noJruby = false;
1919
boolean selected = false;
2020
boolean eightOne = false;
21-
String jruby = "\"true\"";
21+
String jruby = "true";
2222

2323
void setup() {
2424
size(600, 200);
@@ -67,7 +67,7 @@ void draw() {
6767
text(processingRoot + (frameCount / 10 % 2 == 0 ? "_" : ""), 35, 56);
6868
fill(0, 0, 200);
6969
text("Select nojruby to use jruby-complete by default", 35, 140);
70-
update(mouseX, mouseY);
70+
update();
7171
//background(200);
7272

7373
if (acceptOver) {
@@ -98,16 +98,20 @@ void writeRoot() {
9898
if (!yaml.exists()) {
9999
try {
100100
PrintWriter writer = new PrintWriter(config, "UTF-8");
101-
writer.println(String.format("--- # config.yml"));
101+
writer.println("--- # config.yml");
102102
writer.println(String.format("PROCESSING_ROOT: %s", processingRoot));
103-
writer.println(String.format("JRUBY: %s", jruby));
103+
writer.println(String.format("JRUBY: %s # set to false to use jruby-complete", jruby));
104104
writer.println(String.format("sketchbook_path: %s", sketchbookPath));
105+
writer.println("template: bare # class or emacs");
106+
writer.println("java_args: # global jvm option, overridden by data/java_args.txt");
105107
writer.close();
106108
}
107109
catch (FileNotFoundException ex) {
108110
}
109111
catch (UnsupportedEncodingException ex) {
110112
}
113+
} else {
114+
System.out.println("Config exists not overwriting!!!");
111115
}
112116
processingRoot = done;
113117
}
@@ -132,14 +136,14 @@ void keyReleased() {
132136
}
133137
}
134138

135-
void update(float x, float y) {
139+
void update() {
136140
acceptOver = enter.overRect();
137141
noJruby = nojruby.overRect();
138142
}
139143

140144

141145
void mouseClicked() {
142-
update(mouseX, mouseY);
146+
update();
143147
if (acceptOver) {
144148
rectColor = selectedColor;
145149
rectHighlight = selectedColor;

0 commit comments

Comments
 (0)