diff options
| author | ilotterytea <iltsu@alright.party> | 2024-05-29 20:39:18 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-05-29 20:39:18 +0500 |
| commit | 2463dc69b21ebe6f1c354c4002174f57cfb36a54 (patch) | |
| tree | 742d8152a6005136c4a58a36bfbccf9b5027721f /core | |
| parent | d41de93e0e08b72a899e21dcbc968113f30a485f (diff) | |
feat: show developers
Diffstat (limited to 'core')
3 files changed, 58 insertions, 0 deletions
diff --git a/core/src/com/ilotterytea/maxoning/MaxonConstants.java b/core/src/com/ilotterytea/maxoning/MaxonConstants.java index 42f2892..2024438 100644 --- a/core/src/com/ilotterytea/maxoning/MaxonConstants.java +++ b/core/src/com/ilotterytea/maxoning/MaxonConstants.java @@ -12,6 +12,14 @@ public class MaxonConstants { public static final String GAME_VERSION = "Alpha 1.2"; public static final String GAME_GHTAG = "alpha-1.2"; public static final String GAME_PUBLISHER = "iLotterytea"; + public static final String[][] GAME_DEVELOPERS = { + {"ilotterytea", "https://ilotterytea.kz"}, + {"greddyss", "https://twitch.tv/greddyss"}, + {"enotegg", "https://twitch.tv/enotegg"}, + {"namesake", "https://twitter.com/nameisnamesake"}, + {"saopin", "https://twitch.tv/saopin_"}, + {"gvardovskiy", "https://twitch.tv/gvardovskiy"} + }; public static final String GAME_MAIN_FOLDER = OsUtils.getUserDataDirectory(".Maxoning"); public static final String GAME_SCREENSHOT_FOLDER = GAME_MAIN_FOLDER + "/screenshots"; diff --git a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java index 909325e..84e6374 100644 --- a/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java +++ b/core/src/com/ilotterytea/maxoning/screens/MenuScreen.java @@ -6,6 +6,7 @@ import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Interpolation; +import com.badlogic.gdx.scenes.scene2d.Action; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.actions.Actions; @@ -15,6 +16,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Button; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; import com.badlogic.gdx.utils.Align; +import com.badlogic.gdx.utils.Timer; import com.badlogic.gdx.utils.viewport.ScreenViewport; import com.ilotterytea.maxoning.MaxonConstants; import com.ilotterytea.maxoning.MaxonGame; @@ -55,6 +57,8 @@ public class MenuScreen implements Screen { TextureAtlas brandAtlas = game.assetManager.get("sprites/gui/brand.atlas", TextureAtlas.class); TextureAtlas widgetAtlas = game.assetManager.get("sprites/gui/widgets.atlas", TextureAtlas.class); + Skin friendsSkin = game.assetManager.get("sprites/gui/friends.skin", Skin.class); + sav = GameDataSystem.load("00.maxon"); // Main Menu music: @@ -123,6 +127,50 @@ public class MenuScreen implements Screen { Table rightGameControlTable = new Table(); rightGameControlTable.align(Align.right); + // - - - D E V E L O P E R S H O W C A S E - - - + Image developerImage = new Image(); + final int[] developerIndex = {MaxonConstants.GAME_DEVELOPERS.length}; + developerImage.setSize(64, 64); + + Timer.schedule(new Timer.Task() { + @Override + public void run() { + developerIndex[0]++; + + if (developerIndex[0] >= MaxonConstants.GAME_DEVELOPERS.length) { + developerIndex[0] = 0; + } + + String[] dev = MaxonConstants.GAME_DEVELOPERS[developerIndex[0]]; + + developerImage.clearActions(); + developerImage.addAction( + Actions.sequence( + Actions.alpha(0.0f, 1f), + new Action() { + @Override + public boolean act(float delta) { + developerImage.setDrawable(friendsSkin, dev[0]); + return true; + } + }, + Actions.alpha(1.0f, 1f) + ) + ); + + developerImage.clearListeners(); + developerImage.addListener(new ClickListener() { + @Override + public void clicked(InputEvent event, float x, float y) { + super.clicked(event, x, y); + Gdx.net.openURI(dev[1]); + } + }); + } + }, 0, 5); + + rightGameControlTable.add(developerImage).padRight(16f); + // Localization String[] fh4Locale = game.locale.getFileHandle().nameWithoutExtension().split("_"); String localeButtonStyleName = "locale_" + fh4Locale[0]; diff --git a/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java b/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java index c0605f3..0225e48 100644 --- a/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java +++ b/core/src/com/ilotterytea/maxoning/utils/AssetLoading.java @@ -28,6 +28,8 @@ public class AssetLoading { am.load("sprites/gui/widgets.skin", Skin.class, new SkinLoader.SkinParameter("sprites/gui/widgets.atlas")); am.load("sprites/gui/widgeticons.atlas", TextureAtlas.class); + am.load("sprites/gui/friends.atlas", TextureAtlas.class); + am.load("sprites/gui/friends.skin", Skin.class, new SkinLoader.SkinParameter("sprites/gui/friends.atlas")); am.load("MainSpritesheet.atlas", TextureAtlas.class); am.load("MainSpritesheet.skin", Skin.class, new SkinLoader.SkinParameter("MainSpritesheet.atlas")); |
