From 5f8b8f95fcc7800862189d1aee1978277a8a3fce Mon Sep 17 00:00:00 2001 From: Recrown Date: Tue, 8 Aug 2017 01:42:35 -0500 Subject: [PATCH] begin working on status indicator --- android/assets/uiskin.png | Bin 5555 -> 6438 bytes .../rhythmbullet/screens/PreGameScreen.java | 8 ++++++-- .../rhythmbullet/ui/pages/AnalyzePage.java | 1 - .../ui/pages/MusicSelectionPage.java | 3 +-- .../rhythmbullet/ui/stages/GameHUD.java | 15 +++++++++++++-- .../rhythmbullet/ui/stages/GamePlayArea.java | 10 ++-------- .../rhythmbullet/desktop/DesktopLauncher.java | 2 ++ 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/android/assets/uiskin.png b/android/assets/uiskin.png index 3c5cc19d35d8e8dbabc56bf8112689c147920be1..5412ed21f5752ea9cba887099cc5f453accad95d 100755 GIT binary patch literal 6438 zcmeHr^p;3(sD!yR+SU&pr2?^R9Cu?(1mKo#!|YK@c5EQ&k^=$iPoBh>8Lf zChi5cprEkS(oh8@_#EA-4*~_Xo2HQm1hKIHJIGM%siWW|r6)>TjdF&Hl37X?<92@? zg4n81sw##)W9yTy_l$=pDGB(x5mwr-(iG(MD7Qm~i-ifbf21xyO}g?#ZtN?+K~`Bw zMT?xXwLza|zue~|m9&9}gZq}6{(4tbZ}&?&h!#Z3JutYa+fggzkC17AB^8MugMzD&9-JYAPU*t#rDq>*VHktzv3_-Ogrw-ztFO7XLPG;XuwNgT><7sB@y-9zx4P<#qBJL4&5 zG=dLaA+2B$QjnA73tAKu7#$r={2k5tr2CGH%S5;)6h_be9gY9JzdqiYP_yx5xa{27 z)KCC#k8cP4{ix4fnh`Y$`EEzJ+EMFY|KZ&#sT?wyqWhC$_b`= zYwSdL#F~jObDAMd=7EySnZLyQ?V7-8_Z`B256hgELT|{(be2_>mPQ+wqB%G?&R_Y0 zDOFVsu(!WFnX0LPmXb>X)6mrZGHXQqyR22zNAHUF9L=_J%0sCa(&5teU9Us4!tK3` zuCfyS4>qC?E5Wx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*4xUb!O`qkSF9!$bW5efsXS+Cb z4zKZbX{PwNIKxgm=?o}Yg0@P#{0cB?mL%of0ktVJvk0Linn2u%L`t3?>w|9P)pxq+ zg65;|#zb`a$qxaGLe0F~DpAzhsc0+=XbhYhJOO&59+o5u6i=-QZzs#Q8Hwd`X(2ct z(q=S9ymuL5Z#2z^C4j2rTktPd>d(VYr4MT5mZveRPRJ3Uf~yD&q$(l?tCZ+-zKi}-wj`+;-@k_uq>llNnTtiDT==?qpXN>bdO1o8Pdl%o@)if^>QDwX2xOGWbmL@nrIw4@cjjJF6~B>0Wg+c)QPc$b zI>F`c9F+@U*FZZUipijPodyc2@y^j4axIoqVKamM{bp#4#nEpuz?$PctMfdh%B3}% zt_|QYK?o7lM~PkL-_$orB3FshGF7XMZdhbifuV~RQ!?VVUPqQ?kQa6}ASk555yW KS6#Y#`+oo?R;Y#m diff --git a/core/src/zero1hd/rhythmbullet/screens/PreGameScreen.java b/core/src/zero1hd/rhythmbullet/screens/PreGameScreen.java index 62cd267..eecb7f3 100755 --- a/core/src/zero1hd/rhythmbullet/screens/PreGameScreen.java +++ b/core/src/zero1hd/rhythmbullet/screens/PreGameScreen.java @@ -38,8 +38,12 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter, M Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); stage.getViewport().apply(); - stage.act(); - stage.draw(); + try { + stage.act(); + stage.draw(); + } catch (NullPointerException e) { + e.printStackTrace(); + } if (stage.getCamera().position.x != cameraPos.x) { stage.getCamera().position.lerp(cameraPos, 0.25f); diff --git a/core/src/zero1hd/rhythmbullet/ui/pages/AnalyzePage.java b/core/src/zero1hd/rhythmbullet/ui/pages/AnalyzePage.java index 57ee3ec..f8d3d8c 100755 --- a/core/src/zero1hd/rhythmbullet/ui/pages/AnalyzePage.java +++ b/core/src/zero1hd/rhythmbullet/ui/pages/AnalyzePage.java @@ -59,7 +59,6 @@ public class AnalyzePage extends Page implements MiniListener { private Thread mapGenThread; private GameScreen gameScreen; - private RhythmBullet core; public AnalyzePage(RhythmBullet core) { super("Results", core.getDefaultSkin()); diff --git a/core/src/zero1hd/rhythmbullet/ui/pages/MusicSelectionPage.java b/core/src/zero1hd/rhythmbullet/ui/pages/MusicSelectionPage.java index 1860b17..ab2a8fc 100755 --- a/core/src/zero1hd/rhythmbullet/ui/pages/MusicSelectionPage.java +++ b/core/src/zero1hd/rhythmbullet/ui/pages/MusicSelectionPage.java @@ -126,17 +126,16 @@ public class MusicSelectionPage extends Page { int prog = (int) (100f*music/(musicFiles.length-1f)); loadingWindow.setProgress(prog); } - loadingWindow.remove(); } else { NoticeWindow notice = new NoticeWindow(core.getDefaultSkin(), "default", "No song's found in:\n\"" + core.getPrefs().getString("music dir") + "\"\nTo change the search directory, go to game options.", core.getPrefs().getLong("fx vol"), core.getAssetManager()); notice.setSize(0.6f*getWidth(), 0.6f*getHeight()); notice.setPosition((getWidth()-notice.getWidth())/2f, (getHeight()-notice.getHeight())/2f); notice.setModal(true); notice.setMovable(false); - loadingWindow.remove(); addActor(notice); notice.playOpenSound(); } + loadingWindow.remove(); } }).start(); } diff --git a/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java b/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java index 9279343..8801aa8 100755 --- a/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java +++ b/core/src/zero1hd/rhythmbullet/ui/stages/GameHUD.java @@ -4,8 +4,10 @@ import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Stage; +import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.ImageButton; import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Skin; @@ -22,10 +24,11 @@ public class GameHUD extends Stage { private FPSWindow fpsWindow; private PauseMenu pauseMenu; private HealthBar healthBar; - + private Image leftStatusBar; + private Image rightStatusBar; private Music music; - public GameHUD(Skin skin, float maxHealth) { + public GameHUD(Skin skin, float maxHealth, GamePlayArea gpa) { super(); scoreLabel = new Label("Score: 0", skin, "default-font", Color.WHITE); scoreLabel.setPosition(10f, Gdx.graphics.getHeight()-scoreLabel.getHeight() - 10f); @@ -60,6 +63,14 @@ public class GameHUD extends Stage { healthBar.setHealth(maxHealth); healthBar.setPosition(Gdx.graphics.getWidth()-healthBar.getWidth() -10f, (Gdx.graphics.getHeight()-healthBar.getHeight())/2f); addActor(healthBar); + + leftStatusBar = new Image(skin.getDrawable("gradient-bar")); + leftStatusBar.setSize(20f, getHeight()); + leftStatusBar.setPosition(gpa.getViewport().getScreenX(), 0); + + rightStatusBar = new Image(skin.getDrawable("gradient-bar")); + rightStatusBar.setSize(20f, getHeight()); + rightStatusBar.setPosition(gpa.getViewport().getScreenX()+gpa.getViewport().getScreenWidth(), 0); } /** diff --git a/core/src/zero1hd/rhythmbullet/ui/stages/GamePlayArea.java b/core/src/zero1hd/rhythmbullet/ui/stages/GamePlayArea.java index b0c3994..64f7a1e 100755 --- a/core/src/zero1hd/rhythmbullet/ui/stages/GamePlayArea.java +++ b/core/src/zero1hd/rhythmbullet/ui/stages/GamePlayArea.java @@ -34,8 +34,6 @@ public class GamePlayArea extends Stage { public EntityManager em; private CollisionDetector collisionDetector; - private float yTeleport = RhythmBullet.GAME_AREA_HEIGHT/2; - private int score; private ShaderProgram glowShader; @@ -60,6 +58,7 @@ public class GamePlayArea extends Stage { public void setAudioMap(GamePlayMap audioMap) { this.audioMap = audioMap; } + /** * needs to be called right after set as screen (should be called in show method). * @param prefs @@ -88,7 +87,6 @@ public class GamePlayArea extends Stage { fboRegion = new TextureRegion(blurTarget.getColorBufferTexture()); fboRegion.flip(false, true); - } ShaderProgram.pedantic = false; @@ -109,12 +107,12 @@ public class GamePlayArea extends Stage { blurTarget.end(getViewport().getScreenX(), getViewport().getScreenY(), getViewport().getScreenWidth(), getViewport().getScreenHeight()); getBatch().setBlendFunction(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); - getBatch().setBlendFunction(GL20.GL_ONE, GL20.GL_ONE_MINUS_SRC_ALPHA); getBatch().begin(); getBatch().setShader(glowShader); getBatch().draw(fboRegion, 0f, 0f, RhythmBullet.GAME_AREA_WIDTH, RhythmBullet.GAME_AREA_HEIGHT); getBatch().setShader(null); + getBatch().end(); } else { @@ -230,10 +228,6 @@ public class GamePlayArea extends Stage { gameHUD.setScore(score); } - public float getyTeleport() { - return yTeleport; - } - @Override public void dispose() { if (glowShader != null) { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java b/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java index 7d3fef9..ddde641 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/DesktopLauncher.java @@ -11,7 +11,9 @@ public class DesktopLauncher { config.title = "Rhythm Bullet"; config.width = 800; config.height = 480; + config.resizable = false; + config.useHDPI = true; System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");