diff --git a/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java b/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
index d5ad028..e083962 100644
--- a/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
+++ b/app/build/generated/source/r/debug/android/support/v7/appcompat/R.java
@@ -456,7 +456,7 @@ public final class R {
public static final int abc_textfield_search_activated_mtrl_alpha = 0x7f070042;
public static final int abc_textfield_search_default_mtrl_alpha = 0x7f070043;
public static final int abc_textfield_search_material = 0x7f070044;
- public static final int notification_template_icon_bg = 0x7f070065;
+ public static final int notification_template_icon_bg = 0x7f070061;
}
public static final class id {
public static final int action0 = 0x7f080000;
@@ -496,62 +496,62 @@ public final class R {
public static final int expanded_menu = 0x7f08002f;
public static final int home = 0x7f080048;
public static final int homeAsUp = 0x7f080049;
- public static final int icon = 0x7f08004b;
- public static final int ifRoom = 0x7f08004c;
- public static final int image = 0x7f08004d;
- public static final int info = 0x7f08004f;
- public static final int line1 = 0x7f08005c;
- public static final int line3 = 0x7f08005d;
- public static final int listMode = 0x7f080060;
- public static final int list_item = 0x7f080061;
- public static final int media_actions = 0x7f080062;
- public static final int middle = 0x7f080063;
- public static final int multiply = 0x7f080064;
- public static final int never = 0x7f080065;
- public static final int none = 0x7f080066;
- public static final int normal = 0x7f080067;
- public static final int parentPanel = 0x7f080068;
- public static final int progress_circular = 0x7f08006c;
- public static final int progress_horizontal = 0x7f08006d;
- public static final int radio = 0x7f08006e;
- public static final int screen = 0x7f08006f;
- public static final int scrollIndicatorDown = 0x7f080070;
- public static final int scrollIndicatorUp = 0x7f080071;
- public static final int scrollView = 0x7f080072;
- public static final int search_badge = 0x7f080073;
- public static final int search_bar = 0x7f080074;
- public static final int search_button = 0x7f080075;
- public static final int search_close_btn = 0x7f080076;
- public static final int search_edit_frame = 0x7f080077;
- public static final int search_go_btn = 0x7f080078;
- public static final int search_mag_icon = 0x7f080079;
- public static final int search_plate = 0x7f08007a;
- public static final int search_src_text = 0x7f08007b;
- public static final int search_voice_btn = 0x7f08007c;
- public static final int select_dialog_listview = 0x7f08007d;
- public static final int shortcut = 0x7f080091;
- public static final int showCustom = 0x7f080096;
- public static final int showHome = 0x7f080097;
- public static final int showTitle = 0x7f080098;
- public static final int spacer = 0x7f080099;
- public static final int split_action_bar = 0x7f08009a;
- public static final int src_atop = 0x7f08009b;
- public static final int src_in = 0x7f08009c;
- public static final int src_over = 0x7f08009d;
- public static final int status_bar_latest_event_content = 0x7f0800a3;
- public static final int submit_area = 0x7f0800a4;
- public static final int tabMode = 0x7f0800a5;
- public static final int text = 0x7f0800a7;
- public static final int text2 = 0x7f0800a8;
- public static final int textSpacerNoButtons = 0x7f0800a9;
- public static final int time = 0x7f0800aa;
- public static final int title = 0x7f0800ab;
- public static final int title_template = 0x7f0800ac;
- public static final int topPanel = 0x7f0800c9;
- public static final int up = 0x7f0800db;
- public static final int useLogo = 0x7f0800dc;
- public static final int withText = 0x7f0800dd;
- public static final int wrap_content = 0x7f0800e6;
+ public static final int icon = 0x7f08004a;
+ public static final int ifRoom = 0x7f08004b;
+ public static final int image = 0x7f08004c;
+ public static final int info = 0x7f08004d;
+ public static final int line1 = 0x7f08005a;
+ public static final int line3 = 0x7f08005b;
+ public static final int listMode = 0x7f08005d;
+ public static final int list_item = 0x7f08005e;
+ public static final int media_actions = 0x7f08005f;
+ public static final int middle = 0x7f080060;
+ public static final int multiply = 0x7f080061;
+ public static final int never = 0x7f080062;
+ public static final int none = 0x7f080063;
+ public static final int normal = 0x7f080064;
+ public static final int parentPanel = 0x7f080065;
+ public static final int progress_circular = 0x7f080069;
+ public static final int progress_horizontal = 0x7f08006a;
+ public static final int radio = 0x7f08006b;
+ public static final int screen = 0x7f08006c;
+ public static final int scrollIndicatorDown = 0x7f08006d;
+ public static final int scrollIndicatorUp = 0x7f08006e;
+ public static final int scrollView = 0x7f08006f;
+ public static final int search_badge = 0x7f080070;
+ public static final int search_bar = 0x7f080071;
+ public static final int search_button = 0x7f080072;
+ public static final int search_close_btn = 0x7f080073;
+ public static final int search_edit_frame = 0x7f080074;
+ public static final int search_go_btn = 0x7f080075;
+ public static final int search_mag_icon = 0x7f080076;
+ public static final int search_plate = 0x7f080077;
+ public static final int search_src_text = 0x7f080078;
+ public static final int search_voice_btn = 0x7f080079;
+ public static final int select_dialog_listview = 0x7f08007a;
+ public static final int shortcut = 0x7f08008e;
+ public static final int showCustom = 0x7f080093;
+ public static final int showHome = 0x7f080094;
+ public static final int showTitle = 0x7f080095;
+ public static final int spacer = 0x7f080096;
+ public static final int split_action_bar = 0x7f080097;
+ public static final int src_atop = 0x7f080098;
+ public static final int src_in = 0x7f080099;
+ public static final int src_over = 0x7f08009a;
+ public static final int status_bar_latest_event_content = 0x7f0800a0;
+ public static final int submit_area = 0x7f0800a1;
+ public static final int tabMode = 0x7f0800a2;
+ public static final int text = 0x7f0800a4;
+ public static final int text2 = 0x7f0800a5;
+ public static final int textSpacerNoButtons = 0x7f0800a6;
+ public static final int time = 0x7f0800a7;
+ public static final int title = 0x7f0800a8;
+ public static final int title_template = 0x7f0800a9;
+ public static final int topPanel = 0x7f0800c1;
+ public static final int up = 0x7f0800d3;
+ public static final int useLogo = 0x7f0800d4;
+ public static final int withText = 0x7f0800d5;
+ public static final int wrap_content = 0x7f0800de;
}
public static final class integer {
public static final int abc_config_activityDefaultDur = 0x7f090000;
@@ -619,7 +619,7 @@ public final class R {
public static final int abc_shareactionprovider_share_with = 0x7f0d0010;
public static final int abc_shareactionprovider_share_with_application = 0x7f0d0011;
public static final int abc_toolbar_collapse_description = 0x7f0d0012;
- public static final int status_bar_notification_info_overflow = 0x7f0d005c;
+ public static final int status_bar_notification_info_overflow = 0x7f0d0058;
}
public static final class style {
public static final int AlertDialog_AppCompat = 0x7f0e0000;
diff --git a/app/build/intermediates/incremental/mergeDebugResources/merger.xml b/app/build/intermediates/incremental/mergeDebugResources/merger.xml
index 61b41cb..ffded60 100644
--- a/app/build/intermediates/incremental/mergeDebugResources/merger.xml
+++ b/app/build/intermediates/incremental/mergeDebugResources/merger.xml
@@ -1346,7 +1346,7 @@
?android:attr/actionMenuTextAppearance@drawable/abc_control_background_material
- "Điều hướng về trang chủ""%1$s, %2$s""%1$s, %2$s, %3$s""Điều hướng lên trên""Thêm tùy chọn""Xong""Xem tất cả""Chọn một ứng dụng""TẮT""BẬT""Tìm kiếm…""Xóa truy vấn""Tìm kiếm truy vấn""Tìm kiếm""Gửi truy vấn""Tìm kiếm bằng giọng nói""Chia sẻ với""Chia sẻ với %s""Thu gọn""999+"3truetrue4192dip5falsefalse60%90%50%70%45%72%192dip5256dip"转到主屏幕""%1$s:%2$s""%1$s - %2$s:%3$s""转到上一层级""更多选项""完成""查看全部""选择应用""关闭""开启""搜索…""清除查询""搜索查询""搜索""提交查询""语音搜索""分享方式""通过%s分享""收起""999+""瀏覽主頁""%1$s:%2$s""%1$s (%2$s):%3$s""向上瀏覽""更多選項""完成""顯示全部""選擇應用程式""關閉""開啟""搜尋…""清除查詢""搜尋查詢""搜尋""提交查詢""語音搜尋""分享對象""與「%s」分享""收合""999 +""瀏覽首頁""%1$s:%2$s""%1$s - %2$s:%3$s""向上瀏覽""更多選項""完成""查看全部""選擇應用程式""關閉""開啟""搜尋…""清除查詢""搜尋查詢""搜尋""提交查詢""語音搜尋""選擇分享對象""與「%s」分享""收合""999+""Zulazulela ekhaya""%1$s, %2$s""%1$s, %2$s, %3$s""Zulazulela phezulu""Izinketho eziningi""Kwenziwe""Buka konke""Khetha uhlelo lokusebenza""VALIWE""VULIWE""Iyasesha...""Sula inkinga""Umbuzo wosesho""Sesha""Hambisa umbuzo""Ukusesha ngezwi""Yabelana no-""Yabelana no-%s""Goqa""999+"#db911c0f#dbfff200#e5dc1522#db41e42b#db494b49#715f5f#60715f#db41e42b#b3d700#f41602#f47b02#f4d802#5b000000#3d000000#ffb637#17b3f5#daf10d#ff0000#000000#ffffff#9d000000#1791f5#ffeb37#ff8e37#00000000#57ffb637#e2ffb637170dp170dp70dp60dp30dpEndless RollClick me!I\'m a text!997.585.1%0.0m%.1fm0.0m/s%.1fm/sFps: 00Fps: %d3Task completedLevel UpGAME OVERLEVEL FINISHEDToolsTo menuTry againRestartNext levelRestart level %dNext level: %dGo to the next world:\n%sLOADING...ContinueRestartExitPlayUnlock all levelsGain 90 epFinish the first world!Test GL Stuff!!!Time (Lv12)Level: 24Level: %dReset progressToolshopRamp unlockedGreat world21/15%s%s unlocked!New slot unlockedNew shape unlockedLevel: %dBuyUpgradeBallClockHypnoPacmanSmileyWheelSun\?\?\?Keep calm and roll onTick tack!Hypnotizes you for more funPACMAN!Don\'t worry, roll happy!A nice car without the... carShine bright like the sunA new shape for more funEmpty taskCollect %d stars (%d/%d)Collect %d energy (%d/%d)Collect %d starsCollect %d energyFinish the %d. world%d/%dYou will unlock this mysterious tool at level %dRoll up the ramp to gain heightShoots you in the airYou are pulled towards it. Just try it out!Blow up all obstacles near the bombThis will give you super-powers for a few secondsFreezes a certain area which leads to longer in-air time\?\?\?RampSpringMagnetBombMushroomStasisLevel: %d%1$s (Lv%2$d)NoneTimeRadiusForceMax.YesNoThis is a beautiful ConfirmDialog placeholder!Do you really want to exit the game?Do you really want to reset ALL your progress?Do you really want to finish the first world?\nYour old progress will be DELETED!This is a multiline placeholder\nfor all the tutorials I made!!!\nAwesome! - Isn\'t it?Welcome to Endless Roll!\nHave fun!Click anywhere on the screen to place the rampTry to place your ramp in front of the gapGreat job!\nNow place it in front of the obstacleYou can even set a Tool in mid-air.\nTime carefully!Now try again!Congratulations! You have leveled up!\nNow go to the toolshopWell done! Now you can start the next levelFor this level you will need two tools equippedTo select a tool just click on it\"Balloon Game\", \"Bit Shift\", \"Digital Lemonade\"\nKevin MacLeod (incompetech.com)\nLicensed under Creative Commons: By Attribution 3.0\nhttp://creativecommons.org/licenses/by/3.0/Tester1\nTester2\nTester3\nTester4ENDLESS ROLLby FrajulTESTERSMUSICSOUNDSwww.noiseforfun.comSoundsCreditsMusic"Điều hướng về trang chủ""%1$s, %2$s""%1$s, %2$s, %3$s""Điều hướng lên trên""Thêm tùy chọn""Xong""Xem tất cả""Chọn một ứng dụng""TẮT""BẬT""Tìm kiếm…""Xóa truy vấn""Tìm kiếm truy vấn""Tìm kiếm""Gửi truy vấn""Tìm kiếm bằng giọng nói""Chia sẻ với""Chia sẻ với %s""Thu gọn""999+"3truetrue4192dip5falsefalse60%90%50%70%45%72%192dip5256dip"转到主屏幕""%1$s:%2$s""%1$s - %2$s:%3$s""转到上一层级""更多选项""完成""查看全部""选择应用""关闭""开启""搜索…""清除查询""搜索查询""搜索""提交查询""语音搜索""分享方式""通过%s分享""收起""999+""瀏覽主頁""%1$s:%2$s""%1$s (%2$s):%3$s""向上瀏覽""更多選項""完成""顯示全部""選擇應用程式""關閉""開啟""搜尋…""清除查詢""搜尋查詢""搜尋""提交查詢""語音搜尋""分享對象""與「%s」分享""收合""999 +""瀏覽首頁""%1$s:%2$s""%1$s - %2$s:%3$s""向上瀏覽""更多選項""完成""查看全部""選擇應用程式""關閉""開啟""搜尋…""清除查詢""搜尋查詢""搜尋""提交查詢""語音搜尋""選擇分享對象""與「%s」分享""收合""999+""Zulazulela ekhaya""%1$s, %2$s""%1$s, %2$s, %3$s""Zulazulela phezulu""Izinketho eziningi""Kwenziwe""Buka konke""Khetha uhlelo lokusebenza""VALIWE""VULIWE""Iyasesha...""Sula inkinga""Umbuzo wosesho""Sesha""Hambisa umbuzo""Ukusesha ngezwi""Yabelana no-""Yabelana no-%s""Goqa""999+"#db911c0f#dbfff200#e5dc1522#db41e42b#db494b49#715f5f#60715f#db41e42b#b3d700#f41602#f47b02#f4d802#5b000000#3d000000#ffb637#17b3f5#daf10d#ff0000#000000#9d000000#1791f5#ffeb37#ff8e37#00000000#57ffb637#e2ffb637170dp170dp70dp60dp30dpEndless RollClick me!I\'m a text!997.50.0m%.1fm0.0m/s%.1fm/sFps: 00Fps: %d3Level UpGAME OVERLEVEL FINISHEDTo menuTry againRestartRestart level %dNext level: %dGo to the next world:\n%sLOADING...ContinueExitPlayUnlock all levelsGain 90 epFinish the first world!Test GL Stuff!!!Level: 24Level: %dReset progressRamp unlockedGreat world21/15%s%s unlocked!New slot unlockedNew shape unlockedLevel: %dBuyUpgradeBallClockHypnoPacmanSmileyWheelSun\?\?\?Keep calm and roll onTick tack!Hypnotizes you for more funPACMAN!Don\'t worry, roll happy!A nice car without the... carShine bright like the sunA new shape for more funEmpty taskCollect %d stars (%d/%d)Collect %d energy (%d/%d)Collect %d starsCollect %d energyFinish the %d. world%d/%dYou will unlock this mysterious tool at level %dRoll up the ramp to gain heightShoots you in the airYou are pulled towards it. Just try it out!Blow up all obstacles near the bombThis will give you super-powers for a few secondsFreezes a certain area which leads to longer in-air time\?\?\?RampSpringMagnetBombMushroomStasisLevel: %dYesNoThis is a beautiful ConfirmDialog placeholder!Do you really want to exit the game?Do you really want to reset ALL your progress?Do you really want to finish the first world?\nYour old progress will be DELETED!This is a multiline placeholder\nfor all the tutorials I made!!!\nAwesome! - Isn\'t it?Welcome to Endless Roll!\nHave fun!Click anywhere on the screen to place the rampTry to place your ramp in front of the gapGreat job!\nNow place it in front of the obstacleYou can even set a Tool in mid-air.\nTime carefully!Now try again!Congratulations! You have leveled up!\nNow go to the toolshopWell done! Now you can start the next levelFor this level you will need two tools equippedTo select a tool just click on it\"Balloon Game\", \"Bit Shift\", \"Digital Lemonade\"\nKevin MacLeod (incompetech.com)\nLicensed under Creative Commons: By Attribution 3.0\nhttp://creativecommons.org/licenses/by/3.0/Tester1\nTester2\nTester3\nTester4ENDLESS ROLLby FrajulTESTERSMUSICSOUNDSwww.noiseforfun.comSoundsCreditsMusicDrück mich!Ich bin ein Text!ZIEL ERREICHTZum MenüErneut versuchenNeustartNächstes LevelNeustart: Level %dNächstes Level: %dGehe zur nächsten Welt:\n%sLÄDT...WeiterNeustartBeendenSpielenErste Welt abschließen!Zeit (Lv12)Fortschritt zurücksetzenRampe freigeschaltetHammer Welt!%s freigeschaltet!KaufenUpgradeBallUhrHypnosePacmanSmileyReifenSonneLevel: %dLass dich hypnotisieren!Ein krasses Auto ohne ... AutoLass dir die Sonne ins Gesicht scheinenSammle %d Sterne (%d/%d)Sammle %d Energie (%d/%d)Sammle %d SterneSammle %d EnergieBeende die %d. WeltEinfach rollen!Katapultiert dich in die LuftDu wirst von ihm angezogen. Das ist fast schon Magie!Jage Hindernisse in die LuftGibt dir für ein paar Sekunden Superkräfte!Friert die Luft ein, wodurch du länger fliegstRampeFederMagnetBombePilzStaseNichtsZeitRadiusKraftJaNeinDer allerschönste Platzhalter für einen ConfirmDialog!Willst du wirklich das Spiel beenden?Willst du wirklich deinen gesamten Fortschritt zurücksetzen?Willst du wirklich die erste Welt abschließen? Dadurch wird dein alter Fortschritt GELÖSCHT!Das ist ein Platzhalter über mehrere Zeilen - Extra für Tutorials! Das haut dich um!Willkommen bei Endless Roll! Viel Spaß!Klicke irgendwo auf den Bildschirm, um dort die Rampe zu setzenSuper! Jetzt setze sie vor das HindernisVersuch es erneut!Sehr gut! Jetzt schaffst du bestimmt das nächste LevelAufgabe abgeschlossenToolsToolshopNeuer Slot freigeschaltetNeues Aussehen freigeschaltetEin neuer Look und noch viel mehr SpaßLeere AufgabeErreiche Level %d, um dieses Tool freizuschaltenDu kannst Tools auch mitten in der Luft setzen. Achte auf das richtige Timing!Glückwunsch! Du bist ein Level aufgestiegen! Jetzt gehe in den ToolshopFür dieses Level müssen zwei Tools ausgerüstet seinUm ein Tool auszuwählen, klicke einfach daraufSetzte die Rampe vor die Lückevon FrajulMUSIKTESTERMusik
+ Drück mich!Ich bin ein Text!ZIEL ERREICHTZum MenüErneut versuchenNeustartNeustart: Level %dNächstes Level: %dGehe zur nächsten Welt:\n%sLÄDT...WeiterBeendenSpielenErste Welt abschließen!Fortschritt zurücksetzenRampe freigeschaltetHammer Welt!%s freigeschaltet!KaufenUpgradeBallUhrHypnosePacmanSmileyReifenSonneLevel: %dLass dich hypnotisieren!Ein krasses Auto ohne ... AutoLass dir die Sonne ins Gesicht scheinenSammle %d Sterne (%d/%d)Sammle %d Energie (%d/%d)Sammle %d SterneSammle %d EnergieBeende die %d. WeltEinfach rollen!Katapultiert dich in die LuftDu wirst von ihm angezogen. Das ist fast schon Magie!Jage Hindernisse in die LuftGibt dir für ein paar Sekunden Superkräfte!Friert die Luft ein, wodurch du länger fliegstRampeFederMagnetBombePilzStaseJaNeinDer allerschönste Platzhalter für einen ConfirmDialog!Willst du wirklich das Spiel beenden?Willst du wirklich deinen gesamten Fortschritt zurücksetzen?Willst du wirklich die erste Welt abschließen? Dadurch wird dein alter Fortschritt GELÖSCHT!Das ist ein Platzhalter über mehrere Zeilen - Extra für Tutorials! Das haut dich um!Willkommen bei Endless Roll! Viel Spaß!Klicke irgendwo auf den Bildschirm, um dort die Rampe zu setzenSuper! Jetzt setze sie vor das HindernisVersuch es erneut!Sehr gut! Jetzt schaffst du bestimmt das nächste LevelNeuer Slot freigeschaltetNeues Aussehen freigeschaltetEin neuer Look und noch viel mehr SpaßLeere AufgabeErreiche Level %d, um dieses Tool freizuschaltenDu kannst Tools auch mitten in der Luft setzen. Achte auf das richtige Timing!Glückwunsch! Du bist ein Level aufgestiegen! Jetzt gehe in den ToolshopFür dieses Level müssen zwei Tools ausgerüstet seinUm ein Tool auszuwählen, klicke einfach daraufSetzte die Rampe vor die Lückevon FrajulMUSIKTESTERMusikWorld zer0GrasslandsIcy Mountains
@@ -1379,4 +1379,4 @@
GrasslandsIcy MountainsTestcave
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/build/intermediates/manifests/full/debug/AndroidManifest.xml b/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
index 677ef3a..2002bcb 100644
--- a/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
+++ b/app/build/intermediates/manifests/full/debug/AndroidManifest.xml
@@ -18,6 +18,7 @@
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
+ android:testOnly="true"
android:theme="@style/AppTheme" >
{
private List collectedStars = new ArrayList<>();
private boolean energyCollected;
- public Game(GameHandler handler, GameActivity gameActivity) throws Exception {
+ public Game(GameHandler handler, GameScreen gameScreen, GameActivity gameActivity) throws Exception {
super(gameActivity);
this.handler = handler;
this.gameActivity = gameActivity;
physics = new Physics();
collisionManager = new CollisionManager(this);
particleSystem = new ParticleSystem(getContext());
- viewManager = new ViewManager(this, handler, gameActivity);
+ viewManager = new ViewManager(this, gameScreen, handler, gameActivity);
}
@Override
diff --git a/app/src/main/java/de/frajul/endlessroll/main/screens/GameScreen.java b/app/src/main/java/de/frajul/endlessroll/main/screens/GameScreen.java
index 305ecf2..56e3882 100644
--- a/app/src/main/java/de/frajul/endlessroll/main/screens/GameScreen.java
+++ b/app/src/main/java/de/frajul/endlessroll/main/screens/GameScreen.java
@@ -24,7 +24,7 @@ public class GameScreen extends GLScreen {
public GameScreen(GameActivity gameActivity, MyGlSurfaceView glSurfaceView) throws Exception {
super(ScreenType.GAME, gameActivity, R.layout.game, glSurfaceView);
- game = new Game(gameViewHandler, gameActivity);
+ game = new Game(gameViewHandler, this, gameActivity);
glView.addRendering(game);
}
diff --git a/app/src/main/java/de/frajul/endlessroll/main/screens/Screen.java b/app/src/main/java/de/frajul/endlessroll/main/screens/Screen.java
index fa8ac63..ed15762 100644
--- a/app/src/main/java/de/frajul/endlessroll/main/screens/Screen.java
+++ b/app/src/main/java/de/frajul/endlessroll/main/screens/Screen.java
@@ -54,7 +54,7 @@ public abstract class Screen {
}
protected TopBar createTopBar(@IdRes int id) {
- return new TopBar(gameActivity, type, layout.findViewById(id));
+ return new TopBar(gameActivity, this, layout.findViewById(id));
}
public void setCaller(ScreenType caller) {
diff --git a/app/src/main/java/de/frajul/endlessroll/main/tutorial/ToolShopTutorial.java b/app/src/main/java/de/frajul/endlessroll/main/tutorial/ToolShopTutorial.java
index 976b186..4b4110f 100644
--- a/app/src/main/java/de/frajul/endlessroll/main/tutorial/ToolShopTutorial.java
+++ b/app/src/main/java/de/frajul/endlessroll/main/tutorial/ToolShopTutorial.java
@@ -34,7 +34,7 @@ public class ToolShopTutorial {
public void onTopBarUpdate(TopBar topBar) {
if (!finished && isSpringUnlocked()) {
- boolean notOnToolShopScreen = topBar.getParent() != Screen.ScreenType.TOOL_SHOP;
+ boolean notOnToolShopScreen = topBar.getParentType() != Screen.ScreenType.TOOL_SHOP;
if (notOnToolShopScreen && topBar.isToolShopButtonEnabled())
topBar.startToolShopButtonPulse();
}
diff --git a/app/src/main/java/de/frajul/endlessroll/views/GameOverMessage.java b/app/src/main/java/de/frajul/endlessroll/views/GameOverMessage.java
index 08a4e0b..390a95b 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/GameOverMessage.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/GameOverMessage.java
@@ -10,6 +10,7 @@ import android.widget.TextView;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.game.Game;
+import de.frajul.endlessroll.main.screens.GameScreen;
import de.frajul.endlessroll.main.screens.Screen;
/**
@@ -26,14 +27,14 @@ public class GameOverMessage implements View.OnClickListener {
private Button tryAgain;
private Button toMenu;
- public GameOverMessage(Game game, GameActivity gameActivity, View layout) {
+ public GameOverMessage(Game game, GameScreen gameScreen, GameActivity gameActivity, View layout) {
this.game = game;
this.gameActivity = gameActivity;
this.layout = layout;
layout.setVisibility(View.GONE);
Typeface typeface = gameActivity.getTypeface();
fadeIn = AnimationUtils.loadAnimation(gameActivity, R.anim.fade_in);
- topBar = new TopBar(gameActivity, Screen.ScreenType.GAME,
+ topBar = new TopBar(gameActivity, gameScreen,
layout.findViewById(R.id.game_over_message_topbar));
topBar.setShopsEnabled(true);
TextView title = (TextView) layout.findViewById(R.id.game_over_message_title);
diff --git a/app/src/main/java/de/frajul/endlessroll/views/GoalMessage.java b/app/src/main/java/de/frajul/endlessroll/views/GoalMessage.java
index b3e1339..251cd38 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/GoalMessage.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/GoalMessage.java
@@ -12,6 +12,7 @@ import de.frajul.endlessroll.levels.Level;
import de.frajul.endlessroll.levels.LevelPack;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.game.Game;
+import de.frajul.endlessroll.main.screens.GameScreen;
import de.frajul.endlessroll.main.screens.Screen;
/**
@@ -30,7 +31,7 @@ public class GoalMessage implements GoalMessageLevelButtonOnClickListener, View.
private GoalMessageLevelButton nextLevel;
private Button toMenu;
- public GoalMessage(Game game, GameActivity gameActivity, View layout) {
+ public GoalMessage(Game game, GameScreen gameScreen, GameActivity gameActivity, View layout) {
this.game = game;
this.gameActivity = gameActivity;
this.layout = layout;
@@ -38,7 +39,7 @@ public class GoalMessage implements GoalMessageLevelButtonOnClickListener, View.
Typeface typeface = gameActivity.getTypeface();
fadeIn = AnimationUtils.loadAnimation(gameActivity, R.anim.fade_in);
- topBar = new TopBar(gameActivity, Screen.ScreenType.GAME,
+ topBar = new TopBar(gameActivity, gameScreen,
layout.findViewById(R.id.goal_message_topbar));
topBar.setShopsEnabled(true);
TextView title = (TextView) layout.findViewById(R.id.goal_message_title);
diff --git a/app/src/main/java/de/frajul/endlessroll/views/ShortMenu.java b/app/src/main/java/de/frajul/endlessroll/views/ShortMenu.java
index b00ecf5..bcf3b72 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/ShortMenu.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/ShortMenu.java
@@ -12,6 +12,7 @@ import java.util.Random;
import de.frajul.endlessroll.R;
import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.game.Game;
+import de.frajul.endlessroll.main.screens.GameScreen;
import de.frajul.endlessroll.main.screens.Screen;
/**
@@ -31,11 +32,11 @@ public class ShortMenu implements View.OnClickListener {
private TextView restartView;
private TextView exitView;
- public ShortMenu(final Game game, GameActivity gameActivity, View layout) {
+ public ShortMenu(final Game game, GameScreen gameScreen, GameActivity gameActivity, View layout) {
this.game = game;
this.layout = layout;
Typeface typeface = gameActivity.getTypeface();
- topBar = new TopBar(gameActivity, Screen.ScreenType.GAME,
+ topBar = new TopBar(gameActivity, gameScreen,
layout.findViewById(R.id.shortmenu_topbar));
continueView = (TextView) layout.findViewById(R.id.shortmenu_continue);
continueView.setTypeface(typeface);
diff --git a/app/src/main/java/de/frajul/endlessroll/views/TopBar.java b/app/src/main/java/de/frajul/endlessroll/views/TopBar.java
index 8182dce..2a9996b 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/TopBar.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/TopBar.java
@@ -20,7 +20,7 @@ public class TopBar implements View.OnClickListener {
private GameActivity gameActivity;
private View layout;
- private Screen.ScreenType parent;
+ private Screen parent;
private Screen.ScreenType customCallerForScreenSwitch = Screen.ScreenType.NONE;
private Animation starDecreaseAnimation;
@@ -31,13 +31,14 @@ public class TopBar implements View.OnClickListener {
private ProgressBar levelProgress;
private TextView starCount;
private TextView energyCount;
+ private Button backButton;
private Button settingsButton;
private Button toolshopButton;
private Button shapeshopButton;
private TextView starCountDecrease;
private TextView energyCountDecrease;
- public TopBar(GameActivity gameActivity, Screen.ScreenType parent, View layout) {
+ public TopBar(GameActivity gameActivity, Screen parent, View layout) {
this.gameActivity = gameActivity;
this.parent = parent;
this.layout = layout;
@@ -54,19 +55,22 @@ public class TopBar implements View.OnClickListener {
starCount.setTypeface(typeface);
energyCount = (TextView) layout.findViewById(R.id.topbar_energycount);
energyCount.setTypeface(typeface);
+ backButton = (Button) layout.findViewById(R.id.topbar_back_button);
+ backButton.setOnClickListener(this);
settingsButton = (Button) layout.findViewById(R.id.topbar_settings);
settingsButton.setOnClickListener(this);
toolshopButton = (Button) layout.findViewById(R.id.topbar_toolshop);
toolshopButton.setOnClickListener(this);
shapeshopButton = (Button) layout.findViewById(R.id.topbar_shapeshop);
shapeshopButton.setOnClickListener(this);
- if(parent == Screen.ScreenType.SETTINGS)
+ if (parent.getType() == Screen.ScreenType.SETTINGS)
settingsButton.setEnabled(false);
- if(parent == Screen.ScreenType.TOOL_SHOP)
+ if (parent.getType() == Screen.ScreenType.TOOL_SHOP)
toolshopButton.setEnabled(false);
- if(parent == Screen.ScreenType.SHAPE_SHOP)
+ if (parent.getType() == Screen.ScreenType.SHAPE_SHOP)
shapeshopButton.setEnabled(false);
- if (parent == Screen.ScreenType.GAME) {
+ if (parent.getType() == Screen.ScreenType.GAME) {
+ backButton.setEnabled(false);
toolshopButton.setEnabled(false);
shapeshopButton.setEnabled(false);
}
@@ -118,6 +122,9 @@ public class TopBar implements View.OnClickListener {
@Override
public void onClick(View v) {
+ if (v.equals(backButton)) {
+ parent.onBackKeyDown();
+ }
if (v.equals(toolshopButton)) {
flipToScreen(Screen.ScreenType.TOOL_SHOP);
} else if (v.equals(shapeshopButton)) {
@@ -133,8 +140,8 @@ public class TopBar implements View.OnClickListener {
gameActivity.flipToScreen(screenType);
}
- public Screen.ScreenType getParent() {
- return parent;
+ public Screen.ScreenType getParentType() {
+ return parent.getType();
}
public boolean isToolShopButtonEnabled() {
diff --git a/app/src/main/java/de/frajul/endlessroll/views/ViewManager.java b/app/src/main/java/de/frajul/endlessroll/views/ViewManager.java
index 2f23eb8..73a5a47 100644
--- a/app/src/main/java/de/frajul/endlessroll/views/ViewManager.java
+++ b/app/src/main/java/de/frajul/endlessroll/views/ViewManager.java
@@ -13,6 +13,7 @@ import de.frajul.endlessroll.main.GameActivity;
import de.frajul.endlessroll.main.GameHandler;
import de.frajul.endlessroll.main.game.Game;
import de.frajul.endlessroll.main.game.Timer;
+import de.frajul.endlessroll.main.screens.GameScreen;
import de.frajul.endlessroll.user.User;
/**
@@ -35,7 +36,7 @@ public class ViewManager implements View.OnClickListener {
private String fpsFormat, playerProgressFormat, playerSpeedFormat;
- public ViewManager(final Game game, final GameHandler gameViewHandler, final GameActivity gameActivity) {
+ public ViewManager(final Game game, final GameScreen gameScreen, final GameHandler gameViewHandler, final GameActivity gameActivity) {
this.game = game;
this.gameViewHandler = gameViewHandler;
@@ -46,12 +47,14 @@ public class ViewManager implements View.OnClickListener {
toolButtonBar = new ToolButtonBar(game,
gameActivity.getUser().getToolSlotSettings(),
(LinearLayout) layout.findViewById(R.id.game_toolbuttonbar));
- shortMenu = new ShortMenu(game, gameActivity,
+ shortMenu = new ShortMenu(game, gameScreen, gameActivity,
layout.findViewById(R.id.game_shortmenu));
- gameOverMessage = new GameOverMessage(game, gameActivity,
+ gameOverMessage = new GameOverMessage(game, gameScreen, gameActivity,
layout.findViewById(R.id.game_game_over_message));
- goalMessage = new GoalMessage(game, gameActivity, layout.findViewById(R.id.game_goal_message));
- countdown = new Countdown(game, gameActivity.getSoundManager(), gameActivity.getTypeface(),
+ goalMessage = new GoalMessage(game, gameScreen, gameActivity,
+ layout.findViewById(R.id.game_goal_message));
+ countdown = new Countdown(game, gameActivity.getSoundManager(),
+ gameActivity.getTypeface(),
(TextView) layout.findViewById(R.id.game_countdown));
}
});
@@ -66,12 +69,12 @@ public class ViewManager implements View.OnClickListener {
playerSpeedFormat = game.getContext().getString(R.string.game_playerspeed_format_f);
}
- public void prepareToBeShown(){
- if(shortMenu.isVisible())
+ public void prepareToBeShown() {
+ if (shortMenu.isVisible())
shortMenu.prepareToBeShown();
- if(gameOverMessage.isVisible())
+ if (gameOverMessage.isVisible())
gameOverMessage.prepareToBeShown();
- if(goalMessage.isVisible())
+ if (goalMessage.isVisible())
goalMessage.prepareToBeShown();
}
@@ -92,7 +95,7 @@ public class ViewManager implements View.OnClickListener {
});
}
- public void onGoalMessageKeyBack(){
+ public void onGoalMessageKeyBack() {
goalMessage.onKeyBack();
}
@@ -105,7 +108,7 @@ public class ViewManager implements View.OnClickListener {
});
}
- public void showGoalMessage(final LevelPack levelPack, final Level level){
+ public void showGoalMessage(final LevelPack levelPack, final Level level) {
gameViewHandler.startInUiThread(new Runnable() {
@Override
public void run() {
@@ -150,7 +153,7 @@ public class ViewManager implements View.OnClickListener {
return ((int) (value * 20)) / 10f;
}
- public boolean isShortMenuVisible(){
+ public boolean isShortMenuVisible() {
return shortMenu.isVisible();
}
diff --git a/app/src/main/res/drawable/guis_arrow_back_disabled.png b/app/src/main/res/drawable/guis_arrow_back_disabled.png
new file mode 100644
index 0000000..99c6a24
Binary files /dev/null and b/app/src/main/res/drawable/guis_arrow_back_disabled.png differ
diff --git a/app/src/main/res/drawable/guis_arrow_back_enabled.png b/app/src/main/res/drawable/guis_arrow_back_enabled.png
new file mode 100644
index 0000000..46291c5
Binary files /dev/null and b/app/src/main/res/drawable/guis_arrow_back_enabled.png differ
diff --git a/app/src/main/res/drawable/xml_selector_backbutton.xml b/app/src/main/res/drawable/xml_selector_backbutton.xml
new file mode 100644
index 0000000..88bedd0
--- /dev/null
+++ b/app/src/main/res/drawable/xml_selector_backbutton.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/topbar.xml b/app/src/main/res/layout/topbar.xml
index ff0adfa..bff8625 100644
--- a/app/src/main/res/layout/topbar.xml
+++ b/app/src/main/res/layout/topbar.xml
@@ -4,21 +4,33 @@
android:layout_height="wrap_content"
android:background="@drawable/xml_background_topbar">
-
+
+
@@ -28,8 +40,8 @@
android:layout_width="match_parent"
android:layout_height="6dp"
android:layout_marginBottom="5dp"
- android:progressDrawable="@drawable/xml_layers_levelprogressbar"
- android:progress="50"/>
+ android:progress="50"
+ android:progressDrawable="@drawable/xml_layers_levelprogressbar"/>
@@ -118,5 +130,4 @@
android:text="@string/placeholder_number"
android:textSize="20sp"
android:visibility="invisible"/>
-
\ No newline at end of file