fix: shootArrowButton did not work

This commit is contained in:
Laureηt 2021-05-27 12:03:52 +02:00
parent 24e0f429c3
commit 0e63a82814

View file

@ -72,7 +72,7 @@ public class SettingsScreen extends BaseScreen {
}); });
// Control buttons // Control buttons
VisTextButton shootArrow = new VisTextButton("mouse" + SagittariusGame.shootArrowButton);; VisTextButton shootArrow = new VisTextButton(String.valueOf(SagittariusGame.shootArrowButton));;
VisTextButton moveLeft = new VisTextButton(Keys.toString(SagittariusGame.moveLeftKey)); VisTextButton moveLeft = new VisTextButton(Keys.toString(SagittariusGame.moveLeftKey));
VisTextButton moveRight = new VisTextButton(Keys.toString(SagittariusGame.moveRightKey)); VisTextButton moveRight = new VisTextButton(Keys.toString(SagittariusGame.moveRightKey));
VisTextButton zoomIn = new VisTextButton(Keys.toString(SagittariusGame.zoomInKey)); VisTextButton zoomIn = new VisTextButton(Keys.toString(SagittariusGame.zoomInKey));
@ -93,7 +93,7 @@ public class SettingsScreen extends BaseScreen {
zoomOut.setDisabled(true); zoomOut.setDisabled(true);
} else if (!shootArrow.isDisabled() && capturing) { } else if (!shootArrow.isDisabled() && capturing) {
capturing = false; capturing = false;
shootArrow.setText("mouse" + button); shootArrow.setText(String.valueOf(button));
moveLeft.setDisabled(false); moveLeft.setDisabled(false);
moveRight.setDisabled(false); moveRight.setDisabled(false);
zoomIn.setDisabled(false); zoomIn.setDisabled(false);
@ -127,9 +127,7 @@ public class SettingsScreen extends BaseScreen {
SagittariusGame.moveRightKey = Keys.valueOf(moveRight.getText().toString()); SagittariusGame.moveRightKey = Keys.valueOf(moveRight.getText().toString());
SagittariusGame.zoomInKey = Keys.valueOf(zoomIn.getText().toString()); SagittariusGame.zoomInKey = Keys.valueOf(zoomIn.getText().toString());
SagittariusGame.zoomOutKey = Keys.valueOf(zoomOut.getText().toString()); SagittariusGame.zoomOutKey = Keys.valueOf(zoomOut.getText().toString());
SagittariusGame.shootArrowButton = SagittariusGame.shootArrowButton = Integer.parseInt(shootArrow.getText().toString());
Keys.valueOf(shootArrow.getText().toString().substring(5));
// Deactivate music or not // Deactivate music or not
if (disableMusic.isChecked() && SagittariusGame.music.isPlaying()) { if (disableMusic.isChecked() && SagittariusGame.music.isPlaying()) {
SagittariusGame.music.stop(); SagittariusGame.music.stop();