Quellcode durchsuchen

Remove unnecessary menu

master
Ben Kurtovic vor 12 Jahren
Ursprung
Commit
a23aee72f1
1 geänderte Dateien mit 2 neuen und 8 gelöschten Zeilen
  1. +2
    -8
      src/Render.java

+ 2
- 8
src/Render.java Datei anzeigen

@@ -17,23 +17,19 @@ public class Render extends Canvas implements Runnable, MouseListener,
public static int width;
public static int height;
public static int scale;
public int fps_now;
public int fps_now;
public boolean paused;
public String rule;
public boolean reset;
private Grid _grid;
private int[] _pixels;
private BufferedImage _image;
private long _lastTick;
private String[] _rules;
private JFrame _frame;
private JButton pauseButton;
private Random random = new Random();
public Render(int width, int height, Grid g, String[] rules) {
@@ -80,15 +76,13 @@ public class Render extends Canvas implements Runnable, MouseListener,
private void setFrame() {
JMenuBar menuBar = new JMenuBar();
JMenu menuMain = new JMenu("Menu");
JMenu menuAlgo = new JMenu("Algorithms");
for (String rule : _rules) {
JMenuItem menuAlgoItem = new JMenuItem(rule);
menuAlgo.add(menuAlgoItem);
menuAlgoItem.addActionListener(this);
}
menuMain.add(menuAlgo);
menuBar.add(menuMain);
menuBar.add(menuAlgo);
pauseButton = new JButton("Pause");
pauseButton.setActionCommand("pause");


Laden…
Abbrechen
Speichern