Created
June 8, 2012 17:17
-
-
Save Jimshii/2896954 to your computer and use it in GitHub Desktop.
main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JMenuItem Load = new JMenuItem("Load Game"); | |
Load.setToolTipText("Load a previously saved game"); | |
Load.addActionListener(new ActionListener() { | |
public void actionPerformed(ActionEvent event) { | |
load.loadGame(); | |
if (Character.secondBar == null) { | |
statusbar.setText("No game found"); | |
} | |
else { | |
statusbar.setText("Loading game..."); | |
} | |
} | |
}); | |
JMenuItem Save = new JMenuItem("Save Game"); | |
Save.setToolTipText("Save your game from your current position"); | |
Save.addActionListener(new ActionListener() { | |
public void actionPerformed(ActionEvent event) { | |
if (save.savedQ == 1) { | |
load.savedA = 1; | |
save.gameSave(); | |
statusbar.setText("Game saved"); | |
} | |
else { | |
statusbar.setText("There is no game to save!"); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment