untangling present vs full screen

This commit is contained in:
Ben Fry
2015-06-05 22:20:58 -04:00
parent 6622e3dfa7
commit b4ac525392
5 changed files with 13 additions and 14 deletions

View File

@@ -1155,7 +1155,7 @@ public class JavaBuild {
}
while ((index = sb.indexOf("@@lsuipresentationmode@@")) != -1) {
sb.replace(index, index + "@@lsuipresentationmode@@".length(),
Preferences.getBoolean("export.application.fullscreen") ? "4" : "0");
Preferences.getBoolean("export.application.present") ? "4" : "0");
}
lines[i] = sb.toString();

View File

@@ -740,25 +740,24 @@ public class JavaEditor extends Editor {
Preferences.setBoolean("export.application.stop", showStopButton.isSelected());
}
});
showStopButton.setEnabled(Preferences.getBoolean("export.application.fullscreen"));
showStopButton.setEnabled(Preferences.getBoolean("export.application.present"));
showStopButton.setBorder(new EmptyBorder(3, 13 + indent, 6, 13));
final JCheckBox fullScreenButton = new JCheckBox(Language.text("export.options.fullscreen"));
//fullscreenButton.setMnemonic(KeyEvent.VK_F);
fullScreenButton.setSelected(Preferences.getBoolean("export.application.fullscreen"));
fullScreenButton.addItemListener(new ItemListener() {
final JCheckBox presentButton = new JCheckBox(Language.text("export.options.fullscreen"));
presentButton.setSelected(Preferences.getBoolean("export.application.present"));
presentButton.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
boolean sal = fullScreenButton.isSelected();
Preferences.setBoolean("export.application.fullscreen", sal);
boolean sal = presentButton.isSelected();
Preferences.setBoolean("export.application.present", sal);
showStopButton.setEnabled(sal);
}
});
fullScreenButton.setBorder(new EmptyBorder(3, 13, 3, 13));
presentButton.setBorder(new EmptyBorder(3, 13, 3, 13));
JPanel presentPanel = new JPanel();
presentPanel.setLayout(new BoxLayout(presentPanel, BoxLayout.Y_AXIS));
Box fullScreenBox = Box.createHorizontalBox();
fullScreenBox.add(fullScreenButton);
fullScreenBox.add(presentButton);
/*
//run.present.stop.color

View File

@@ -997,8 +997,8 @@ public class PdePreprocessor {
//out.print(indent + indent + "PApplet.main(new String[] { ");
out.print(indent + indent + "String[] appletArgs = new String[] { ");
if (Preferences.getBoolean("export.application.fullscreen")) {
out.print("\"" + PApplet.ARGS_FULL_SCREEN + "\", ");
if (Preferences.getBoolean("export.application.present")) {
out.print("\"" + PApplet.ARGS_PRESENT + "\", ");
String farbe = Preferences.get("run.present.bgcolor");
out.print("\"" + PApplet.ARGS_WINDOW_COLOR + "=" + farbe + "\", ");

View File

@@ -379,7 +379,7 @@ public class Runner implements MessageConsumer {
if (presenting) {
params.add(PApplet.ARGS_FULL_SCREEN);
params.add(PApplet.ARGS_PRESENT);
// if (Preferences.getBoolean("run.present.exclusive")) {
// params.add(PApplet.ARGS_EXCLUSIVE);
// }