cleaned up folder organization, music selection ui cleaned up for lower resolutions

This commit is contained in:
Harrison Deng 2017-05-09 09:58:02 -05:00
parent 58e41189eb
commit cbd51bca5b
8 changed files with 10 additions and 9 deletions

View File

@ -31,6 +31,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle;
import com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle; import com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle;
import zero1hd.polyjet.screens.MainMenu; import zero1hd.polyjet.screens.MainMenu;
import zero1hd.polyjet.util.RoundingResolutionHandler;
import zero1hd.polyjet.screens.LoadingScreen; import zero1hd.polyjet.screens.LoadingScreen;
public class Polyjet extends Game { public class Polyjet extends Game {

View File

@ -13,7 +13,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.utils.viewport.ScreenViewport; import com.badlogic.gdx.utils.viewport.ScreenViewport;
import zero1hd.polyjet.Polyjet; import zero1hd.polyjet.Polyjet;
import zero1hd.polyjet.TransitionAdapter; import zero1hd.polyjet.util.TransitionAdapter;
public class LoadingScreen extends ScreenAdapter { public class LoadingScreen extends ScreenAdapter {
private Stage stage; private Stage stage;

View File

@ -12,11 +12,11 @@ import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
import com.badlogic.gdx.utils.viewport.ScreenViewport; import com.badlogic.gdx.utils.viewport.ScreenViewport;
import zero1hd.polyjet.Polyjet; import zero1hd.polyjet.Polyjet;
import zero1hd.polyjet.TransitionAdapter;
import zero1hd.polyjet.ui.pages.CreditsPage; import zero1hd.polyjet.ui.pages.CreditsPage;
import zero1hd.polyjet.ui.pages.MainPage; import zero1hd.polyjet.ui.pages.MainPage;
import zero1hd.polyjet.ui.pages.MoreOptionsPage; import zero1hd.polyjet.ui.pages.MoreOptionsPage;
import zero1hd.polyjet.ui.pages.OptionsPage; import zero1hd.polyjet.ui.pages.OptionsPage;
import zero1hd.polyjet.util.TransitionAdapter;

View File

@ -11,11 +11,11 @@ import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Label;
import zero1hd.polyjet.Polyjet; import zero1hd.polyjet.Polyjet;
import zero1hd.polyjet.TransitionAdapter;
import zero1hd.polyjet.audio.AudioAnalyzer; import zero1hd.polyjet.audio.AudioAnalyzer;
import zero1hd.polyjet.audio.WavAudioData; import zero1hd.polyjet.audio.WavAudioData;
import zero1hd.polyjet.maps.RhythmMap; import zero1hd.polyjet.maps.RhythmMap;
import zero1hd.polyjet.ui.pages.MusicSelectionPage; import zero1hd.polyjet.ui.pages.MusicSelectionPage;
import zero1hd.polyjet.util.TransitionAdapter;
public class PreGameScreen extends ScreenAdapter implements TransitionAdapter { public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {

View File

@ -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); displayName = new ScrollText(songName, skin, true, scroller);
defaults().align(Align.top); defaults().align(Align.top);
@ -155,7 +155,7 @@ public class MusicSelectable extends Button implements Disposable {
if (invalidMusic) { if (invalidMusic) {
imageIcon.setColor(Color.RED); imageIcon.setColor(Color.RED);
} }
add(imageIcon).expandY().center().pad(15f).size(256f); add(imageIcon).expandY().center().pad(15f).size(coverSize);
} }
public int getPreviousTop() { public int getPreviousTop() {

View File

@ -90,8 +90,8 @@ public class MusicSelectionPage extends Page {
@Override @Override
public void run() { public void run() {
Gdx.app.debug("Music Search Thread", "Finished loading: " + selectable.getName()); Gdx.app.debug("Music Search Thread", "Finished loading: " + selectable.getName());
musicChoices.add(selectable).prefSize(400f, 0.8f*getHeight()); musicChoices.add(selectable).prefSize(0.3f*getWidth(), 0.8f*getHeight());
selectable.addInfoToPanel(musicChoiceScroller); selectable.addInfoToPanel(musicChoiceScroller, 0.28f*getWidth());
} }
}); });
System.out.println(music); System.out.println(music);

View File

@ -1,4 +1,4 @@
package zero1hd.polyjet; package zero1hd.polyjet.util;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.loaders.FileHandleResolver; import com.badlogic.gdx.assets.loaders.FileHandleResolver;

View File

@ -1,4 +1,4 @@
package zero1hd.polyjet; package zero1hd.polyjet.util;
public interface TransitionAdapter { public interface TransitionAdapter {
public void postTransition(); public void postTransition();