aesthetic rework
This commit is contained in:
@@ -106,7 +106,7 @@ public class ScrollText extends Widget {
|
||||
clipBounds.setSize(getWidth()-2, getHeight()*1.5f);
|
||||
if (text1Width + text2Width > clipBounds.getWidth()) {
|
||||
if (scrollOnHover) {
|
||||
if (scroll || text1Offset < 0 || text1Offset > 5) {
|
||||
if (scroll || text1Offset < 0 || text1Offset > 2) {
|
||||
scroll(delta);
|
||||
}
|
||||
} else {
|
||||
|
@@ -23,6 +23,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
@@ -44,6 +45,7 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
private TextButton back;
|
||||
|
||||
private Table musicInfoTable;
|
||||
private Table musicSubInfo;
|
||||
private ScrollText songTitle;
|
||||
private Label author;
|
||||
private Label songLength;
|
||||
@@ -58,6 +60,8 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
|
||||
private boolean down, up;
|
||||
private int musicSelectableIndex;
|
||||
|
||||
private TextButton beginButton;
|
||||
private float scrollTimer, scrollDelay = 0.2f, scrollDelMod, songSelectionTimer;
|
||||
|
||||
public MusicSelectionPage(Skin skin, MusicListController musicList, AssetManager assetManager, Vector3 cameraTarget) {
|
||||
@@ -113,17 +117,19 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
});
|
||||
|
||||
musicInfoTable = new Table();
|
||||
musicInfoTable.defaults().center().space(5f);
|
||||
musicInfoTable.defaults().center();
|
||||
musicInfoTable.setPosition(musicTableScrollPane.getWidth() + musicTableScrollPane.getX(), 0);
|
||||
musicInfoTable.setSize(getWidth()-musicTableScrollPane.getWidth(), getHeight());
|
||||
addActor(musicInfoTable);
|
||||
|
||||
musicSubInfo = new Table(skin);
|
||||
musicSubInfo.setBackground("corner-panel");
|
||||
songTitle = new ScrollText("", null, skin, true, true);
|
||||
author = new Label(null, skin, "sub-font", skin.getColor("default"));
|
||||
songLength = new Label(null, skin, "sub-font", skin.getColor("default"));
|
||||
previousTop = new Label(null, skin, "sub-font", skin.getColor("default"));
|
||||
ratedDifficulty = new Label(null, skin, "sub-font", skin.getColor("default"));
|
||||
albumCover = new Image(assetManager.get("defaultCover.png", Texture.class));
|
||||
beginButton = new TextButton("Begin", skin);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -174,6 +180,7 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
musicTable.clear();
|
||||
selectables.clear();
|
||||
musicInfoTable.clear();
|
||||
musicSubInfo.clear();
|
||||
|
||||
for (int i = 0; i < selectables.size; i++) {
|
||||
selectables.get(i).dispose();
|
||||
@@ -200,17 +207,22 @@ public class MusicSelectionPage extends Page implements Observer {
|
||||
}
|
||||
extraInfoDone = true;
|
||||
|
||||
musicInfoTable.add(songTitle).width(musicInfoTable.getWidth()*0.7f).spaceBottom(10f);
|
||||
musicInfoTable.add(songTitle).width(musicInfoTable.getWidth()*0.7f).spaceBottom(30f);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(author);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(songLength);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(previousTop);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(ratedDifficulty);
|
||||
musicSubInfo.add(author);
|
||||
musicSubInfo.row();
|
||||
musicSubInfo.add(songLength);
|
||||
musicSubInfo.row();
|
||||
musicSubInfo.add(previousTop);
|
||||
musicSubInfo.row();
|
||||
musicSubInfo.add(ratedDifficulty);
|
||||
musicSubInfo.pack();
|
||||
musicInfoTable.add(musicSubInfo).spaceBottom(20f);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(albumCover).size(musicInfoTable.getWidth()/2f);
|
||||
musicInfoTable.row();
|
||||
musicInfoTable.add(beginButton).spaceTop(20f).fillX();
|
||||
|
||||
if (currentlySelected != null) {
|
||||
updateInformation();
|
||||
}
|
||||
|
Reference in New Issue
Block a user