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

Updated tutorial and input map bug #630

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,48 @@
import org.destinationsol.Const;
import org.destinationsol.game.Faction;
import org.destinationsol.game.SolGame;
import org.destinationsol.game.screens.MenuScreen;
import org.destinationsol.game.screens.ShipUiControl;
import org.destinationsol.game.ship.FarShip;
import org.destinationsol.game.ship.SolShip;

public class UiControlledPilot implements Pilot {

private final ShipUiControl uiControls;
private boolean hasFocus;

public UiControlledPilot(ShipUiControl controls) {
uiControls = controls;
}

@Override
public void update(SolGame game, SolShip ship, SolShip nearestEnemy) {
hasFocus = game.getSolApplication().getInputManager().getTopScreen() == game.getScreens().mainGameScreen;
}

@Override
public boolean isUp() {
return uiControls.isUp();
return uiControls.isUp() && hasFocus;
}

@Override
public boolean isLeft() {
return uiControls.isLeft();
return uiControls.isLeft() && hasFocus;
}

@Override
public boolean isRight() {
return uiControls.isRight();
return uiControls.isRight() && hasFocus;
}

@Override
public boolean isShoot() {
return uiControls.isShoot();
return uiControls.isShoot() && hasFocus;
}

@Override
public boolean isShoot2() {
return uiControls.isShoot2();
return uiControls.isShoot2() && hasFocus;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,13 @@ public void start() {

if (mouseCtrl) {
addStep("Move forward (" + gameOptions.getKeyUpMouseName() + " key).\nThere's no stop!", upCtrl);
addStep("Note that the view zooms\nout at high speeds!", upCtrl);
} else if (mobile) {
addStep("Move forward.\nThere's no stop!", nuiUpCtrl);
addStep("Note that the view zooms\nout at high speeds!", nuiUpCtrl);
} else {
addStep("Move forward (" + gameOptions.getKeyUpName() + " key).\nThere's no stop!", nuiUpCtrl);
addStep("Note that the view zooms\nout at high speeds!", nuiUpCtrl);
Comment on lines +189 to +195
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a bit confused at first about how to advance the game past this message when I tested the tutorial. How about changing the next message trigger key to shootCtrl? Also, you might want to give the player a hint about which button to press.

Later-on in the tutorial, there's a series of informative steps (hints) that work in the way I was thinking this one should. They are just created like this.

addStep("Here's a couple of hints...\n" + shootKey2, shootCtrl);

The text exceeding the bounds of its container has been an issue for a long time. We're moving over to a new UI framework (NUI) gradually, so hopefully when this screen gets updated for it then that issue will go away. Until then, you'll just have to test that the screens fit at different resolutions manually.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also not entirely sure about the wording of the hint but writing style is a very personal choice, so I won't make any firm suggestions here. Try to make it fit in with the more imperative style that the rest of the tutorial uses if you can. Maybe this is fine as-is though.

}

UIWarnButton talkButton = nuiMain.getTalkButton();
Expand Down