removed background per page setup

This commit is contained in:
Harrison Deng 2018-01-18 15:40:28 -06:00
parent b1f0a30f5d
commit 95731b3257
7 changed files with 0 additions and 47 deletions

View File

@ -2,9 +2,7 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
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.Image; import com.badlogic.gdx.scenes.scene2d.ui.Image;
@ -33,8 +31,6 @@ public class AnalysisPage extends Page {
private Image albumArt; private Image albumArt;
public AnalysisPage(Skin skin, AssetManager assets, Vector3 cameraPosition) { public AnalysisPage(Skin skin, AssetManager assets, Vector3 cameraPosition) {
setTextureBackground(assets.get("gradients.atlas", TextureAtlas.class).findRegion("round-grad"));
setBgColor(Color.toFloatBits(82,111,157, 255));
table = new Table(); table = new Table();
table.setFillParent(true); table.setFillParent(true);
table.defaults().space(10f); table.defaults().space(10f);

View File

@ -1,8 +1,6 @@
package zero1hd.rhythmbullet.desktop.graphics.ui.pages; package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
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.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Skin;
@ -17,8 +15,6 @@ public class KeybindOptionsPage extends Page {
private KeyMap keyMap; private KeyMap keyMap;
private TextButton backButton; private TextButton backButton;
public KeybindOptionsPage(Skin skin, AssetManager assets, final Vector3 cameraPosition) { public KeybindOptionsPage(Skin skin, AssetManager assets, final Vector3 cameraPosition) {
setTextureBackground(assets.get("gradients.atlas", TextureAtlas.class).findRegion("round-grad"));
setBgColor(Color.toFloatBits(186,238,255, 255));
keyMap = new KeyMap(assets); keyMap = new KeyMap(assets);
controlTable = new ControlOptions(skin, keyMap); controlTable = new ControlOptions(skin, keyMap);

View File

@ -4,9 +4,7 @@ import java.util.Observable;
import java.util.Observer; import java.util.Observer;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
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.Label; import com.badlogic.gdx.scenes.scene2d.ui.Label;
@ -39,8 +37,6 @@ public class MainPage extends Page implements Observer {
public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenu mainMenu) { public MainPage(RhythmBullet core, final Vector3 targetPosition, MusicListController mlc, final MainMenu mainMenu) {
this.mlc = mlc; this.mlc = mlc;
setTextureBackground(core.getAssetManager().get("gradients.atlas", TextureAtlas.class).findRegion("linear-up-grad"));
setBgColor(Color.toFloatBits(83,100,170, 255));
this.mMenu = mainMenu; this.mMenu = mainMenu;
titleBar = new TitleBarVisualizer(core.getAssetManager()); titleBar = new TitleBarVisualizer(core.getAssetManager());
addActor(titleBar); addActor(titleBar);

View File

@ -8,9 +8,7 @@ import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.files.FileHandle;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.graphics.g2d.TextureRegion;
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;
@ -67,8 +65,6 @@ public class MusicSelectionPage extends Page implements Observer {
private float scrollTimer, scrollDelay = 0.2f, scrollDelMod, songSelectionTimer; private float scrollTimer, scrollDelay = 0.2f, scrollDelMod, songSelectionTimer;
public MusicSelectionPage(Skin skin, MusicListController musicListController, MusicInfoController musicInfoController, AssetManager assetManager, final Vector3 cameraTarget, final AnalysisPage ap) { public MusicSelectionPage(Skin skin, MusicListController musicListController, MusicInfoController musicInfoController, AssetManager assetManager, final Vector3 cameraTarget, final AnalysisPage ap) {
setTextureBackground(assetManager.get("gradients.atlas", TextureAtlas.class).findRegion("round-grad"));
setBgColor(Color.toFloatBits(110,164,193, 255));
this.assets = assetManager; this.assets = assetManager;
this.skin = skin; this.skin = skin;
this.mc = musicListController; this.mc = musicListController;

View File

@ -1,8 +1,6 @@
package zero1hd.rhythmbullet.desktop.graphics.ui.pages; package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.math.MathUtils; import com.badlogic.gdx.math.MathUtils;
import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.math.Vector3;
@ -27,8 +25,6 @@ public class OptionsPage extends Page {
private float musicSearchTimer; private float musicSearchTimer;
public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, KeybindOptionsPage moreOptionsPage, final MusicListController sc) { public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, KeybindOptionsPage moreOptionsPage, final MusicListController sc) {
super("General", core.getDefaultSkin()); super("General", core.getDefaultSkin());
setTextureBackground(core.getAssetManager().get("gradients.atlas", TextureAtlas.class).findRegion("round-grad"));
setBgColor(Color.toFloatBits(93,75,144, 255));
//Back button //Back button
TextButton backButton = new TextButton("Back", core.getDefaultSkin()); TextButton backButton = new TextButton("Back", core.getDefaultSkin());
backButton.addListener(new ChangeListener() { backButton.addListener(new ChangeListener() {

View File

@ -1,9 +1,6 @@
package zero1hd.rhythmbullet.desktop.graphics.ui.pages; package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Group; import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.Touchable; import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.ui.Label; import com.badlogic.gdx.scenes.scene2d.ui.Label;
@ -12,12 +9,9 @@ import com.badlogic.gdx.utils.Disposable;
public class Page extends Group implements Disposable { public class Page extends Group implements Disposable {
private Label pageTitle; private Label pageTitle;
private TextureRegion background;
private float bgColor;
public Page() { public Page() {
setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
setTouchable(Touchable.childrenOnly); setTouchable(Touchable.childrenOnly);
bgColor = Color.toFloatBits(255, 255, 255, 255);
} }
public Page(String titleText, Skin skin) { public Page(String titleText, Skin skin) {
@ -32,27 +26,10 @@ public class Page extends Group implements Disposable {
return pageTitle.getY(); return pageTitle.getY();
} }
@Override
public void draw(Batch batch, float parentAlpha) {
if (background != null) {
batch.setColor(bgColor);
batch.draw(background, getX(), getY(), getWidth(), getHeight());
}
super.draw(batch, parentAlpha);
}
public void setBgColor(float bgColor) {
this.bgColor = bgColor;
}
public void addSpaceToTitle(float space) { public void addSpaceToTitle(float space) {
pageTitle.moveBy(space, 0); pageTitle.moveBy(space, 0);
} }
public void setTextureBackground(TextureRegion texture) {
background = texture;
}
@Override @Override
public void dispose() { public void dispose() {
} }

View File

@ -2,9 +2,7 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages;
import com.badlogic.gdx.Preferences; import com.badlogic.gdx.Preferences;
import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.assets.AssetManager;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.Actor;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Skin;
@ -20,8 +18,6 @@ public class VideoOptionsPage extends Page {
private TextButton backButton; private TextButton backButton;
public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenu menu, AssetManager assets) { public VideoOptionsPage(Skin skin, Preferences prefs, final MainMenu menu, AssetManager assets) {
setTextureBackground(assets.get("gradients.atlas", TextureAtlas.class).findRegion("round-grad"));
setBgColor(Color.toFloatBits(110,164,193, 255));
graphicsTable = new GraphicsOptions(menu, skin, prefs); graphicsTable = new GraphicsOptions(menu, skin, prefs);
scrollPane = new ScrollPane(graphicsTable, skin); scrollPane = new ScrollPane(graphicsTable, skin);
scrollPane.setFadeScrollBars(false); scrollPane.setFadeScrollBars(false);