• R/O
  • SSH

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisionfcb7b2f8c29e0485417ba82fd65ff55d74562658 (tree)
Zeit2022-01-07 03:21:53
Autorsebastian_bugiu
Commitersebastian_bugiu

Log Message

Added How to play menu. Updated icons based on 512x512 android icons.

Ändern Zusammenfassung

Diff

diff -r da543b6757aa -r fcb7b2f8c29e core/src/com/headwayent/spacerocket/HelpActivity.java
--- a/core/src/com/headwayent/spacerocket/HelpActivity.java Thu Jan 06 02:22:35 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/HelpActivity.java Thu Jan 06 20:21:53 2022 +0200
@@ -2,9 +2,17 @@
22
33 import com.badlogic.gdx.Gdx;
44 import com.badlogic.gdx.ScreenAdapter;
5+import com.badlogic.gdx.scenes.scene2d.Actor;
56 import com.badlogic.gdx.scenes.scene2d.Stage;
7+import com.badlogic.gdx.scenes.scene2d.ui.Label;
8+import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
9+import com.badlogic.gdx.scenes.scene2d.ui.Skin;
10+import com.badlogic.gdx.scenes.scene2d.ui.Table;
11+import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
12+import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
613 import com.badlogic.gdx.utils.ScreenUtils;
714 import com.badlogic.gdx.utils.viewport.ScreenViewport;
15+import com.headwayent.spacerocket.old.ExtendedCanvas;
816
917 public class HelpActivity extends ScreenAdapter {
1018
@@ -18,8 +26,19 @@
1826 public void show() {
1927 super.show();
2028 stage.clear();
29+ Table table = new Table();
30+// table.setFillParent(true);
31+ table.setWidth(ExtendedCanvas.getScreenWidth());
32+ table.setY(40.0f);
33+ table.setHeight(ExtendedCanvas.getScreenHeight() - 80.0f);
34+ //table.setDebug(true);
35+ stage.addActor(table);
36+
2137 Gdx.input.setInputProcessor(stage);
2238
39+ // temporary until we have asset manager in
40+ Skin skin = new Skin(Gdx.files.internal("uiskin.json"));
41+
2342 String helpString = "CONTROLS \n\n For movement use direction keys or the\n" +
2443 "arrows on the screen or the accelerometer.\n" +
2544 "Use the center button or the fire button on the screen to fire rockets.\n\n" +
@@ -72,6 +91,28 @@
7291 "it will keep firing rockets until you get back to the game screen.\n" +
7392 "3. You can check the message you have received using the Check Receive Message(Received) " +
7493 "button. Again, while reading the message your ship will be in auto-firing mode.";
94+
95+ Label title = new Label("How to play", skin);
96+ Label label = new Label(helpString, skin);
97+ label.setWrap(true);
98+
99+ ScrollPane scrollPane = new ScrollPane(label, skin);
100+ scrollPane.setScrollingDisabled(true, false);
101+
102+ final TextButton backButton = new TextButton("Back", skin); // the extra argument here "small" is used to set the button to the smaller version instead of the big default version
103+ backButton.addListener(new ChangeListener() {
104+ @Override
105+ public void changed(ChangeEvent event, Actor actor) {
106+ SpaceRocket.getGame().changeScreen(SpaceRocket.Screen.MAIN_MENU);
107+ }
108+ });
109+
110+ table.add(title).fillX();
111+ table.row().pad(10, 0, 0, 0);
112+ table.add(scrollPane).expandX().fillX();
113+ table.row().pad(10, 0, 0, 0);
114+ table.add(backButton).expandX().fillX();
115+ table.row().pad(20, 0, 0, 0);
75116 }
76117
77118 @Override
diff -r da543b6757aa -r fcb7b2f8c29e core/src/com/headwayent/spacerocket/MainMenuActivity.java
--- a/core/src/com/headwayent/spacerocket/MainMenuActivity.java Thu Jan 06 02:22:35 2022 +0200
+++ b/core/src/com/headwayent/spacerocket/MainMenuActivity.java Thu Jan 06 20:21:53 2022 +0200
@@ -39,6 +39,7 @@
3939 TextButton newGame = new TextButton("New Game", skin);
4040 TextButton preferences = new TextButton("Preferences", skin);
4141 TextButton highScore = new TextButton("High Score", skin);
42+ TextButton help = new TextButton("How to play", skin);
4243 TextButton credits = new TextButton("Credits", skin);
4344 TextButton exit = new TextButton("Exit", skin);
4445
@@ -49,6 +50,8 @@
4950 table.row().pad(10, 0, 0, 0);
5051 table.add(highScore).fillX().uniformX();
5152 table.row().pad(10, 0, 0, 0);
53+ table.add(help).fillX().uniformX();
54+ table.row().pad(10, 0, 0, 0);
5255 table.add(credits).fillX().uniformX();
5356 table.row().pad(10, 0, 0, 0);
5457 table.add(exit).fillX().uniformX();
@@ -82,6 +85,13 @@
8285 }
8386 });
8487
88+ help.addListener(new ChangeListener() {
89+ @Override
90+ public void changed(ChangeEvent event, Actor actor) {
91+ SpaceRocket.getGame().changeScreen(SpaceRocket.Screen.HELP);
92+ }
93+ });
94+
8595 credits.addListener(new ChangeListener() {
8696 @Override
8797 public void changed(ChangeEvent event, Actor actor) {
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png has changed
diff -r da543b6757aa -r fcb7b2f8c29e ios/data/Media.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
Binary file ios/data/Media.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png has changed