diff options
| author | ilotterytea <iltsu@alright.party> | 2022-11-25 21:00:09 +0600 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2022-11-25 21:00:09 +0600 |
| commit | b767cd9d86f0070e4f4590fd5defbe8af6ac9e29 (patch) | |
| tree | 92f71acbb3b35ae5876321b6bff73b14df63e8b5 /core | |
| parent | d79ded077f4c2d4375ef96df9bdb9c3f5e3c0450 (diff) | |
| parent | 7e4562c323cdcf323b5067261fcae002508fadd6 (diff) | |
Merge remote-tracking branch 'origin/master'
# Conflicts:
# assets/sprites/gui/widgeticons.skin
Diffstat (limited to 'core')
3 files changed, 358 insertions, 137 deletions
diff --git a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java index 02ce550..9855066 100644 --- a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java @@ -2,6 +2,7 @@ package com.ilotterytea.maxoning.screens; import com.badlogic.gdx.*; import com.badlogic.gdx.audio.Music; +import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Interpolation; @@ -10,6 +11,9 @@ import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.actions.RepeatAction; import com.badlogic.gdx.scenes.scene2d.ui.*; +import com.badlogic.gdx.scenes.scene2d.ui.Image; +import com.badlogic.gdx.scenes.scene2d.ui.Label; +import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.viewport.FillViewport; @@ -17,39 +21,35 @@ import com.ilotterytea.maxoning.MaxonConstants; import com.ilotterytea.maxoning.MaxonGame; import com.ilotterytea.maxoning.player.MaxonSavegame; import com.ilotterytea.maxoning.ui.*; -import com.ilotterytea.maxoning.utils.math.Math; +import com.ilotterytea.maxoning.utils.I18N; import com.ilotterytea.maxoning.utils.serialization.GameDataSystem; +import java.awt.*; import java.io.File; import java.io.IOException; import java.util.ArrayList; -import java.util.Calendar; +import java.util.Locale; public class MenuScreen implements Screen { final MaxonGame game; final Stage stage; - final Skin skin, widgetSkin; + final Skin skin, widgetSkin, iconSkin; - Image brandLogo, blackBg, menuBg; + Image brandLogo, blackBg; final Music menuMusic; - Table menuTable, savegameTable; + Table menuTable; + + TextButton startBtn; + Label savLabel; // Atlases: - TextureAtlas environmentAtlas, brandAtlas; + TextureAtlas environmentAtlas, brandAtlas, iconAtlas; private final MovingChessBackground bg; - private ArrayList<LeafParticle> leafTiles, delLeafTiles; - - private final boolean isAutumn = - // Autumn. - ((Calendar.getInstance().get(Calendar.MONTH) + 1 > 8) && (Calendar.getInstance().get(Calendar.MONTH) + 1 < 12)) || - // Spring. - ((Calendar.getInstance().get(Calendar.MONTH) + 1 < 6) && (Calendar.getInstance().get(Calendar.MONTH) + 1 > 2)); - private final boolean isSummer = (Calendar.getInstance().get(Calendar.MONTH) + 1 > 5 && Calendar.getInstance().get(Calendar.MONTH) + 1 < 9); public MenuScreen(final MaxonGame game) { this.game = game; @@ -60,10 +60,14 @@ public class MenuScreen implements Screen { // Brand atlas: brandAtlas = game.assetManager.get("sprites/gui/brand.atlas", TextureAtlas.class); + // Icon atlas: + iconAtlas = game.assetManager.get("sprites/gui/widgeticons.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")); + this.iconSkin = new Skin(Gdx.files.internal("sprites/gui/widgeticons.skin")); // Main Menu music: this.menuMusic = game.assetManager.get("mus/menu/mus_menu_loop.ogg", Music.class); @@ -77,56 +81,69 @@ public class MenuScreen implements Screen { stage.addActor(blackBg); - // Save game table: - savegameTable = new Table(); - loadSavegamesToTable(savegameTable); + // // Menu table: + float iconSize = 48f, iconPad = 6f; + menuTable = new Table(); + menuTable.setSize(stage.getWidth() / 2f, iconSize); + menuTable.setPosition(0, 0); + menuTable.pad(iconPad); + menuTable.align(Align.bottomLeft); - // Quick buttons: - Table quickTable = new Table(); - quickTable.align(Align.right); + // Quit button: + ImageButton quitBtn = new ImageButton(iconSkin, "quit"); - // Options button: - TextButton optionsButton = new TextButton("Options", widgetSkin, "default"); - optionsButton.addListener(new ClickListener() { + quitBtn.addListener(new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { - super.clicked(event, x, y); + Gdx.app.exit(); } }); - quickTable.add(optionsButton).height(48f).minWidth(90f).pad(4f); + menuTable.add(quitBtn).size(iconSize).pad(iconPad); - // Quit button: - TextButton quitButton = new TextButton("Quit", widgetSkin, "default"); - quitButton.addListener(new ClickListener() { + // Options button: + ImageButton optBtn = new ImageButton(iconSkin, "options"); + + optBtn.addListener(new ClickListener() { @Override public void clicked(InputEvent event, float x, float y) { - Gdx.app.exit(); + showOptions(); } }); - quickTable.add(quitButton).height(48f).minWidth(90f).pad(4f); + menuTable.add(optBtn).size(iconSize).pad(iconPad); - // Menu table: - menuTable = new Table(); - menuTable.setPosition(0, 0); - menuTable.setSize(stage.getWidth(), stage.getHeight()); - menuTable.align(Align.center); + stage.addActor(menuTable); - Label menuTitle = new Label("Please select a save slot", skin, "default"); - menuTitle.setAlignment(Align.left); + // // Press start: + startBtn = new TextButton(game.locale.TranslatableText("menu.pressStart"), skin); + startBtn.setPosition((stage.getWidth() / 2f) - (startBtn.getWidth() / 2f), 8f); - menuTable.add(menuTitle).width(512f).row(); - menuTable.add(savegameTable).width(512f).maxWidth(640f).row(); - menuTable.add(quickTable).width(512f); + startBtn.addAction( + Actions.repeat( + -1, + Actions.sequence( + Actions.fadeIn(1f), + Actions.delay(2f), + Actions.fadeOut(1f), + Actions.delay(2f) + ) + ) + ); - stage.addActor(menuTable); + stage.addActor(startBtn); + + // // Savegame: + savLabel = new Label("test", skin); + savLabel.setPosition((stage.getWidth() / 2f) - (savLabel.getWidth() / 2f), 8f + startBtn.getY() + startBtn.getHeight()); + + stage.addActor(savLabel); // // Logo: brandLogo = new Image(brandAtlas.findRegion("brand")); brandLogo.setPosition( (stage.getWidth() / 2f) - (brandLogo.getWidth() / 2f), - stage.getHeight() - brandLogo.getHeight() * 1.5f + (stage.getHeight() / 2f) - (brandLogo.getHeight() / 2f) ); brandLogo.setOrigin( @@ -168,9 +185,6 @@ public class MenuScreen implements Screen { widgetSkin.getDrawable("bgTile01"), widgetSkin.getDrawable("bgTile02") ); - - leafTiles = new ArrayList<>(); - delLeafTiles = new ArrayList<>(); } @Override public void show() { @@ -183,55 +197,12 @@ public class MenuScreen implements Screen { Gdx.gl.glClearColor(0, 0, 0, 1f); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - // Generate a new leaf: - if (!isSummer) { - LeafParticle _leaf = new LeafParticle( - (isAutumn) ? environmentAtlas.findRegion("leaf") : environmentAtlas.findRegion("snowflake"), - (float) java.lang.Math.floor(java.lang.Math.random() * Gdx.graphics.getWidth()), - Gdx.graphics.getHeight(), - (float) Math.getRandomNumber(-257, 256) + 1, - (float) Math.getRandomNumber(-257, 256) + 1, - (float) Math.getRandomNumber(5, 15)); - - _leaf.setScale(5f); - - if (isAutumn) { - switch (Math.getRandomNumber(0, 3)) { - case 0: _leaf.setColor(Color.CORAL); break; - case 1: _leaf.setColor(Color.YELLOW); break; - default: _leaf.setColor(Color.RED); break; - } - } else { - switch (Math.getRandomNumber(0, 1)) { - case 0: _leaf.setColor(Color.WHITE); break; - case 1: _leaf.setColor(Color.SKY); - } - } - - leafTiles.add(_leaf); - } - game.batch.begin(); bg.draw(game.batch); - for (LeafParticle spr : leafTiles) { - spr.draw(game.batch); - } - game.batch.end(); - if (!isSummer) { - for (LeafParticle spr : leafTiles) { - if (spr.getX() > Gdx.graphics.getWidth() || spr.getY() > Gdx.graphics.getHeight()) { - delLeafTiles.add(spr); - } - } - - for (LeafParticle spr : delLeafTiles) { leafTiles.remove(spr); } - delLeafTiles.clear(); - } - stage.draw(); stage.act(delta); } @@ -243,6 +214,303 @@ public class MenuScreen implements Screen { stage.getViewport().update(width, height, true); } + private void showOptions() { + startBtn.addAction(Actions.moveTo(startBtn.getX(), -startBtn.getY() - startBtn.getHeight(), 1f, Interpolation.exp10Out)); + savLabel.addAction(Actions.moveTo(savLabel.getX(), -savLabel.getY() - savLabel.getHeight(), 1f, Interpolation.exp10Out)); + menuTable.addAction(Actions.moveTo(menuTable.getX(), -menuTable.getY() - menuTable.getHeight(), 1f, Interpolation.exp10Out)); + + brandLogo.clearActions(); + brandLogo.addAction( + Actions.sequence( + Actions.parallel( + Actions.moveTo( + (stage.getWidth() / 2f) - (brandLogo.getWidth() / 2f), + stage.getHeight() - brandLogo.getHeight() * 1.5f, + 1f, + Interpolation.fade + ), + Actions.rotateTo(0f, .25f, Interpolation.fade) + ), + Actions.repeat( + RepeatAction.FOREVER, + Actions.sequence( + Actions.parallel( + Actions.rotateTo(-5f, 5f, Interpolation.smoother), + Actions.scaleTo(0.9f, 0.9f, 5f, Interpolation.smoother) + ), + Actions.parallel( + Actions.rotateTo(5f, 5f, Interpolation.smoother), + Actions.scaleTo(1.1f, 1.1f, 5f, Interpolation.smoother) + ) + ) + ) + ) + ); + + // Main options window: + final Table mOptTable = new Table(); + mOptTable.setPosition(0, 0); + mOptTable.align(Align.center); + mOptTable.setSize(stage.getWidth(), stage.getHeight()); + stage.addActor(mOptTable); + + // Options title: + Label optTitle = new Label(game.locale.TranslatableText("options.title"), skin); + optTitle.setAlignment(Align.left); + mOptTable.add(optTitle).width(512f).row(); + + // Options table: + Table optTable = new Table(widgetSkin); + optTable.setBackground("plain_down"); + optTable.align(Align.topLeft); + + // Scroll panel for options: + ScrollPane optScroll = new ScrollPane(optTable); + optScroll.setScrollingDisabled(true, false); + mOptTable.add(optScroll).width(512f).height(384f).row(); + + // - - - General category - - -: + Label genLabel = new Label(game.locale.TranslatableText("options.general"), skin); + optTable.add(genLabel).expandX().row(); + + Table genCategory = new Table(); + optTable.add(genCategory).expandX().row(); + + // Show debug: + Label debLabel = new Label(game.locale.TranslatableText("options.debug"), skin); + debLabel.setAlignment(Align.left); + genCategory.add(debLabel).width(256f); + + final TextButton debButton = new TextButton((game.prefs.getBoolean("debug", false)) ? "ON" : "OFF", widgetSkin); + + debButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + boolean value = game.prefs.getBoolean("debug", false); + + game.prefs.putBoolean("debug", !value); + game.prefs.flush(); + + value = !value; + + debButton.getLabel().setText((value) ? "ON" : "OFF"); + } + }); + + genCategory.add(debButton).width(256f).row(); + + // - - - Audio category - - -: + Label audioLabel = new Label(game.locale.TranslatableText("options.audio"), skin); + optTable.add(audioLabel).expandX().row(); + + Table audioCategory = new Table(); + optTable.add(audioCategory).expandX().row(); + + // Music: + Label musLabel = new Label(game.locale.TranslatableText("options.music"), skin); + musLabel.setAlignment(Align.left); + audioCategory.add(musLabel).width(256f); + + final TextButton musButton = new TextButton((game.prefs.getBoolean("music", true)) ? "ON" : "OFF", widgetSkin); + + musButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + boolean value = game.prefs.getBoolean("music", true); + + game.prefs.putBoolean("music", !value); + game.prefs.flush(); + + value = !value; + + if (value) menuMusic.play(); + else menuMusic.pause(); + + musButton.getLabel().setText((value) ? "ON" : "OFF"); + } + }); + + audioCategory.add(musButton).width(256f).row(); + + // Sound: + Label sndLabel = new Label(game.locale.TranslatableText("options.sound"), skin); + sndLabel.setAlignment(Align.left); + audioCategory.add(sndLabel).width(256f); + + final TextButton sndButton = new TextButton((game.prefs.getBoolean("sfx", true)) ? "ON" : "OFF", widgetSkin); + + sndButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + boolean value = game.prefs.getBoolean("sfx", true); + + game.prefs.putBoolean("sfx", !value); + game.prefs.flush(); + + value = !value; + + sndButton.getLabel().setText((value) ? "ON" : "OFF"); + } + }); + + audioCategory.add(sndButton).width(256f).row(); + + // - - - Video category - - -: + Label videoLabel = new Label(game.locale.TranslatableText("options.video"), skin); + optTable.add(videoLabel).expandX().row(); + + Table videoCategory = new Table(); + optTable.add(videoCategory).expandX().row(); + + // Vertical sync: + Label vscLabel = new Label(game.locale.TranslatableText("options.vsync"), skin); + vscLabel.setAlignment(Align.left); + videoCategory.add(vscLabel).width(256f); + + final TextButton vscButton = new TextButton((game.prefs.getBoolean("vsync", true)) ? "ON" : "OFF", widgetSkin); + + vscButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + boolean value = game.prefs.getBoolean("vsync", true); + + game.prefs.putBoolean("vsync", !value); + game.prefs.flush(); + + value = !value; + + Gdx.graphics.setVSync(value); + + vscButton.getLabel().setText((value) ? "ON" : "OFF"); + } + }); + + videoCategory.add(vscButton).width(256f).row(); + + // Full screen: + Label fscLabel = new Label(game.locale.TranslatableText("options.fullscreen"), skin); + fscLabel.setAlignment(Align.left); + videoCategory.add(fscLabel).width(256f); + + final TextButton fscButton = new TextButton((game.prefs.getBoolean("fullscreen", true)) ? "ON" : "OFF", widgetSkin); + + fscButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + boolean value = game.prefs.getBoolean("fullscreen", true); + + game.prefs.putBoolean("fullscreen", !value); + game.prefs.flush(); + + value = !value; + Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); + + if (value) Gdx.graphics.setFullscreenMode(Gdx.graphics.getDisplayMode()); + else Gdx.graphics.setWindowedMode(dim.width, dim.height); + + fscButton.getLabel().setText((value) ? "ON" : "OFF"); + } + }); + + videoCategory.add(fscButton).width(256f).row(); + + // - - - Switch the language - - -: + String[] fh4Locale = game.locale.getFileHandle().nameWithoutExtension().split("_"); + Locale locale = new Locale(fh4Locale[0], fh4Locale[1]); + final TextButton langButton = new TextButton(game.locale.FormattedText("options.language", locale.getDisplayLanguage(), locale.getDisplayCountry()), widgetSkin); + + langButton.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + int index = 0; + ArrayList<FileHandle> fhArray = new ArrayList<>(); + fhArray.add(MaxonConstants.FILE_RU_RU); + fhArray.add(MaxonConstants.FILE_EN_US); + + if (fhArray.indexOf(game.locale.getFileHandle()) + 1 < fhArray.size()) { + index = fhArray.indexOf(game.locale.getFileHandle()) + 1; + } + + FileHandle fhNext = fhArray.get(index); + + game.locale = new I18N(fhNext); + game.prefs.putString("lang", fhNext.nameWithoutExtension()); + game.prefs.flush(); + + String[] fh4Locale = fhNext.nameWithoutExtension().split("_"); + Locale locale = new Locale(fh4Locale[0], fh4Locale[1]); + + langButton.setText(game.locale.FormattedText("options.language", locale.getDisplayLanguage(), locale.getDisplayCountry())); + game.setScreen(new SplashScreen(game)); + menuMusic.stop(); + } + }); + + optTable.add(langButton).width(512f).row(); + + // - - - Reset save data - - -: + TextButton resetButton = new TextButton(game.locale.TranslatableText("options.reset"), widgetSkin); + optTable.add(resetButton).width(512f).row(); + + // Game info: + Label infLabel = new Label(String.format("%s - %s", MaxonConstants.GAME_NAME, MaxonConstants.GAME_VERSION), skin); + infLabel.setAlignment(Align.center); + optTable.add(infLabel).maxWidth(512f).row(); + + // // Action buttons: + Table actTable = new Table(widgetSkin); + actTable.setBackground("plain_down"); + actTable.setWidth(512f); + actTable.align(Align.right); + mOptTable.add(actTable).width(512f).maxWidth(512f).pad(5f); + + TextButton closeBtn = new TextButton("Back to main menu", widgetSkin); + + closeBtn.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + mOptTable.remove(); + + brandLogo.clearActions(); + brandLogo.addAction( + Actions.sequence( + Actions.parallel( + Actions.rotateTo(0f, 1f), + Actions.moveTo( + (stage.getWidth() / 2f) - (brandLogo.getWidth() / 2f), + (stage.getHeight() / 2f) - (brandLogo.getHeight() / 2f), + 1f, + Interpolation.fade + ) + ), + Actions.repeat( + RepeatAction.FOREVER, + Actions.sequence( + Actions.parallel( + Actions.rotateTo(-5f, 5f, Interpolation.smoother), + Actions.scaleTo(0.9f, 0.9f, 5f, Interpolation.smoother) + ), + Actions.parallel( + Actions.rotateTo(5f, 5f, Interpolation.smoother), + Actions.scaleTo(1.1f, 1.1f, 5f, Interpolation.smoother) + ) + ) + ) + ) + ); + + startBtn.addAction(Actions.moveTo(startBtn.getX(), 8f, 1f, Interpolation.smoother)); + savLabel.addAction(Actions.moveTo(savLabel.getX(), 16f + startBtn.getHeight(), 1f, Interpolation.smoother)); + menuTable.addAction(Actions.moveTo(menuTable.getX(), 0, 1f, Interpolation.smoother)); + } + }); + + actTable.add(closeBtn).pad(5f); + + TextButton saveBtn = new TextButton("Apply", widgetSkin); + actTable.add(saveBtn).pad(5f); + } + private void loadSavegamesToTable(Table table) { for (int i = 0; i < 3; i++) { if (new File(MaxonConstants.GAME_SAVEGAME_FOLDER + String.format("/0%s.maxon", i)).exists()) { diff --git a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java index ccae6b1..e8ea561 100644 --- a/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/SplashScreen.java @@ -1,35 +1,28 @@ package com.ilotterytea.maxoning.screens; import com.badlogic.gdx.*; -import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.GL20; -import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.ui.Skin; import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.utils.Align; -import com.badlogic.gdx.utils.Timer; import com.badlogic.gdx.utils.viewport.FillViewport; import com.ilotterytea.maxoning.MaxonGame; import com.ilotterytea.maxoning.utils.AssetLoading; import com.ilotterytea.maxoning.utils.OsUtils; -import com.ilotterytea.maxoning.utils.math.Math; import com.ilotterytea.maxoning.utils.serialization.GameDataSystem; import java.io.IOException; -import java.util.ArrayList; public class SplashScreen implements Screen { - final MaxonGame game; final Stage stage; final Skin skin; TextureAtlas brandAtlas, envAtlas; - ArrayList<Sprite> contribList; Image dev, pub; public SplashScreen(MaxonGame game) { @@ -46,7 +39,6 @@ public class SplashScreen implements Screen { brandAtlas = new TextureAtlas(Gdx.files.internal("sprites/gui/ilotterytea.atlas")); envAtlas = new TextureAtlas(Gdx.files.internal("sprites/env/environment.atlas")); - contribList = new ArrayList<>(); pub = new Image(brandAtlas.findRegion("org")); logoTable.add(pub).size(pub.getWidth() * 5f, pub.getHeight() * 5f).pad(16f).row(); @@ -60,40 +52,6 @@ public class SplashScreen implements Screen { } @Override public void show() { - int size = 64; - for (int i = 0; i < stage.getHeight() / size; i++) { - for (int j = 0; j < stage.getWidth() / size; j++) { - Sprite spr = new Sprite(envAtlas.findRegion("tile")); - spr.setSize(size, size); - spr.setPosition(size * j, size * i); - switch (Math.getRandomNumber(0, 5)) { - case 0: spr.setColor(Color.SKY); break; - case 1: spr.setColor(Color.PURPLE); break; - case 2: spr.setColor(Color.PINK); break; - case 3: spr.setColor(Color.CHARTREUSE); break; - case 4: spr.setColor(Color.ORANGE); break; - } - spr.setAlpha(0.25f); - contribList.add(spr); - } - } - - Timer.schedule(new Timer.Task() { - @Override - public void run() { - for (Sprite spr : contribList) { - switch (Math.getRandomNumber(0, 5)) { - case 0: spr.setColor(Color.SKY); break; - case 1: spr.setColor(Color.PURPLE); break; - case 2: spr.setColor(Color.PINK); break; - case 3: spr.setColor(Color.CHARTREUSE); break; - case 4: spr.setColor(Color.ORANGE); break; - } - spr.setAlpha(0.25f); - } - } - }, 1f, 1f); - render(Gdx.graphics.getDeltaTime()); } @@ -115,15 +73,9 @@ public class SplashScreen implements Screen { @Override public void render(float delta) { - Gdx.gl.glClearColor(0, 0, 0, 1); + Gdx.gl.glClearColor(1, 1, 1, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); - game.batch.begin(); - for (Sprite spr : contribList) { - spr.draw(game.batch); - } - game.batch.end(); - stage.draw(); stage.act(delta); diff --git a/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java b/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java index aba31fa..271163d 100644 --- a/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java +++ b/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java @@ -17,6 +17,7 @@ public class AssetLoading { am.load("sprites/gui/icons.atlas", TextureAtlas.class); am.load("sprites/gui/ilotterytea.atlas", TextureAtlas.class); am.load("sprites/gui/widgets.atlas", TextureAtlas.class); + am.load("sprites/gui/widgeticons.atlas", TextureAtlas.class); // Cat item textures: am.load("sprites/sheet/loadingCircle.png", Texture.class); |
