|
@@ -1,29 +1,44 @@
|
|
|
package xyz.prismix;
|
|
|
|
|
|
import com.badlogic.gdx.ApplicationAdapter;
|
|
|
+import com.badlogic.gdx.Game;
|
|
|
import com.badlogic.gdx.Gdx;
|
|
|
import com.badlogic.gdx.graphics.GL20;
|
|
|
import com.badlogic.gdx.graphics.Texture;
|
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
|
import com.badlogic.gdx.utils.ScreenUtils;
|
|
|
+import xyz.prismix.Screens.List.Account.LoginScreen;
|
|
|
+import xyz.prismix.Screens.ScreenManagers;
|
|
|
+
|
|
|
+import java.lang.reflect.InvocationTargetException;
|
|
|
|
|
|
/** {@link com.badlogic.gdx.ApplicationListener} implementation shared by all platforms. */
|
|
|
-public class Main extends ApplicationAdapter {
|
|
|
+public class Main extends Game {
|
|
|
private SpriteBatch batch;
|
|
|
private Texture image;
|
|
|
+ private LoginScreen screen;
|
|
|
|
|
|
@Override
|
|
|
public void create() {
|
|
|
+ try {
|
|
|
+ ScreenManagers.load();
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+
|
|
|
batch = new SpriteBatch();
|
|
|
image = new Texture("libgdx.png");
|
|
|
+ screen = new LoginScreen();
|
|
|
+ setScreen(screen);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void render() {
|
|
|
- ScreenUtils.clear(0.15f, 0.15f, 0.2f, 1f);
|
|
|
- batch.begin();
|
|
|
- batch.draw(image, 140, 210);
|
|
|
- batch.end();
|
|
|
+// ScreenUtils.clear(0.15f, 0.15f, 0.2f, 1f);
|
|
|
+// batch.begin();
|
|
|
+// batch.draw(image, Gdx.graphics.getWidth()/2 - image.getWidth()/2, Gdx.graphics.getHeight()/2 - image.getHeight()/2);
|
|
|
+// batch.end();
|
|
|
+ screen.render(0);
|
|
|
}
|
|
|
|
|
|
@Override
|