made ui changes, cont. work on music selection
This commit is contained in:
parent
16bbba0e68
commit
ba05dbf0c1
@ -99,7 +99,7 @@ default-round-down
|
|||||||
orig: 12, 20
|
orig: 12, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
default-round-large
|
default-scroll
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 57, 29
|
xy: 57, 29
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
@ -107,7 +107,7 @@ default-round-large
|
|||||||
orig: 20, 20
|
orig: 20, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
default-scroll
|
default-round-large
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 78, 29
|
xy: 78, 29
|
||||||
size: 20, 20
|
size: 20, 20
|
||||||
@ -244,13 +244,6 @@ left-button-down
|
|||||||
orig: 12, 20
|
orig: 12, 20
|
||||||
offset: 0, 0
|
offset: 0, 0
|
||||||
index: -1
|
index: -1
|
||||||
goto
|
|
||||||
rotate: false
|
|
||||||
xy: 1, 123
|
|
||||||
size: 101, 132
|
|
||||||
orig: 101, 132
|
|
||||||
offset: 0, 0
|
|
||||||
index: -1
|
|
||||||
arrow
|
arrow
|
||||||
rotate: false
|
rotate: false
|
||||||
xy: 91, 50
|
xy: 91, 50
|
||||||
|
BIN
android/assets/uiskin.png
Executable file → Normal file
BIN
android/assets/uiskin.png
Executable file → Normal file
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 7.0 KiB |
@ -20,7 +20,6 @@ import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFont
|
|||||||
import com.badlogic.gdx.math.MathUtils;
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;
|
import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;
|
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.Label.LabelStyle;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle;
|
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.ScrollPane.ScrollPaneStyle;
|
||||||
@ -49,8 +48,7 @@ public class Polyjet extends Game {
|
|||||||
TextureAtlas skinAtlas;
|
TextureAtlas skinAtlas;
|
||||||
public Preferences prefs;
|
public Preferences prefs;
|
||||||
|
|
||||||
|
@Override
|
||||||
@Override
|
|
||||||
public void create() {
|
public void create() {
|
||||||
Gdx.app.setLogLevel(Application.LOG_DEBUG);
|
Gdx.app.setLogLevel(Application.LOG_DEBUG);
|
||||||
prefs = Gdx.app.getPreferences("PolyJet_Preferences");
|
prefs = Gdx.app.getPreferences("PolyJet_Preferences");
|
||||||
@ -147,7 +145,7 @@ public class Polyjet extends Game {
|
|||||||
|
|
||||||
defaultSkin.add("special-font", darktech_ldr_fontGenerator.generateFont(new FreeTypeFontParameter() {
|
defaultSkin.add("special-font", darktech_ldr_fontGenerator.generateFont(new FreeTypeFontParameter() {
|
||||||
{
|
{
|
||||||
size = fontScale(0.08f);
|
size = fontScale(0.075f);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@ -183,11 +181,6 @@ public class Polyjet extends Game {
|
|||||||
infoButton.down = defaultSkin.getDrawable("holo-pane-down");
|
infoButton.down = defaultSkin.getDrawable("holo-pane-down");
|
||||||
defaultSkin.add("info-button", infoButton);
|
defaultSkin.add("info-button", infoButton);
|
||||||
|
|
||||||
ButtonStyle arrowButton = new ButtonStyle();
|
|
||||||
arrowButton.down = defaultSkin.getDrawable("goto");
|
|
||||||
arrowButton.up = defaultSkin.getDrawable("goto");
|
|
||||||
defaultSkin.add("arrow-button", arrowButton);
|
|
||||||
|
|
||||||
LabelStyle defaultLabel = new LabelStyle();
|
LabelStyle defaultLabel = new LabelStyle();
|
||||||
defaultLabel.font = defaultSkin.getFont("default-font");
|
defaultLabel.font = defaultSkin.getFont("default-font");
|
||||||
defaultLabel.fontColor = defaultSkin.getColor("default");
|
defaultLabel.fontColor = defaultSkin.getColor("default");
|
||||||
@ -233,7 +226,7 @@ public class Polyjet extends Game {
|
|||||||
|
|
||||||
|
|
||||||
public int fontScale(float fontSize) {
|
public int fontScale(float fontSize) {
|
||||||
Gdx.app.debug("Font pixel size", MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight())) + "px");
|
Gdx.app.debug("Font pixel size", MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getWidth())) + "px");
|
||||||
return MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getHeight()));
|
return MathUtils.round(Gdx.graphics.getDensity()*(fontSize*Gdx.graphics.getWidth()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,20 +33,16 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
Label lastStatement;
|
Label lastStatement;
|
||||||
|
|
||||||
MusicSelectionPage musicSelection;
|
MusicSelectionPage musicSelection;
|
||||||
|
private MainMenu mainMenu;
|
||||||
|
|
||||||
public PreGameScreen(final Polyjet core) {
|
public PreGameScreen(final Polyjet core) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
analyzer = new AudioAnalyzer();
|
analyzer = new AudioAnalyzer();
|
||||||
rhythmMap = new RhythmMap(analyzer);
|
rhythmMap = new RhythmMap(analyzer);
|
||||||
|
|
||||||
stage = new Stage();
|
mainMenu = (MainMenu) core.getScreen();
|
||||||
|
|
||||||
stage.addListener(new ClickListener() {
|
stage = new Stage();
|
||||||
@Override
|
|
||||||
public void clicked(InputEvent event, float x, float y) {
|
|
||||||
core.setScreen(new GameScreen(core));
|
|
||||||
super.clicked(event, x, y);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
cameraTarget = new Vector3(stage.getCamera().position);
|
cameraTarget = new Vector3(stage.getCamera().position);
|
||||||
postTransition();
|
postTransition();
|
||||||
@ -56,7 +52,7 @@ public class PreGameScreen extends ScreenAdapter implements TransitionAdapter {
|
|||||||
public void postTransition() {
|
public void postTransition() {
|
||||||
stage.clear();
|
stage.clear();
|
||||||
//draw music selector
|
//draw music selector
|
||||||
musicSelection = new MusicSelectionPage(core);
|
musicSelection = new MusicSelectionPage(core, mainMenu);
|
||||||
stage.addActor(musicSelection);
|
stage.addActor(musicSelection);
|
||||||
|
|
||||||
statusText = new Label(null, core.defaultSkin);
|
statusText = new Label(null, core.defaultSkin);
|
||||||
|
@ -11,7 +11,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
|||||||
import com.badlogic.gdx.utils.Align;
|
import com.badlogic.gdx.utils.Align;
|
||||||
|
|
||||||
public class GraphicsTable extends Table {
|
public class GraphicsTable extends Table {
|
||||||
private Label explanation;
|
private Label title;
|
||||||
|
|
||||||
private SetResolutionButton
|
private SetResolutionButton
|
||||||
_3840x2160,
|
_3840x2160,
|
||||||
@ -25,12 +25,13 @@ public class GraphicsTable extends Table {
|
|||||||
|
|
||||||
|
|
||||||
public GraphicsTable(Skin skin, final Preferences pref) {
|
public GraphicsTable(Skin skin, final Preferences pref) {
|
||||||
align(Align.top);
|
align(Align.center);
|
||||||
defaults().space(10f);
|
defaults().space(10f);
|
||||||
|
|
||||||
explanation = new Label("This game is freely resizable\n with a minimun size of\n800x480 and maximum of 3840x2160.\nThe following resolutions are the most optimal however.", skin, "small-font", skin.getColor("default"));
|
title = new Label("Optimized Resolutions", skin);
|
||||||
add(explanation);
|
add(title).left();
|
||||||
row().space(15f);
|
row();
|
||||||
|
|
||||||
|
|
||||||
TextButton fullscreen = new TextButton("Fullscreen", skin);
|
TextButton fullscreen = new TextButton("Fullscreen", skin);
|
||||||
fullscreen.addListener(new ChangeListener() {
|
fullscreen.addListener(new ChangeListener() {
|
||||||
|
@ -3,8 +3,8 @@ package zero1hd.polyjet.ui.pages;
|
|||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.math.Vector3;
|
import com.badlogic.gdx.math.Vector3;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button;
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.polyjet.Polyjet;
|
import zero1hd.polyjet.Polyjet;
|
||||||
@ -14,26 +14,18 @@ import zero1hd.polyjet.ui.builders.SetControls;
|
|||||||
|
|
||||||
public class MoreOptionsPage extends Page {
|
public class MoreOptionsPage extends Page {
|
||||||
private KeyMap keymap;
|
private KeyMap keymap;
|
||||||
private ScrollPane keyBinds;
|
private ScrollPane controlsScroller;
|
||||||
private GraphicsTable graphicsSettings;
|
|
||||||
private SetControls controlSetter;
|
private SetControls controlSetter;
|
||||||
|
|
||||||
|
private ScrollPane graphicsScroller;
|
||||||
|
private GraphicsTable graphicsSettings;
|
||||||
|
|
||||||
|
|
||||||
public MoreOptionsPage(Polyjet core, final Vector3 targetLocation) {
|
public MoreOptionsPage(Polyjet core, final Vector3 targetLocation) {
|
||||||
keymap = new KeyMap(core);
|
keymap = new KeyMap(core);
|
||||||
|
|
||||||
controlSetter = new SetControls(core.defaultSkin, keymap);
|
TextButton backArrow = new TextButton("Back", core.defaultSkin);
|
||||||
keyBinds = new ScrollPane(controlSetter, core.defaultSkin);
|
backArrow.setPosition(15, getHeight()-backArrow.getHeight()-10);
|
||||||
keyBinds.setSize(getWidth(), getHeight());
|
|
||||||
addActor(keyBinds);
|
|
||||||
keyBinds.setVisible(false);
|
|
||||||
|
|
||||||
graphicsSettings = new GraphicsTable(core.defaultSkin, core.prefs);
|
|
||||||
graphicsSettings.setSize(getWidth(), getHeight());
|
|
||||||
addActor(graphicsSettings);
|
|
||||||
graphicsSettings.setVisible(false);
|
|
||||||
|
|
||||||
Button backArrow = new Button(core.defaultSkin, "arrow-button");
|
|
||||||
backArrow.setPosition(30, getHeight()-backArrow.getHeight()-10);
|
|
||||||
backArrow.addListener(new ChangeListener() {
|
backArrow.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
@ -41,6 +33,22 @@ public class MoreOptionsPage extends Page {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
addActor(backArrow);
|
addActor(backArrow);
|
||||||
|
|
||||||
|
controlSetter = new SetControls(core.defaultSkin, keymap);
|
||||||
|
controlsScroller = new ScrollPane(controlSetter, core.defaultSkin);
|
||||||
|
controlsScroller.setFadeScrollBars(false);
|
||||||
|
controlsScroller.setSize(getWidth()-backArrow.getWidth()-backArrow.getX()-10, getHeight());
|
||||||
|
controlsScroller.setX(backArrow.getWidth()+10+backArrow.getX());
|
||||||
|
addActor(controlsScroller);
|
||||||
|
controlsScroller.setVisible(false);
|
||||||
|
|
||||||
|
graphicsSettings = new GraphicsTable(core.defaultSkin, core.prefs);
|
||||||
|
graphicsScroller = new ScrollPane(graphicsSettings, core.defaultSkin);
|
||||||
|
graphicsScroller.setFadeScrollBars(false);
|
||||||
|
graphicsScroller.setSize(getWidth()-backArrow.getWidth()-backArrow.getX()-10, getHeight());
|
||||||
|
graphicsScroller.setX(backArrow.getWidth()+10+backArrow.getX());
|
||||||
|
addActor(graphicsScroller);
|
||||||
|
graphicsScroller.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void controlUnselect() {
|
public void controlUnselect() {
|
||||||
@ -50,12 +58,12 @@ public class MoreOptionsPage extends Page {
|
|||||||
public void setControlType(byte type) {
|
public void setControlType(byte type) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 0:
|
case 0:
|
||||||
keyBinds.setVisible(true);
|
controlsScroller.setVisible(true);
|
||||||
graphicsSettings.setVisible(false);
|
graphicsScroller.setVisible(false);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
keyBinds.setVisible(false);
|
controlsScroller.setVisible(false);
|
||||||
graphicsSettings.setVisible(true);
|
graphicsScroller.setVisible(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
package zero1hd.polyjet.ui.pages;
|
package zero1hd.polyjet.ui.pages;
|
||||||
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import com.badlogic.gdx.scenes.scene2d.Touchable;
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
|
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button;
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
||||||
|
|
||||||
import zero1hd.polyjet.Polyjet;
|
import zero1hd.polyjet.Polyjet;
|
||||||
@ -12,19 +11,16 @@ import zero1hd.polyjet.screens.MainMenu;
|
|||||||
|
|
||||||
public class MusicSelectionPage extends Page {
|
public class MusicSelectionPage extends Page {
|
||||||
Image loading;
|
Image loading;
|
||||||
Button back;
|
|
||||||
|
|
||||||
public MusicSelectionPage(final Polyjet core) {
|
public MusicSelectionPage(final Polyjet core, final MainMenu mainMenu) {
|
||||||
super("Select music", core.defaultSkin);
|
super("Select music", core.defaultSkin);
|
||||||
|
|
||||||
back = new Button(core.defaultSkin, "arrow-button");
|
TextButton back = new TextButton("Back", core.defaultSkin);
|
||||||
back.setPosition(15f, (getHeight()-back.getHeight())/2 -15);
|
back.setPosition(getWidth()-back.getWidth()-15f, getHeight()-back.getHeight()-15f);
|
||||||
back.addListener(new ChangeListener() {
|
back.addListener(new ChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
core.setScreen(new MainMenu(core));
|
core.setScreen(mainMenu);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
addActor(back);
|
addActor(back);
|
||||||
|
@ -8,11 +8,11 @@ import com.badlogic.gdx.math.Vector3;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||||
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
import com.badlogic.gdx.scenes.scene2d.InputListener;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Button;
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Label;
|
import com.badlogic.gdx.scenes.scene2d.ui.Label;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar;
|
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Slider;
|
import com.badlogic.gdx.scenes.scene2d.ui.Slider;
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||||
|
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;
|
||||||
|
|
||||||
@ -27,7 +27,6 @@ public class OptionsPage extends Page {
|
|||||||
private Polyjet core;
|
private Polyjet core;
|
||||||
|
|
||||||
private byte goToScreen;
|
private byte goToScreen;
|
||||||
private Button backSymbol;
|
|
||||||
public OptionsPage(final Polyjet core, final Vector3 targetPosition, final MoreOptionsPage moreOptionsPage) {
|
public OptionsPage(final Polyjet core, final Vector3 targetPosition, final MoreOptionsPage moreOptionsPage) {
|
||||||
this.core = core;
|
this.core = core;
|
||||||
optionsTable.defaults().padTop(5f).padBottom(5f);
|
optionsTable.defaults().padTop(5f).padBottom(5f);
|
||||||
@ -103,22 +102,23 @@ public class OptionsPage extends Page {
|
|||||||
|
|
||||||
|
|
||||||
//Back button
|
//Back button
|
||||||
backSymbol = new Button(core.defaultSkin, "arrow-button");
|
TextButton backButton = new TextButton("Back", core.defaultSkin);
|
||||||
backSymbol.addListener(new ChangeListener() {
|
backButton.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
targetPosition.x = 0.5f*Gdx.graphics.getWidth();
|
targetPosition.x = 0.5f*Gdx.graphics.getWidth();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
backSymbol.setPosition(10, (getHeight()-backSymbol.getHeight())/2);
|
backButton.setPosition(10, getHeight()-backButton.getHeight()-18);
|
||||||
addActor(backSymbol);
|
addActor(backButton);
|
||||||
|
|
||||||
optionsTable.setPosition(backSymbol.getX()+ 20 + backSymbol.getWidth(), 0);
|
optionsTable.setPosition(backButton.getX()+ 20 + backButton.getWidth(), 0);
|
||||||
optionsTable.setSize(getWidth()-backSymbol.getWidth()-10-20-10, getHeight());
|
optionsTable.setSize(getWidth()-backButton.getWidth()-10-20-10, getHeight());
|
||||||
addActor(optionsTable);
|
addActor(optionsTable);
|
||||||
|
|
||||||
|
optionsTable.row();
|
||||||
|
|
||||||
Button keybindSettings = new Button(core.defaultSkin, "arrow-button");
|
TextButton keybindSettings = new TextButton("Set Controls", core.defaultSkin);
|
||||||
keybindSettings.addListener(new ChangeListener() {
|
keybindSettings.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
@ -126,13 +126,11 @@ public class OptionsPage extends Page {
|
|||||||
targetPosition.y = -0.5f*Gdx.graphics.getHeight();
|
targetPosition.y = -0.5f*Gdx.graphics.getHeight();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
keybindSettings.setPosition(optionsTable.getWidth()/3, optionsTable.getY());
|
optionsTable.add(keybindSettings).colspan(2).fill();
|
||||||
addActor(keybindSettings);
|
|
||||||
Label controlsSection = new Label("Controls", core.defaultSkin);
|
|
||||||
controlsSection.setPosition(keybindSettings.getX()+(keybindSettings.getWidth()-controlsSection.getWidth())/2, keybindSettings.getHeight()+keybindSettings.getY());
|
|
||||||
addActor(controlsSection);
|
|
||||||
|
|
||||||
Button graphicsSettings = new Button(core.defaultSkin, "arrow-button");
|
optionsTable.row();
|
||||||
|
|
||||||
|
TextButton graphicsSettings = new TextButton("Graphics", core.defaultSkin);
|
||||||
graphicsSettings.addListener(new ChangeListener() {
|
graphicsSettings.addListener(new ChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
@ -140,11 +138,7 @@ public class OptionsPage extends Page {
|
|||||||
targetPosition.y = -0.5f*Gdx.graphics.getHeight();
|
targetPosition.y = -0.5f*Gdx.graphics.getHeight();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
graphicsSettings.setPosition(optionsTable.getWidth()*2/3, optionsTable.getY());
|
optionsTable.add(graphicsSettings).colspan(2).fill();
|
||||||
addActor(graphicsSettings);
|
|
||||||
Label graphicsSection = new Label("Graphics", core.defaultSkin);
|
|
||||||
graphicsSection.setPosition(graphicsSettings.getX()+(graphicsSettings.getWidth()-graphicsSection.getWidth())/2, graphicsSettings.getHeight()+graphicsSettings.getY());
|
|
||||||
addActor(graphicsSection);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void saveOptions(Preferences prefs) {
|
public void saveOptions(Preferences prefs) {
|
||||||
|
@ -44,7 +44,7 @@ public class MusicSelector extends Window {
|
|||||||
|
|
||||||
TextButton confirmButton = new TextButton("confirm", skin);
|
TextButton confirmButton = new TextButton("confirm", skin);
|
||||||
confirmButton.addListener(new ChangeListener() {
|
confirmButton.addListener(new ChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
confirmed = true;
|
confirmed = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user