removed song counter on options page, made sure background will resize to non standard resolutions
This commit is contained in:
parent
5ae598db36
commit
c3f00fe5b6
@ -63,7 +63,7 @@ public class RhythmBullet extends Game {
|
|||||||
@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("RhythmBullet Preferences");
|
||||||
|
|
||||||
if (getPrefs().getBoolean("fullscreen", true)) {
|
if (getPrefs().getBoolean("fullscreen", true)) {
|
||||||
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
|
Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode());
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
|
package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
|
||||||
|
|
||||||
import java.util.Observable;
|
|
||||||
import java.util.Observer;
|
|
||||||
|
|
||||||
import com.badlogic.gdx.Gdx;
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.Preferences;
|
import com.badlogic.gdx.Preferences;
|
||||||
import com.badlogic.gdx.math.MathUtils;
|
import com.badlogic.gdx.math.MathUtils;
|
||||||
@ -19,7 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;
|
|||||||
import zero1hd.rhythmbullet.RhythmBullet;
|
import zero1hd.rhythmbullet.RhythmBullet;
|
||||||
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
import zero1hd.rhythmbullet.desktop.audio.MusicListController;
|
||||||
|
|
||||||
public class OptionsPage extends Page implements Observer {
|
public class OptionsPage extends Page {
|
||||||
Table optionsTable;
|
Table optionsTable;
|
||||||
private ProgressBar musicVolSlider;
|
private ProgressBar musicVolSlider;
|
||||||
private ProgressBar fxVolSlider;
|
private ProgressBar fxVolSlider;
|
||||||
@ -27,7 +24,6 @@ public class OptionsPage extends Page implements Observer {
|
|||||||
private MusicListController mlc;
|
private MusicListController mlc;
|
||||||
private float musicSearchTimer;
|
private float musicSearchTimer;
|
||||||
|
|
||||||
private Label songCount;
|
|
||||||
public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, KeybindOptionsPage moreOptionsPage, final MusicListController mlc) {
|
public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, KeybindOptionsPage moreOptionsPage, final MusicListController mlc) {
|
||||||
super("General", core.getDefaultSkin());
|
super("General", core.getDefaultSkin());
|
||||||
this.mlc = mlc;
|
this.mlc = mlc;
|
||||||
@ -88,7 +84,6 @@ public class OptionsPage extends Page implements Observer {
|
|||||||
|
|
||||||
Label musicDirectoryLabel = new Label("Music Directory: ", core.getDefaultSkin());
|
Label musicDirectoryLabel = new Label("Music Directory: ", core.getDefaultSkin());
|
||||||
optionsTable.add(musicDirectoryLabel);
|
optionsTable.add(musicDirectoryLabel);
|
||||||
songCount = new Label("Songs: " + mlc.getMusicList().getTotal(), core.getDefaultSkin(), "sub-font", core.getDefaultSkin().getColor("default"));
|
|
||||||
directoryField = new TextField(null, core.getDefaultSkin() ) {
|
directoryField = new TextField(null, core.getDefaultSkin() ) {
|
||||||
@Override
|
@Override
|
||||||
public void act(float delta) {
|
public void act(float delta) {
|
||||||
@ -107,11 +102,9 @@ public class OptionsPage extends Page implements Observer {
|
|||||||
@Override
|
@Override
|
||||||
public void changed(ChangeEvent event, Actor actor) {
|
public void changed(ChangeEvent event, Actor actor) {
|
||||||
musicSearchTimer = 2;
|
musicSearchTimer = 2;
|
||||||
songCount.setText("...");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
optionsTable.add(directoryField).fillX();
|
optionsTable.add(directoryField).fillX();
|
||||||
optionsTable.add(songCount);
|
|
||||||
|
|
||||||
optionsTable.row();
|
optionsTable.row();
|
||||||
|
|
||||||
@ -169,13 +162,6 @@ public class OptionsPage extends Page implements Observer {
|
|||||||
Gdx.app.debug("Preferences", "Saved all basic options page values.");
|
Gdx.app.debug("Preferences", "Saved all basic options page values.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void update(Observable arg0, Object arg1) {
|
|
||||||
if (arg0 == mlc.getMusicList()) {
|
|
||||||
songCount.setText(mlc.getMusicList().getTotal() + " songs");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
@ -109,7 +109,7 @@ public class MainMenuScreen extends ScreenAdapter implements AdvancedResizeScree
|
|||||||
screenBatch.draw(fboRegion, 0, 0, stage.getWidth(), stage.getHeight());
|
screenBatch.draw(fboRegion, 0, 0, stage.getWidth(), stage.getHeight());
|
||||||
screenBatch.flush();
|
screenBatch.flush();
|
||||||
lightFilterBuffer.end();
|
lightFilterBuffer.end();
|
||||||
//
|
|
||||||
for (int i = 0; i < blurlvl; i++) {
|
for (int i = 0; i < blurlvl; i++) {
|
||||||
// Horizontal gaussian blur
|
// Horizontal gaussian blur
|
||||||
hBlur.begin();
|
hBlur.begin();
|
||||||
@ -157,7 +157,7 @@ public class MainMenuScreen extends ScreenAdapter implements AdvancedResizeScree
|
|||||||
private void draw() {
|
private void draw() {
|
||||||
if (background != null) {
|
if (background != null) {
|
||||||
screenBatch.begin();
|
screenBatch.begin();
|
||||||
screenBatch.draw(background, 0, 0);
|
screenBatch.draw(background, 0, 0, stage.getWidth(), stage.getHeight());
|
||||||
screenBatch.end();
|
screenBatch.end();
|
||||||
}
|
}
|
||||||
stage.draw();
|
stage.draw();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user