Worked on music selection, added info pane skin.

This commit is contained in:
Harrison Deng 2017-04-19 12:03:47 -05:00
parent 5a472b21e6
commit 5d4e637738
3 changed files with 9 additions and 3 deletions

View File

@ -19,10 +19,12 @@ import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle;
import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;
import com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle;
import com.badlogic.gdx.scenes.scene2d.ui.SelectBox.SelectBoxStyle;
import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Slider.SliderStyle;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;
@ -184,6 +186,11 @@ public class Polyjet extends Game {
SliderStyle defaultSlider = new SliderStyle(defaultSkin.getDrawable("default-slider"), defaultSkin.getDrawable("default-slider-knob"));
defaultSkin.add("default-horizontal", defaultSlider);
ImageButtonStyle infoButton = new ImageButtonStyle();
infoButton.up = defaultSkin.getDrawable("holo-pane");
infoButton.down = defaultSkin.getDrawable("holo-pane-down");
defaultSkin.add("info-pane", infoButton);
LabelStyle defaultLabel = new LabelStyle();
defaultLabel.font = defaultSkin.getFont("default-font");
defaultLabel.fontColor = defaultSkin.getColor("default");

View File

@ -11,8 +11,6 @@ import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.files.FileHandle;
import javazoom.jl.decoder.Obuffer;
public class Mp3AudioData implements AudioData {
private int readWindowSize = 1024;

View File

@ -3,6 +3,7 @@ package zero1hd.polyjet.ui.builders;
import java.io.IOException;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
@ -24,7 +25,7 @@ public class MusicSelectable extends WidgetGroup {
WavInfo wavinfo;
public MusicSelectable(FileHandle musicFile) {
public MusicSelectable(FileHandle musicFile, Preferences musicData) {
this.musicFile = musicFile;
if (musicFile.extension().toLowerCase().equals("mp3")) {