mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
fixes to re-enable sketchbook prompt, also shift-new to do oppo behavior
This commit is contained in:
@@ -100,10 +100,14 @@ public class PdeSketchbook {
|
||||
* Handle creating a sketch folder, return its base .pde file
|
||||
* or null if the operation was cancelled.
|
||||
*/
|
||||
public String handleNew(boolean startup) throws IOException {
|
||||
public String handleNew(boolean startup,
|
||||
boolean shift) throws IOException {
|
||||
File newbieDir = null;
|
||||
String newbieName = null;
|
||||
|
||||
boolean prompt = PdePreferences.getBoolean("sketchbook.prompt");
|
||||
if (shift) prompt = !prompt; // reverse behavior if shift is down
|
||||
|
||||
// no sketch has been started, don't prompt for the name if it's
|
||||
// starting up, just make the farker. otherwise if the person hits
|
||||
// 'cancel' i'd have to add a thing to make p5 quit, which is silly.
|
||||
@@ -112,8 +116,10 @@ public class PdeSketchbook {
|
||||
// unless, ermm, they user tested it and people preferred that as
|
||||
// a way to get started. shite. now i hate myself.
|
||||
//
|
||||
//if (PdePreferences.getBoolean("sketchbook.prompt") && !startup) {
|
||||
if (!startup) {
|
||||
if (startup) prompt = false;
|
||||
|
||||
if (prompt) {
|
||||
//if (!startup) {
|
||||
// prompt for the filename and location for the new sketch
|
||||
|
||||
FileDialog fd = new FileDialog(editor, //new Frame(),
|
||||
|
||||
Reference in New Issue
Block a user