prep for next panel of analysis page
This commit is contained in:
parent
1f84a68ae5
commit
1573884e99
@ -1,6 +1,5 @@
|
||||
package zero1hd.polyjet.ui.builders;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
||||
@ -139,7 +138,6 @@ public class ScrollText extends Widget {
|
||||
|
||||
coords.x = getX();
|
||||
coords.y = getY();
|
||||
// localToStageCoordinates(coords);
|
||||
|
||||
clipBounds.setX(coords.x);
|
||||
clipBounds.setY(coords.y - 0.5f*getHeight());
|
||||
|
@ -26,21 +26,30 @@ public class AnalyzePage extends Page implements MiniListener {
|
||||
AudioAnalyzer audioAnalyzer;
|
||||
AudioData music;
|
||||
|
||||
Table songInfo;
|
||||
Slider difficultyModifier;
|
||||
Label difficultyModifierPercentage;
|
||||
Table difficultyTable;
|
||||
private Label diffTitle;
|
||||
private Slider sensitivityRating;
|
||||
private Label sensitivityRatingTitle;
|
||||
private Slider speedModifier;
|
||||
private Label speedModifierTitle;
|
||||
private Slider healthModifier;
|
||||
private Label healthModifierTitle;
|
||||
private Skin skin;
|
||||
|
||||
private TextButton back;
|
||||
private Image loadingCircle;
|
||||
private long startTime, endTime;
|
||||
private ScrollText songName;
|
||||
|
||||
Table songInfo;
|
||||
private Label[] info;
|
||||
|
||||
public AnalyzePage(Skin skin, AssetManager assets) {
|
||||
super("Results", skin);
|
||||
this.skin = skin;
|
||||
difficultyTable = new Table(skin);
|
||||
//TODO work on sliders and stuff
|
||||
|
||||
songInfo = new Table(skin);
|
||||
songInfo.setSize(getWidth()/2f, getHeightBelowTitle()/2f);
|
||||
songInfo.setBackground(skin.getDrawable("large-pane"));
|
||||
|
||||
loadingCircle = new Image(assets.get("cybercircle1.png", Texture.class));
|
||||
@ -71,16 +80,16 @@ public class AnalyzePage extends Page implements MiniListener {
|
||||
|
||||
public void setSong(AudioData music, AudioInfo audioInfo, MiniListener listener) {
|
||||
songInfo.clear();
|
||||
songInfo.align(Align.top);
|
||||
songInfo.pad(15f);
|
||||
songInfo.defaults().align(Align.left);
|
||||
songInfo.defaults().align(Align.left | Align.top);
|
||||
audioAnalyzer = new AudioAnalyzer();
|
||||
audioAnalyzer.sender.addListener(this);
|
||||
|
||||
this.music = music;
|
||||
|
||||
songName = new ScrollText(audioInfo.getSongName(), skin, true);
|
||||
audioAnalyzer.startAnalyticalThread(music);
|
||||
songInfo.add(songName).expandX().fillX();
|
||||
songInfo.add(new ScrollText(audioInfo.getSongName(), skin, true)).expandX().fillX().spaceBottom(20f);
|
||||
|
||||
for (int i = 0; i < info.length; i++) {
|
||||
info[i].setColor(1f, 1f, 1f, 0f);
|
||||
@ -89,8 +98,11 @@ public class AnalyzePage extends Page implements MiniListener {
|
||||
songInfo.add(info[i]);
|
||||
}
|
||||
|
||||
startTime = System.currentTimeMillis();
|
||||
songInfo.pack();
|
||||
songInfo.setWidth(getWidth()/2f);
|
||||
songInfo.setPosition((getWidth()-songInfo.getWidth())/2f, (getHeightBelowTitle()-songInfo.getHeight())/2f);
|
||||
|
||||
startTime = System.currentTimeMillis();
|
||||
info[0].addAction(Actions.color(Color.BLACK, 2.5f));
|
||||
System.out.println(songInfo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user