From a4f3b16240589029f3feb6a9a3c166f4671b4f30 Mon Sep 17 00:00:00 2001 From: CharSong24 Date: Fri, 9 Dec 2022 23:54:33 -0500 Subject: [PATCH] add comments (save part) --- .../edu/rpi/legup/ui/ProofEditorPanel.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java b/src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java index 4aa8d60d2..e661a4336 100644 --- a/src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java +++ b/src/main/java/edu/rpi/legup/ui/ProofEditorPanel.java @@ -118,10 +118,10 @@ public JMenuBar getMenuBar() { newPuzzle = new JMenuItem("Open"); resetPuzzle = new JMenuItem("Reset Puzzle"); // genPuzzle = new JMenuItem("Puzzle Generators"); - saveProofAs = new JMenuItem("Save Proof As"); - saveProofChange = new JMenuItem("Save Proof Change"); + saveProofAs = new JMenuItem("Save Proof As"); // create a new file to save + saveProofChange = new JMenuItem("Save Proof Change"); // save to the current file preferences = new JMenuItem("Preferences"); - helpTutorial = new JMenuItem("Help"); + helpTutorial = new JMenuItem("Help"); // jump to web page exit = new JMenuItem("Exit"); edit = new JMenu("Edit"); @@ -432,7 +432,7 @@ private void direct_save(){ } } /** - * Saves a proof + * Create a new file and save proof to it */ private void saveProofAs() { Puzzle puzzle = GameBoardFacade.getInstance().getPuzzleModule(); @@ -475,7 +475,7 @@ private void saveProofAs() { private void helpTutorial() { Runtime rt = Runtime.getRuntime(); - String url = "https://github.com/Bram-Hub/Legup/wiki/LEGUP-Tutorial"; // empty page, Oct 17th + String url = "https://github.com/Bram-Hub/Legup/wiki/LEGUP-Tutorial"; // empty page 2022 Fall semester try{ //rt.exec("rundll32 url.dll,FileProtocolHandler "+url); java.awt.Desktop.getDesktop().browse(java.net.URI.create(url)); @@ -499,11 +499,11 @@ public void actionPerformed(ActionEvent e) { panel.add(moveing_buttom); } - - - - - // Quick save, does not prompt user for name change + + + + + // Quick save proof to the current file with a pop window to show "successfully saved" private void saveProofChange(){ Puzzle puzzle = GameBoardFacade.getInstance().getPuzzleModule(); if (puzzle == null) {