worked on analysis page
This commit is contained in:
parent
31045da431
commit
e698b9bc69
@ -59,6 +59,12 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
cyberCircle1.setPosition(Gdx.graphics.getWidth()-cyberCircle1.getWidth()/2-10, -cyberCircle1.getHeight()*2/4f);
|
cyberCircle1.setPosition(Gdx.graphics.getWidth()-cyberCircle1.getWidth()/2-10, -cyberCircle1.getHeight()*2/4f);
|
||||||
stage.addActor(cyberCircle1);
|
stage.addActor(cyberCircle1);
|
||||||
|
|
||||||
|
Image cyberCircle2 = new Image(core.assetManager.get("cybercircle1.png", Texture.class));
|
||||||
|
cyberCircle2.setPosition(1.5f*Gdx.graphics.getWidth()-cyberCircle2.getWidth()/2+20, (Gdx.graphics.getHeight()-cyberCircle2.getHeight())/2);
|
||||||
|
cyberCircle2.setColor(0.8f,0.8f,0.8f,0.7f);
|
||||||
|
cyberCircle2.addAction(Actions.alpha(0.7f));
|
||||||
|
stage.addActor(cyberCircle2);
|
||||||
|
|
||||||
analyzePage = new AnalyzePage(core.defaultSkin, cameraTarget);
|
analyzePage = new AnalyzePage(core.defaultSkin, cameraTarget);
|
||||||
analyzePage.setPosition(1f*Gdx.graphics.getWidth(), 0);
|
analyzePage.setPosition(1f*Gdx.graphics.getWidth(), 0);
|
||||||
stage.addActor(analyzePage);
|
stage.addActor(analyzePage);
|
||||||
@ -68,11 +74,6 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
stage.addActor(musicSelection);
|
stage.addActor(musicSelection);
|
||||||
musicSelection.beginMusicSearch();
|
musicSelection.beginMusicSearch();
|
||||||
|
|
||||||
Image cyberCircle2 = new Image(core.assetManager.get("cybercircle1.png", Texture.class));
|
|
||||||
cyberCircle2.setPosition(1.5f*Gdx.graphics.getWidth()-cyberCircle2.getWidth()/2+20, (Gdx.graphics.getHeight()-cyberCircle2.getHeight())/2);
|
|
||||||
cyberCircle2.setColor(0.8f,0.8f,0.8f,0.7f);
|
|
||||||
cyberCircle2.addAction(Actions.alpha(0.7f));
|
|
||||||
stage.addActor(cyberCircle2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -33,8 +33,9 @@ public class AnalyzePage extends Page {
|
|||||||
songInfo = new Table(skin);
|
songInfo = new Table(skin);
|
||||||
songInfo.debug();
|
songInfo.debug();
|
||||||
|
|
||||||
|
|
||||||
back = new TextButton("Back", skin);
|
back = new TextButton("Back", skin);
|
||||||
back.setPosition(getWidth()-back.getWidth()-15f, getHeight()-back.getHeight()-15f);
|
back.setPosition(getWidth()-back.getWidth()-15f, getHeightBelowTitle());
|
||||||
back.addListener(new ChangeListener() {
|
back.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
@ -42,14 +43,19 @@ public class AnalyzePage extends Page {
|
|||||||
cameraPos.x = 0.5f*getWidth();
|
cameraPos.x = 0.5f*getWidth();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
songInfo.setSize(getWidth(), getHeightBelowTitle());
|
||||||
|
|
||||||
|
|
||||||
addActor(back);
|
addActor(back);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSong(AudioData music, AudioInfo audioInfo) {
|
public void setSong(AudioData music, AudioInfo audioInfo) {
|
||||||
|
songInfo.clear();
|
||||||
|
|
||||||
cameraPos.x = 1.5f*getWidth();
|
cameraPos.x = 1.5f*getWidth();
|
||||||
this.music = music;
|
this.music = music;
|
||||||
audioAnalyzer.startAnalyticalThread(music);
|
audioAnalyzer.startAnalyticalThread(music);
|
||||||
songInfo.add(new Label(audioInfo.getSongName(), skin, "sub-font", skin.getColor("default")));
|
songInfo.add(new Label(audioInfo.getSongName(), skin));
|
||||||
addActor(songInfo);
|
addActor(songInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class MusicSelectionPage extends Page {
|
|||||||
this.ap = analyzePage;
|
this.ap = analyzePage;
|
||||||
|
|
||||||
back = new TextButton("Back", core.defaultSkin);
|
back = new TextButton("Back", core.defaultSkin);
|
||||||
back.setPosition(getWidth()-back.getWidth()-15f, getHeight()-back.getHeight()-15f);
|
back.setPosition(getWidth()-back.getWidth()-15f, getHeightBelowTitle());
|
||||||
back.addListener(new ChangeListener() {
|
back.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
|
@ -21,4 +21,8 @@ public class Page extends Group {
|
|||||||
pageTitle.setPosition(18f, getHeight()-pageTitle.getHeight()-15f);
|
pageTitle.setPosition(18f, getHeight()-pageTitle.getHeight()-15f);
|
||||||
addActor(pageTitle);
|
addActor(pageTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getHeightBelowTitle() {
|
||||||
|
return pageTitle.getY();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user