aesthetic changes

This commit is contained in:
Harrison Deng 2017-11-24 13:44:00 -06:00
parent 83ca297920
commit 27606f3c8f
5 changed files with 9 additions and 33 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -212,7 +212,7 @@ public class RhythmBullet extends Game {
})); }));
getDefaultSkin().add("sub-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() { getDefaultSkin().add("sub-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() {
{ {
size = fontScale(0.04f, height); size = fontScale(0.05f, height);
} }
})); }));
getDefaultSkin().add("default-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() { getDefaultSkin().add("default-font", default_fontGenerator.generateFont(new FreeTypeFontParameter() {

View File

@ -38,7 +38,7 @@ public class BasicVisualizer extends VisualizerCore {
pixmap = new Pixmap(2, 2, Format.RGBA8888); pixmap = new Pixmap(2, 2, Format.RGBA8888);
pixmap.setColor(Color.WHITE); pixmap.setColor(Color.WHITE);
pixmap.fill(); pixmap.fill();
barCount = 50; barCount = 75;
smoothRange = 2; smoothRange = 2;
angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation)); angleRot = new Vector2(MathUtils.cosDeg(rotation), MathUtils.sinDeg(rotation));
textures = new Texture[barCount]; textures = new Texture[barCount];

View File

@ -36,13 +36,14 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
private VerticalGroup vGroup; private VerticalGroup vGroup;
private MusicSelectionPage msp; private MusicSelectionPage msp;
public MusicSelectable(FileHandle musicFile, Preferences musicAnnotation, Skin skin, Texture defaultAlbumC, MusicSelectionPage msp) { public MusicSelectable(FileHandle musicFile, Preferences musicAnnotation, Skin skin, Texture defaultAlbumC, MusicSelectionPage msp) {
table = new Table(skin); table = new Table(skin);
table.setBackground("holo-pane"); table.setBackground("holo-pane");
vGroup = new VerticalGroup(); vGroup = new VerticalGroup();
this.msp = msp; this.msp = msp;
setName(musicFile.name()); setName(musicFile.name());
table.defaults().pad(10f); table.defaults().pad(2f);
this.albumCover = defaultAlbumC; this.albumCover = defaultAlbumC;
this.musicFile = musicFile; this.musicFile = musicFile;
@ -63,7 +64,7 @@ public class MusicSelectable extends WidgetGroup implements Disposable {
table.add(vGroup).expandX().fillX().center(); table.add(vGroup).expandX().fillX().center();
addActor(table); addActor(table);
table.pack();
addListener(new ClickListener() { addListener(new ClickListener() {
@Override @Override
public void clicked(InputEvent event, float x, float y) { public void clicked(InputEvent event, float x, float y) {

View File

@ -10,8 +10,6 @@ import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.math.Vector3;
@ -57,19 +55,14 @@ public class MusicSelectionPage extends Page implements Observer {
private Skin skin; private Skin skin;
private AssetManager assets; private AssetManager assets;
private Image vertSplitBar;
private Image horSplitBar;
private Texture white;
private boolean down, up; private boolean down, up;
private int musicSelectableIndex; private int musicSelectableIndex;
private float scrollTimer, scrollDelay = 0.2f, scrollDelMod, songSelectionTimer; private float scrollTimer, scrollDelay = 0.2f, scrollDelMod, songSelectionTimer;
public MusicSelectionPage(Skin skin, MusicListController musicList, AssetManager assetManager, Vector3 cameraTarget) { public MusicSelectionPage(Skin skin, MusicListController musicList, AssetManager assetManager, Vector3 cameraTarget) {
super("Select music", skin);
songInfoTable = new Table(); songInfoTable = new Table();
songTitle = new ScrollText("", null, skin, false, false); songTitle = new ScrollText("", null, skin, true, false);
author = new Label("", skin, "sub-font", skin.getColor("default")); author = new Label(null, skin, "sub-font", skin.getColor("default"));
songLength = 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")); previousTop = new Label(null, skin, "sub-font", skin.getColor("default"));
albumCover = new Image(assetManager.get("defaultCover.png", Texture.class)); albumCover = new Image(assetManager.get("defaultCover.png", Texture.class));
@ -80,16 +73,15 @@ public class MusicSelectionPage extends Page implements Observer {
musicFileAnnotation = Gdx.app.getPreferences("music_file_annotation"); musicFileAnnotation = Gdx.app.getPreferences("music_file_annotation");
this.assets = assetManager; this.assets = assetManager;
musicTable = new Table(); musicTable = new Table();
musicTable.defaults().spaceBottom(10f);
scrollbar = new ScrollPane(musicTable, skin); scrollbar = new ScrollPane(musicTable, skin);
scrollbar.setSize(0.45f*getWidth(), getHeightBelowTitle()); scrollbar.setSize(0.45f*getWidth(), getHeight());
scrollbar.setFadeScrollBars(false); scrollbar.setFadeScrollBars(false);
scrollbar.setOverscroll(false, false); scrollbar.setOverscroll(false, false);
addActor(scrollbar); addActor(scrollbar);
selectables = new Array<>(); selectables = new Array<>();
back = new TextButton("Back", skin); back = new TextButton("Back", skin);
back.setWidth(back.getWidth()+20f); back.setWidth(back.getWidth()+20f);
back.setPosition(getWidth()-back.getWidth()-15f, getHeightBelowTitle()); back.setPosition(getWidth()-back.getWidth()-15f, getHeight() - back.getHeight() - 15f);
back.addListener(new ChangeListener() { back.addListener(new ChangeListener() {
@Override @Override
public void changed(ChangeEvent event, Actor actor) { public void changed(ChangeEvent event, Actor actor) {
@ -101,22 +93,6 @@ public class MusicSelectionPage extends Page implements Observer {
back.toFront(); back.toFront();
refresh(); refresh();
Pixmap pixmap = new Pixmap(2, 2, Format.RGBA8888);
pixmap.setColor(skin.getColor("default"));
pixmap.fill();
white = new Texture(pixmap);
pixmap.dispose();
vertSplitBar = new Image(white);
vertSplitBar.setHeight(getHeight());
vertSplitBar.setPosition(scrollbar.getWidth() + scrollbar.getX(), 0);
addActor(vertSplitBar);
horSplitBar = new Image(white);
horSplitBar.setWidth(vertSplitBar.getX());
horSplitBar.setPosition(0, getHeightBelowTitle());
addActor(horSplitBar);
addListener(new InputListener() { addListener(new InputListener() {
@Override @Override
public boolean keyDown(InputEvent event, int keycode) { public boolean keyDown(InputEvent event, int keycode) {
@ -222,7 +198,6 @@ public class MusicSelectionPage extends Page implements Observer {
@Override @Override
public void dispose() { public void dispose() {
white.dispose();
super.dispose(); super.dispose();
} }