From 1573884e99f586364d60f2f2403f40384ae4ac89 Mon Sep 17 00:00:00 2001 From: Recrown Date: Mon, 10 Jul 2017 16:35:50 -0500 Subject: [PATCH] prep for next panel of analysis page --- .../polyjet/ui/builders/ScrollText.java | 2 -- .../zero1hd/polyjet/ui/pages/AnalyzePage.java | 30 +++++++++++++------ 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/core/src/zero1hd/polyjet/ui/builders/ScrollText.java b/core/src/zero1hd/polyjet/ui/builders/ScrollText.java index 6aff47a..81353dd 100755 --- a/core/src/zero1hd/polyjet/ui/builders/ScrollText.java +++ b/core/src/zero1hd/polyjet/ui/builders/ScrollText.java @@ -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()); diff --git a/core/src/zero1hd/polyjet/ui/pages/AnalyzePage.java b/core/src/zero1hd/polyjet/ui/pages/AnalyzePage.java index 2b50809..3123787 100755 --- a/core/src/zero1hd/polyjet/ui/pages/AnalyzePage.java +++ b/core/src/zero1hd/polyjet/ui/pages/AnalyzePage.java @@ -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); }