From cbd51bca5b1b12945ba495ee93580cf367c5a7e6 Mon Sep 17 00:00:00 2001 From: Recrown Date: Tue, 9 May 2017 09:58:02 -0500 Subject: [PATCH] cleaned up folder organization, music selection ui cleaned up for lower resolutions --- core/src/zero1hd/polyjet/Polyjet.java | 1 + core/src/zero1hd/polyjet/screens/LoadingScreen.java | 2 +- core/src/zero1hd/polyjet/screens/MainMenu.java | 2 +- core/src/zero1hd/polyjet/screens/PreGameScreen.java | 2 +- core/src/zero1hd/polyjet/ui/builders/MusicSelectable.java | 4 ++-- core/src/zero1hd/polyjet/ui/pages/MusicSelectionPage.java | 4 ++-- .../zero1hd/polyjet/{ => util}/RoundingResolutionHandler.java | 2 +- core/src/zero1hd/polyjet/{ => util}/TransitionAdapter.java | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) rename core/src/zero1hd/polyjet/{ => util}/RoundingResolutionHandler.java (95%) rename core/src/zero1hd/polyjet/{ => util}/TransitionAdapter.java (66%) diff --git a/core/src/zero1hd/polyjet/Polyjet.java b/core/src/zero1hd/polyjet/Polyjet.java index de8d9fb..5efba3e 100755 --- a/core/src/zero1hd/polyjet/Polyjet.java +++ b/core/src/zero1hd/polyjet/Polyjet.java @@ -31,6 +31,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle; import com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle; import zero1hd.polyjet.screens.MainMenu; +import zero1hd.polyjet.util.RoundingResolutionHandler; import zero1hd.polyjet.screens.LoadingScreen; public class Polyjet extends Game { diff --git a/core/src/zero1hd/polyjet/screens/LoadingScreen.java b/core/src/zero1hd/polyjet/screens/LoadingScreen.java index 78b9808..ce03f42 100755 --- a/core/src/zero1hd/polyjet/screens/LoadingScreen.java +++ b/core/src/zero1hd/polyjet/screens/LoadingScreen.java @@ -13,7 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.utils.viewport.ScreenViewport; import zero1hd.polyjet.Polyjet; -import zero1hd.polyjet.TransitionAdapter; +import zero1hd.polyjet.util.TransitionAdapter; public class LoadingScreen extends ScreenAdapter { private Stage stage; diff --git a/core/src/zero1hd/polyjet/screens/MainMenu.java b/core/src/zero1hd/polyjet/screens/MainMenu.java index d005690..9efd705 100755 --- a/core/src/zero1hd/polyjet/screens/MainMenu.java +++ b/core/src/zero1hd/polyjet/screens/MainMenu.java @@ -12,11 +12,11 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.viewport.ScreenViewport; import zero1hd.polyjet.Polyjet; -import zero1hd.polyjet.TransitionAdapter; import zero1hd.polyjet.ui.pages.CreditsPage; import zero1hd.polyjet.ui.pages.MainPage; import zero1hd.polyjet.ui.pages.MoreOptionsPage; import zero1hd.polyjet.ui.pages.OptionsPage; +import zero1hd.polyjet.util.TransitionAdapter; diff --git a/core/src/zero1hd/polyjet/screens/PreGameScreen.java b/core/src/zero1hd/polyjet/screens/PreGameScreen.java index 32a030e..663828f 100755 --- a/core/src/zero1hd/polyjet/screens/PreGameScreen.java +++ b/core/src/zero1hd/polyjet/screens/PreGameScreen.java @@ -11,11 +11,11 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Label; import zero1hd.polyjet.Polyjet; -import zero1hd.polyjet.TransitionAdapter; import zero1hd.polyjet.audio.AudioAnalyzer; import zero1hd.polyjet.audio.WavAudioData; import zero1hd.polyjet.maps.RhythmMap; import zero1hd.polyjet.ui.pages.MusicSelectionPage; +import zero1hd.polyjet.util.TransitionAdapter; public class PreGameScreen extends ScreenAdapter implements TransitionAdapter { diff --git a/core/src/zero1hd/polyjet/ui/builders/MusicSelectable.java b/core/src/zero1hd/polyjet/ui/builders/MusicSelectable.java index 9ce9588..87d37fa 100755 --- a/core/src/zero1hd/polyjet/ui/builders/MusicSelectable.java +++ b/core/src/zero1hd/polyjet/ui/builders/MusicSelectable.java @@ -105,7 +105,7 @@ public class MusicSelectable extends Button implements Disposable { } - public void addInfoToPanel(ScrollPane scroller) { + public void addInfoToPanel(ScrollPane scroller, float coverSize) { displayName = new ScrollText(songName, skin, true, scroller); defaults().align(Align.top); @@ -155,7 +155,7 @@ public class MusicSelectable extends Button implements Disposable { if (invalidMusic) { imageIcon.setColor(Color.RED); } - add(imageIcon).expandY().center().pad(15f).size(256f); + add(imageIcon).expandY().center().pad(15f).size(coverSize); } public int getPreviousTop() { diff --git a/core/src/zero1hd/polyjet/ui/pages/MusicSelectionPage.java b/core/src/zero1hd/polyjet/ui/pages/MusicSelectionPage.java index 9812b37..46cd6bd 100755 --- a/core/src/zero1hd/polyjet/ui/pages/MusicSelectionPage.java +++ b/core/src/zero1hd/polyjet/ui/pages/MusicSelectionPage.java @@ -90,8 +90,8 @@ public class MusicSelectionPage extends Page { @Override public void run() { Gdx.app.debug("Music Search Thread", "Finished loading: " + selectable.getName()); - musicChoices.add(selectable).prefSize(400f, 0.8f*getHeight()); - selectable.addInfoToPanel(musicChoiceScroller); + musicChoices.add(selectable).prefSize(0.3f*getWidth(), 0.8f*getHeight()); + selectable.addInfoToPanel(musicChoiceScroller, 0.28f*getWidth()); } }); System.out.println(music); diff --git a/core/src/zero1hd/polyjet/RoundingResolutionHandler.java b/core/src/zero1hd/polyjet/util/RoundingResolutionHandler.java similarity index 95% rename from core/src/zero1hd/polyjet/RoundingResolutionHandler.java rename to core/src/zero1hd/polyjet/util/RoundingResolutionHandler.java index 82097ac..05872b2 100755 --- a/core/src/zero1hd/polyjet/RoundingResolutionHandler.java +++ b/core/src/zero1hd/polyjet/util/RoundingResolutionHandler.java @@ -1,4 +1,4 @@ -package zero1hd.polyjet; +package zero1hd.polyjet.util; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.assets.loaders.FileHandleResolver; diff --git a/core/src/zero1hd/polyjet/TransitionAdapter.java b/core/src/zero1hd/polyjet/util/TransitionAdapter.java similarity index 66% rename from core/src/zero1hd/polyjet/TransitionAdapter.java rename to core/src/zero1hd/polyjet/util/TransitionAdapter.java index d7633ce..425e0c3 100755 --- a/core/src/zero1hd/polyjet/TransitionAdapter.java +++ b/core/src/zero1hd/polyjet/util/TransitionAdapter.java @@ -1,4 +1,4 @@ -package zero1hd.polyjet; +package zero1hd.polyjet.util; public interface TransitionAdapter { public void postTransition();