minor layout changes
This commit is contained in:
parent
60c1c2b2d7
commit
f591a8e60e
@ -115,7 +115,7 @@ public class MusicSelectionPage extends Page implements Observer {
|
|||||||
});
|
});
|
||||||
|
|
||||||
musicInfoTable = new Table();
|
musicInfoTable = new Table();
|
||||||
musicInfoTable.defaults().center();
|
musicInfoTable.defaults().center().space(10f);
|
||||||
musicInfoTable.setPosition(musicTableScrollPane.getWidth() + musicTableScrollPane.getX(), 0);
|
musicInfoTable.setPosition(musicTableScrollPane.getWidth() + musicTableScrollPane.getX(), 0);
|
||||||
musicInfoTable.setSize(getWidth()-musicTableScrollPane.getWidth(), getHeight());
|
musicInfoTable.setSize(getWidth()-musicTableScrollPane.getWidth(), getHeight());
|
||||||
addActor(musicInfoTable);
|
addActor(musicInfoTable);
|
||||||
|
@ -16,7 +16,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextField;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
import com.badlogic.gdx.utils.Align;
|
|
||||||
|
|
||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.audio.MusicListController;
|
import zero1hd.rhythmbullet.audio.MusicListController;
|
||||||
@ -24,7 +23,7 @@ import zero1hd.rhythmbullet.screens.CreativeScreen;
|
|||||||
import zero1hd.rhythmbullet.screens.MainMenu;
|
import zero1hd.rhythmbullet.screens.MainMenu;
|
||||||
|
|
||||||
public class OptionsPage extends Page {
|
public class OptionsPage extends Page {
|
||||||
Table optionsTable = new Table();
|
Table optionsTable;
|
||||||
private ProgressBar musicVolSlider;
|
private ProgressBar musicVolSlider;
|
||||||
private ProgressBar fxVolSlider;
|
private ProgressBar fxVolSlider;
|
||||||
private TextField directoryField;
|
private TextField directoryField;
|
||||||
@ -46,16 +45,16 @@ public class OptionsPage extends Page {
|
|||||||
backButton.setWidth(backButton.getWidth() + 20);
|
backButton.setWidth(backButton.getWidth() + 20);
|
||||||
addSpaceToTitle(backButton.getWidth() + backButton.getX() + 20);
|
addSpaceToTitle(backButton.getWidth() + backButton.getX() + 20);
|
||||||
|
|
||||||
optionsTable.setSize(getWidth(), getHeightBelowTitle() - 5);
|
optionsTable = new Table();
|
||||||
optionsTable.align(Align.center);
|
optionsTable.defaults().center().space(10f);
|
||||||
optionsTable.defaults().space(10f).expandY();
|
optionsTable.setSize(getWidth(), getHeight());
|
||||||
addActor(optionsTable);
|
addActor(optionsTable);
|
||||||
|
|
||||||
Label musicVolSliderLabel = new Label("Music Volume: ", core.getDefaultSkin());
|
Label musicVolSliderLabel = new Label("Music Volume: ", core.getDefaultSkin());
|
||||||
optionsTable.add(musicVolSliderLabel).left();
|
optionsTable.add(musicVolSliderLabel);
|
||||||
musicVolSlider = new Slider(0, 100, 0.1f, false, core.getDefaultSkin());
|
musicVolSlider = new Slider(0, 100, 0.1f, false, core.getDefaultSkin());
|
||||||
musicVolSlider.setValue(core.getPrefs().getFloat("music vol", 100f)*100f);
|
musicVolSlider.setValue(core.getPrefs().getFloat("music vol", 100f)*100f);
|
||||||
optionsTable.add(musicVolSlider).spaceRight(15f).prefWidth(0.5f*getWidth()).fillX();
|
optionsTable.add(musicVolSlider).minWidth(0.3f*getWidth());
|
||||||
final Label musicVolPercentage = new Label(MathUtils.round(musicVolSlider.getValue()) + "%", core.getDefaultSkin());
|
final Label musicVolPercentage = new Label(MathUtils.round(musicVolSlider.getValue()) + "%", core.getDefaultSkin());
|
||||||
musicVolSlider.addListener(new ChangeListener() {
|
musicVolSlider.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -71,10 +70,10 @@ public class OptionsPage extends Page {
|
|||||||
optionsTable.row();
|
optionsTable.row();
|
||||||
|
|
||||||
Label fxVolSliderLabel = new Label("FX Volume: ", core.getDefaultSkin());
|
Label fxVolSliderLabel = new Label("FX Volume: ", core.getDefaultSkin());
|
||||||
optionsTable.add(fxVolSliderLabel).left();
|
optionsTable.add(fxVolSliderLabel);
|
||||||
fxVolSlider = new Slider(0, 100, 0.1f, false, core.getDefaultSkin());
|
fxVolSlider = new Slider(0, 100, 0.1f, false, core.getDefaultSkin());
|
||||||
fxVolSlider.setValue(core.getPrefs().getFloat("fx vol", 100f)*100f);
|
fxVolSlider.setValue(core.getPrefs().getFloat("fx vol", 100f)*100f);
|
||||||
optionsTable.add(fxVolSlider).spaceRight(15f).prefWidth(0.5f*getWidth()).fillX();
|
optionsTable.add(fxVolSlider).fillX();
|
||||||
final Label fxVolPercentage = new Label(MathUtils.round(fxVolSlider.getValue()) + "%", core.getDefaultSkin());
|
final Label fxVolPercentage = new Label(MathUtils.round(fxVolSlider.getValue()) + "%", core.getDefaultSkin());
|
||||||
fxVolSlider.addListener(new ChangeListener() {
|
fxVolSlider.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -89,7 +88,7 @@ public class OptionsPage extends Page {
|
|||||||
optionsTable.row();
|
optionsTable.row();
|
||||||
|
|
||||||
Label musicDirectoryLabel = new Label("Music Directory: ", core.getDefaultSkin());
|
Label musicDirectoryLabel = new Label("Music Directory: ", core.getDefaultSkin());
|
||||||
optionsTable.add(musicDirectoryLabel).left();
|
optionsTable.add(musicDirectoryLabel);
|
||||||
Label songCount = new Label("Songs: " + sc.getMusicList().getAmountOfMusic(), core.getDefaultSkin(), "sub-font", core.getDefaultSkin().getColor("default"));
|
Label songCount = new Label("Songs: " + sc.getMusicList().getAmountOfMusic(), core.getDefaultSkin(), "sub-font", core.getDefaultSkin().getColor("default"));
|
||||||
directoryField = new TextField(null, core.getDefaultSkin() ) {
|
directoryField = new TextField(null, core.getDefaultSkin() ) {
|
||||||
@Override
|
@Override
|
||||||
@ -119,12 +118,10 @@ public class OptionsPage extends Page {
|
|||||||
optionsTable.row();
|
optionsTable.row();
|
||||||
|
|
||||||
Label debugCodeLabel = new Label("Debug Code: ", core.getDefaultSkin());
|
Label debugCodeLabel = new Label("Debug Code: ", core.getDefaultSkin());
|
||||||
optionsTable.add(debugCodeLabel).left();
|
optionsTable.add(debugCodeLabel);
|
||||||
final TextField debugCodeField = new TextField(null, core.getDefaultSkin());
|
final TextField debugCodeField = new TextField(null, core.getDefaultSkin());
|
||||||
optionsTable.add(debugCodeField).fillX();
|
optionsTable.add(debugCodeField).fillX();
|
||||||
|
|
||||||
optionsTable.top();
|
|
||||||
|
|
||||||
optionsTable.row();
|
optionsTable.row();
|
||||||
|
|
||||||
TextButton keybindSettings = new TextButton("Set Controls", core.getDefaultSkin());
|
TextButton keybindSettings = new TextButton("Set Controls", core.getDefaultSkin());
|
||||||
|
Loading…
Reference in New Issue
Block a user