summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-05-29 20:39:18 +0500
committerilotterytea <iltsu@alright.party>2024-05-29 20:39:18 +0500
commit2463dc69b21ebe6f1c354c4002174f57cfb36a54 (patch)
tree742d8152a6005136c4a58a36bfbccf9b5027721f
parentd41de93e0e08b72a899e21dcbc968113f30a485f (diff)
feat: show developers
-rw-r--r--assets/sprites/gui/friends.atlas15
-rw-r--r--assets/sprites/gui/friends.pngbin0 -> 55360 bytes
-rw-r--r--assets/sprites/gui/friends.skin10
-rw-r--r--core/src/com/ilotterytea/maxoning/MaxonConstants.java8
-rw-r--r--core/src/com/ilotterytea/maxoning/screens/MenuScreen.java48
-rw-r--r--core/src/com/ilotterytea/maxoning/utils/AssetLoading.java2
6 files changed, 83 insertions, 0 deletions
diff --git a/assets/sprites/gui/friends.atlas b/assets/sprites/gui/friends.atlas
new file mode 100644
index 0000000..ab8c9ea
--- /dev/null
+++ b/assets/sprites/gui/friends.atlas
@@ -0,0 +1,15 @@
+friends.png
+size:256,128
+repeat:none
+enotegg
+bounds:128,64,64,64
+greddyss
+bounds:0,0,64,64
+gvardovskiy
+bounds:64,64,64,64
+ilotterytea
+bounds:0,64,64,64
+namesake
+bounds:64,0,64,64
+saopin
+bounds:128,0,64,64
diff --git a/assets/sprites/gui/friends.png b/assets/sprites/gui/friends.png
new file mode 100644
index 0000000..c2d5140
--- /dev/null
+++ b/assets/sprites/gui/friends.png
Binary files differ
diff --git a/assets/sprites/gui/friends.skin b/assets/sprites/gui/friends.skin
new file mode 100644
index 0000000..e13611d
--- /dev/null
+++ b/assets/sprites/gui/friends.skin
@@ -0,0 +1,10 @@
+{
+ com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
+ ilotterytea: { up: ilotterytea },
+ greddyss: { up: greddyss },
+ enotegg: { up: enotegg },
+ namesake: { up: namesake },
+ saopin: { up: saopin },
+ gvardovskiy: { up: gvardovskiy }
+ }
+} \ No newline at end of file
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"));