From 95731b325783e2d07d51f35ac21ba23860353445 Mon Sep 17 00:00:00 2001 From: Recrown Date: Thu, 18 Jan 2018 15:40:28 -0600 Subject: [PATCH] removed background per page setup --- .../graphics/ui/pages/AnalysisPage.java | 4 ---- .../graphics/ui/pages/KeybindOptionsPage.java | 4 ---- .../desktop/graphics/ui/pages/MainPage.java | 4 ---- .../graphics/ui/pages/MusicSelectionPage.java | 4 ---- .../graphics/ui/pages/OptionsPage.java | 4 ---- .../desktop/graphics/ui/pages/Page.java | 23 ------------------- .../graphics/ui/pages/VideoOptionsPage.java | 4 ---- 7 files changed, 47 deletions(-) diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java index 490779a..fbcfb7d 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/AnalysisPage.java @@ -2,9 +2,7 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.assets.AssetManager; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Image; @@ -33,8 +31,6 @@ public class AnalysisPage extends Page { private Image albumArt; 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.setFillParent(true); table.defaults().space(10f); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/KeybindOptionsPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/KeybindOptionsPage.java index 37e1f43..3ea5819 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/KeybindOptionsPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/KeybindOptionsPage.java @@ -1,8 +1,6 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages; 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.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.Skin; @@ -17,8 +15,6 @@ public class KeybindOptionsPage extends Page { private KeyMap keyMap; private TextButton backButton; 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); controlTable = new ControlOptions(skin, keyMap); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java index f1e2bf1..a091c9e 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MainPage.java @@ -4,9 +4,7 @@ import java.util.Observable; import java.util.Observer; import com.badlogic.gdx.Gdx; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.Batch; -import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Vector3; import com.badlogic.gdx.scenes.scene2d.Actor; 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) { 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; titleBar = new TitleBarVisualizer(core.getAssetManager()); addActor(titleBar); diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java index 7fb3b63..892081d 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/MusicSelectionPage.java @@ -8,9 +8,7 @@ import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Preferences; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.files.FileHandle; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Texture; -import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.math.Vector3; 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; 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.skin = skin; this.mc = musicListController; diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/OptionsPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/OptionsPage.java index e3104bf..7918612 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/OptionsPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/OptionsPage.java @@ -1,8 +1,6 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages; 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.math.MathUtils; import com.badlogic.gdx.math.Vector3; @@ -27,8 +25,6 @@ public class OptionsPage extends Page { private float musicSearchTimer; public OptionsPage(final RhythmBullet core, final Vector3 targetPosition, KeybindOptionsPage moreOptionsPage, final MusicListController sc) { super("General", core.getDefaultSkin()); - setTextureBackground(core.getAssetManager().get("gradients.atlas", TextureAtlas.class).findRegion("round-grad")); - setBgColor(Color.toFloatBits(93,75,144, 255)); //Back button TextButton backButton = new TextButton("Back", core.getDefaultSkin()); backButton.addListener(new ChangeListener() { diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/Page.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/Page.java index b05dcc8..a828bc4 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/Page.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/Page.java @@ -1,9 +1,6 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages; 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.Touchable; 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 { private Label pageTitle; - private TextureRegion background; - private float bgColor; public Page() { setSize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); setTouchable(Touchable.childrenOnly); - bgColor = Color.toFloatBits(255, 255, 255, 255); } public Page(String titleText, Skin skin) { @@ -32,27 +26,10 @@ public class Page extends Group implements Disposable { 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) { pageTitle.moveBy(space, 0); } - public void setTextureBackground(TextureRegion texture) { - background = texture; - } - @Override public void dispose() { } diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java index 66771d8..6dc08a1 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/pages/VideoOptionsPage.java @@ -2,9 +2,7 @@ package zero1hd.rhythmbullet.desktop.graphics.ui.pages; import com.badlogic.gdx.Preferences; 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.TextureAtlas; import com.badlogic.gdx.scenes.scene2d.Actor; import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; import com.badlogic.gdx.scenes.scene2d.ui.Skin; @@ -20,8 +18,6 @@ public class VideoOptionsPage extends Page { private TextButton backButton; 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); scrollPane = new ScrollPane(graphicsTable, skin); scrollPane.setFadeScrollBars(false);