diff --git a/android/assets/uiskin.png b/android/assets/uiskin.png index 3c5cc19..5412ed2 100755 Binary files a/android/assets/uiskin.png and b/android/assets/uiskin.png differ 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");