summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2022-09-27 00:16:50 +0600
committerilotterytea <iltsu@alright.party>2022-09-27 00:16:50 +0600
commitf94063ba8dc3c0bf7e466f01dc2218f07fd90fc2 (patch)
tree57c5bff19bab32a5161c333d3753d95f8ef24d00 /core
parentc8c86db42e24915a8adc379b62fb129493c79ae0 (diff)
brand atlas okaj
Diffstat (limited to 'core')
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/MenuScreen.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
index 0b3888d..5e98c0a 100644
--- a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
+++ b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java
@@ -49,26 +49,21 @@ public class MenuScreen implements Screen, InputProcessor {
// Environment atlas for leafs, snowflakes and background tiles:
environmentAtlas = game.assetManager.get("sprites/env/environment.atlas", TextureAtlas.class);
- bgMenuTiles = new ArrayList<>();
-
- for (int i = 0; i < Gdx.graphics.getHeight() / bgTile1.getHeight() + 1; i++) {
- bgMenuTiles.add(i, new ArrayList<Sprite>());
- for (int j = -1; j < Gdx.graphics.getWidth() / bgTile1.getWidth(); j++) {
- Sprite spr = new Sprite((j + i % 2 == 0) ? bgTile1 : bgTile2);
-
- spr.setPosition(bgTile1.getWidth() * j, bgTile1.getHeight() * i);
- bgMenuTiles.get(i).add(spr);
- }
- }
+ // Brand atlas:
+ brandAtlas = game.assetManager.get("sprites/gui/brand.atlas", TextureAtlas.class);
+ // Stage and skin:
this.stage = new Stage(new FillViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()));
this.skin = new Skin(Gdx.files.internal("main.skin"));
this.widgetSkin = new Skin(Gdx.files.internal("sprites/gui/widgets.skin"));
+ // Main Menu music:
this.menuMusic = game.assetManager.get("mus/menu/mus_menu_loop.ogg", Music.class);
- brandLogo = new Image(game.assetManager.get("sprites/brand.png", Texture.class));
- blackBg = new Image(game.assetManager.get("sprites/black.png", Texture.class));
+ brandLogo = new Image(brandAtlas.findRegion("brand"));
+ blackBg = new Image();
+
+ blackBg.setColor(0f, 0f, 0f, 1f);
this.startLabel = new Label(game.locale.TranslatableText("menu.pressStart"), skin, "press");
this.infoLabel = new DebugLabel(skin);