changed default album cover texture, minor clean up
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 5.6 KiB |
BIN
android/assets/defaultCover.png
Executable file
After Width: | Height: | Size: 33 KiB |
@ -134,7 +134,7 @@ public class Polyjet extends Game {
|
|||||||
|
|
||||||
defaultSkin.add("sub-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() {
|
defaultSkin.add("sub-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() {
|
||||||
{
|
{
|
||||||
size = fontScale(0.05f);
|
size = fontScale(0.047f);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -238,4 +238,9 @@ public class Polyjet extends Game {
|
|||||||
Gdx.app.debug("Font pixel size", MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight())) + "px");
|
Gdx.app.debug("Font pixel size", MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight())) + "px");
|
||||||
return MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight()));
|
return MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int fontSizeWDensity(float fontSize) {
|
||||||
|
return MathUtils.round(Gdx.graphics.getDensity()*(fontSize));
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,6 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public void postTransition() {
|
public void postTransition() {
|
||||||
stage.clear();
|
stage.clear();
|
||||||
//draw music selector
|
|
||||||
MusicSelectionPage musicSelection = new MusicSelectionPage(core, mainMenu);
|
|
||||||
stage.addActor(musicSelection);
|
|
||||||
musicSelection.beginMusicSearch();
|
|
||||||
|
|
||||||
statusText = new Label(null, core.defaultSkin);
|
statusText = new Label(null, core.defaultSkin);
|
||||||
statusText.setPosition(1.6f*Gdx.graphics.getWidth(), (Gdx.graphics.getHeight()-statusText.getHeight())/2);
|
statusText.setPosition(1.6f*Gdx.graphics.getWidth(), (Gdx.graphics.getHeight()-statusText.getHeight())/2);
|
||||||
@ -63,6 +59,11 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
cyberCircle1.setPosition(Gdx.graphics.getWidth()-cyberCircle1.getWidth()/2-10, -cyberCircle1.getHeight()*2/4f);
|
cyberCircle1.setPosition(Gdx.graphics.getWidth()-cyberCircle1.getWidth()/2-10, -cyberCircle1.getHeight()*2/4f);
|
||||||
stage.addActor(cyberCircle1);
|
stage.addActor(cyberCircle1);
|
||||||
|
|
||||||
|
//draw music selector
|
||||||
|
MusicSelectionPage musicSelection = new MusicSelectionPage(core, mainMenu);
|
||||||
|
stage.addActor(musicSelection);
|
||||||
|
musicSelection.beginMusicSearch();
|
||||||
|
|
||||||
Image cyberCircle2 = new Image(core.assetManager.get("cybercircle1.png", Texture.class));
|
Image cyberCircle2 = new Image(core.assetManager.get("cybercircle1.png", Texture.class));
|
||||||
cyberCircle2.setPosition(1.5f*Gdx.graphics.getWidth()-cyberCircle2.getWidth()/2+20, (Gdx.graphics.getHeight()-cyberCircle2.getHeight())/2);
|
cyberCircle2.setPosition(1.5f*Gdx.graphics.getWidth()-cyberCircle2.getWidth()/2+20, (Gdx.graphics.getHeight()-cyberCircle2.getHeight())/2);
|
||||||
cyberCircle2.setColor(0.8f,0.8f,0.8f,0.7f);
|
cyberCircle2.setColor(0.8f,0.8f,0.8f,0.7f);
|
||||||
|
@ -100,6 +100,8 @@ public class MusicSelectable extends Button implements Disposable {
|
|||||||
if (author == null || author.isEmpty()) {
|
if (author == null || author.isEmpty()) {
|
||||||
author = "N/A";
|
author = "N/A";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defaults().pad(10f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -108,7 +110,7 @@ public class MusicSelectable extends Button implements Disposable {
|
|||||||
|
|
||||||
defaults().align(Align.top);
|
defaults().align(Align.top);
|
||||||
|
|
||||||
add(displayName).expandX().fillX().padTop(10f).top().padBottom(10f);
|
add(displayName).expandX().pad(0).fillX().padTop(10f).top().padBottom(10f);
|
||||||
row();
|
row();
|
||||||
|
|
||||||
String formattedTime = "Run time: "+ String.valueOf(durationInSeconds/60) + ":";
|
String formattedTime = "Run time: "+ String.valueOf(durationInSeconds/60) + ":";
|
||||||
@ -120,19 +122,19 @@ public class MusicSelectable extends Button implements Disposable {
|
|||||||
|
|
||||||
formattedTime = formattedTime.concat(String.valueOf(durationInSeconds - (durationInSeconds/60)*60));
|
formattedTime = formattedTime.concat(String.valueOf(durationInSeconds - (durationInSeconds/60)*60));
|
||||||
runTime = new Label(formattedTime, skin, "sub-font", skin.getColor("default"));
|
runTime = new Label(formattedTime, skin, "sub-font", skin.getColor("default"));
|
||||||
songInfoTable.add(runTime).center();
|
songInfoTable.add(runTime).expandX().left();
|
||||||
songInfoTable.row();
|
songInfoTable.row();
|
||||||
|
|
||||||
authorLabel = new Label("Author: " + author, skin, "sub-font", skin.getColor("default"));
|
authorLabel = new Label("Author: " + author, skin, "sub-font", skin.getColor("default"));
|
||||||
songInfoTable.add(authorLabel).expandY();
|
songInfoTable.add(authorLabel).left();
|
||||||
songInfoTable.row();
|
songInfoTable.row();
|
||||||
|
|
||||||
previousTopLabel = new Label("High Score: " + (previousTop != -1 ? previousTop : "N/A"), skin, "sub-font", skin.getColor("default"));
|
previousTopLabel = new Label("High Score: " + (previousTop != -1 ? previousTop : "N/A"), skin, "sub-font", skin.getColor("default"));
|
||||||
songInfoTable.add(previousTopLabel).center();
|
songInfoTable.add(previousTopLabel).left();
|
||||||
songInfoTable.row();
|
songInfoTable.row();
|
||||||
|
|
||||||
ratedDifficultyLabel = new Label("Difficulty: " + (ratedDifficulty != -1 ? ratedDifficulty : "N/A"), skin, "sub-font", skin.getColor("default"));
|
ratedDifficultyLabel = new Label("Difficulty: " + (ratedDifficulty != -1 ? ratedDifficulty : "N/A"), skin, "sub-font", skin.getColor("default"));
|
||||||
songInfoTable.add(ratedDifficultyLabel).expandY();
|
songInfoTable.add(ratedDifficultyLabel).left();
|
||||||
songInfoTable.row();
|
songInfoTable.row();
|
||||||
|
|
||||||
row();
|
row();
|
||||||
@ -147,12 +149,13 @@ public class MusicSelectable extends Button implements Disposable {
|
|||||||
albumArt.dispose();
|
albumArt.dispose();
|
||||||
} else {
|
} else {
|
||||||
imageIcon = new Image(albumCover);
|
imageIcon = new Image(albumCover);
|
||||||
|
Gdx.app.debug("UI", "album cover invalid or null for image: " + songName);
|
||||||
|
}
|
||||||
|
|
||||||
if (invalidMusic) {
|
if (invalidMusic) {
|
||||||
imageIcon.setColor(Color.RED);
|
imageIcon.setColor(Color.RED);
|
||||||
}
|
}
|
||||||
Gdx.app.debug("UI", "album cover invalid or null for image: " + songName);
|
add(imageIcon).expandY().center().pad(15f).size(256f);
|
||||||
}
|
|
||||||
add(imageIcon).prefSize(256f).expandY().center();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getPreviousTop() {
|
public int getPreviousTop() {
|
||||||
|
@ -61,6 +61,8 @@ public class MusicSelectionPage extends Page {
|
|||||||
musicChoiceScroller = new ScrollPane(musicChoices);
|
musicChoiceScroller = new ScrollPane(musicChoices);
|
||||||
musicChoiceScroller.setScrollingDisabled(false, true);
|
musicChoiceScroller.setScrollingDisabled(false, true);
|
||||||
musicChoiceScroller.setSize(getWidth(), getHeight()*0.85f);
|
musicChoiceScroller.setSize(getWidth(), getHeight()*0.85f);
|
||||||
|
|
||||||
|
musicChoiceScroller.debug();
|
||||||
addActor(musicChoiceScroller);
|
addActor(musicChoiceScroller);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +94,7 @@ 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(256, 0.8f*getHeight());
|
musicChoices.add(selectable).prefSize(400f, 0.8f*getHeight());
|
||||||
selectable.addInfoToPanel(musicChoiceScroller);
|
selectable.addInfoToPanel(musicChoiceScroller);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|