Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add About entry to copy debug info #375

Merged
merged 1 commit into from
Mar 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/itdelatrisu/opsu/states/ButtonMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import itdelatrisu.opsu.Opsu;
import itdelatrisu.opsu.OpsuConstants;
import itdelatrisu.opsu.ScoreData;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.audio.MusicController;
import itdelatrisu.opsu.audio.SoundController;
import itdelatrisu.opsu.audio.SoundEffect;
Expand Down Expand Up @@ -249,7 +250,7 @@ public void click(GameContainer container, StateBasedGame game, int cx, int cy)
}
},
/** The "About" screen. */
ABOUT (new Button[] { Button.ABOUT_WEBSITE, Button.ABOUT_REPOSITORY, Button.ABOUT_REPORT, Button.ABOUT_CREDITS, Button.ABOUT_CLOSE }) {
ABOUT (new Button[] { Button.ABOUT_WEBSITE, Button.ABOUT_REPOSITORY, Button.ABOUT_REPORT, Button.ABOUT_ENV, Button.ABOUT_CREDITS, Button.ABOUT_CLOSE }) {
@Override
public String[] getTitle(GameContainer container, StateBasedGame game) {
String version = Updater.get().getCurrentVersion();
Expand Down Expand Up @@ -611,6 +612,15 @@ public void click(GameContainer container, StateBasedGame game) {
game.enterState(Opsu.STATE_MAINMENU, new EmptyTransition(), new FadeInTransition());
}
},
ABOUT_ENV ("Copy Debug Info", Color.orange) {
@Override
public void click(GameContainer container, StateBasedGame game) {
SoundController.playSound(SoundEffect.MENUHIT);
Utils.copyToClipboard(ErrorHandler.getEnvironmentInfoForIssue());
UI.getNotificationManager().sendNotification("Debug info copied to clipboard.");
game.enterState(Opsu.STATE_MAINMENU, new EmptyTransition(), new FadeInTransition());
}
},
ABOUT_CREDITS ("View Credits", Color.magenta) {
@Override
public void click(GameContainer container, StateBasedGame game) {
Expand Down