mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
0031a
X lib/pde.properties should be read using getResource X otherwise path issues cause trouble (likely under win98) X take state information out of Header X cleanup lastFile/lastDirectory X save (just) last program run in sketch.properties X coloring of error, message, etc changed in pde.properties X finish save changes stuff 0031b X editorlistener shouldn't track menu commands as changes to file X ctrl keys bksp/del/enter/return/tab then space on up X indicator for changes? X need to implement code for whether changes have been made X check for key events in textarea or something X if key events, compare contents against the existing file X userName not getting set before sketchbook menu is built X add 'refresh list' item to the sketchbook menu 0031c X ability to set directory for compiling in kjcengine 0031d X make sure compiling into build directory X and once compiled there, read all classes for export
This commit is contained in:
@@ -7,12 +7,12 @@ import java.awt.*;
|
||||
public class PdeEditorButtons extends Panel {
|
||||
static final String EMPTY_STATUS = " ";
|
||||
|
||||
// play, stop, save, export, open
|
||||
// run, stop, save, export, open
|
||||
|
||||
static final String title[] = {
|
||||
"", "play", "stop", "save", "open", "export"
|
||||
//"", "Play", "Stop", "Save", "Open", "Export"
|
||||
//"Play", "Stop", "Close",
|
||||
"", "run", "stop", "save", "open", "export"
|
||||
//"", "Run", "Stop", "Save", "Open", "Export"
|
||||
//"Run", "Stop", "Close",
|
||||
//"Open", "Save", "Export Applet", "Print", "Beautify",
|
||||
//"Disable Full Screen", "Full Screen"
|
||||
};
|
||||
@@ -22,7 +22,7 @@ public class PdeEditorButtons extends Panel {
|
||||
static final int BUTTON_HEIGHT = PdeEditor.GRID_SIZE; //33;
|
||||
|
||||
static final int NOTHING = 0;
|
||||
static final int PLAY = 1;
|
||||
static final int RUN = 1;
|
||||
static final int STOP = 2;
|
||||
|
||||
static final int SAVE = 3;
|
||||
@@ -70,7 +70,7 @@ public class PdeEditorButtons extends Panel {
|
||||
which = new int[BUTTON_COUNT];
|
||||
|
||||
which[buttonCount++] = NOTHING;
|
||||
which[buttonCount++] = PLAY;
|
||||
which[buttonCount++] = RUN;
|
||||
which[buttonCount++] = STOP;
|
||||
which[buttonCount++] = SAVE;
|
||||
which[buttonCount++] = OPEN;
|
||||
@@ -319,8 +319,8 @@ public class PdeEditorButtons extends Panel {
|
||||
//switch (which[sel]) {
|
||||
switch (currentSelection) {
|
||||
|
||||
case PLAY: editor.doPlay(); break;
|
||||
case STOP: setState(PLAY, INACTIVE, true); editor.doStop(); break;
|
||||
case RUN: editor.doRun(); break;
|
||||
case STOP: setState(RUN, INACTIVE, true); editor.doStop(); break;
|
||||
//case CLOSE: editor.doClose(); break;
|
||||
|
||||
case OPEN: editor.doOpen(); break;
|
||||
@@ -354,7 +354,7 @@ public class PdeEditorButtons extends Panel {
|
||||
if (inactive == null) return;
|
||||
|
||||
//setState(button, INACTIVE);
|
||||
// skip the play button, do the others
|
||||
// skip the run button, do the others
|
||||
for (int i = 1; i < buttonCount; i++) {
|
||||
//state[i] = INACTIVE;
|
||||
//stateImage[i] = inactive[which[i]];
|
||||
@@ -363,13 +363,13 @@ public class PdeEditorButtons extends Panel {
|
||||
update();
|
||||
}
|
||||
|
||||
public void play() {
|
||||
public void run() {
|
||||
if (inactive == null) return;
|
||||
clear();
|
||||
setState(0, ACTIVE, true);
|
||||
}
|
||||
|
||||
public void clearPlay() {
|
||||
public void clearRun() {
|
||||
if (inactive == null) return;
|
||||
setState(0, INACTIVE, true);
|
||||
}
|
||||
@@ -377,7 +377,7 @@ public class PdeEditorButtons extends Panel {
|
||||
/*
|
||||
public boolean mouseUp(Event e, int x, int y) {
|
||||
if (wasDown == -1) return true;
|
||||
if (which[wasDown] == PLAY) return true;
|
||||
if (which[wasDown] == RUN) return true;
|
||||
|
||||
setState(wasDown, INACTIVE);
|
||||
wasDown = -1;
|
||||
|
||||
Reference in New Issue
Block a user