aesthetic rework

This commit is contained in:
Harrison Deng 2017-11-27 18:37:10 -06:00
parent b81656d187
commit 07cc783624
4 changed files with 36 additions and 24 deletions

View File

@ -22,7 +22,7 @@ check-on
index: -1
check-disabled
rotate: false
xy: 192, 20
xy: 68, 14
size: 14, 14
split: 3, 3, 3, 3
orig: 14, 14
@ -340,26 +340,26 @@ loading
index: -1
holo-pane
rotate: false
xy: 68, 8
size: 20, 20
split: 9, 9, 9, 9
orig: 20, 20
xy: 105, 17
size: 8, 8
split: 2, 2, 2, 2
orig: 8, 8
offset: 0, 0
index: -1
holo-pane-down
rotate: false
xy: 133, 8
size: 20, 20
split: 9, 9, 9, 9
split: 4, 4, 4, 4
orig: 20, 20
offset: 0, 0
index: -1
large-pane
corner-panel
rotate: false
xy: 182, 5
size: 9, 27
split: 4, 4, 13, 13
orig: 9, 27
xy: 182, 1
size: 32, 32
split: 15, 15, 15, 15
orig: 32, 32
offset: 0, 0
index: -1
rect
@ -389,8 +389,8 @@ rect-disabled
side-bars
rotate: false
xy: 221, 35
size: 5, 14
split: 2, 2, 0, 0
size: 15, 14
split: 7, 7, 2, 2
orig: 5, 14
offset: 0, 0
index: -1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -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 {

View File

@ -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();
}