Skip to content

Commit

Permalink
Began implementing the LoadingScreen
Browse files Browse the repository at this point in the history
  • Loading branch information
basimkhajwal committed May 29, 2016
1 parent 17e77e0 commit 63c7195
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions core/src/net/net63/codearcade/LSD/screens/LoadingScreen.java
Original file line number Diff line number Diff line change
@@ -1,38 +1,49 @@
package net.net63.codearcade.LSD.screens;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Label;
import com.badlogic.gdx.utils.Align;
import net.net63.codearcade.LSD.LSD;
import net.net63.codearcade.LSD.managers.ShaderManager;
import net.net63.codearcade.LSD.utils.BackgroundRenderer;
import net.net63.codearcade.LSD.managers.Assets;
import net.net63.codearcade.LSD.utils.CentreGUI;
import net.net63.codearcade.LSD.utils.GUIBuilder;

/**
* Created by Basim on 29/05/16.
*/
public class LoadingScreen extends AbstractScreen {

private BackgroundRenderer backgroundRenderer;
private CentreGUI centreGUI;

public LoadingScreen(LSD game) {
super(game);
this.clear = Color.LIGHT_GRAY;

backgroundRenderer = new BackgroundRenderer(ShaderManager.Shaders.MENU, BackgroundRenderer.DEFAULT);
centreGUI = new CentreGUI();
setupUI(centreGUI.getStage());
}

private void setupUI(Stage stage) {

Label title = GUIBuilder.createLabel("Loading", Assets.FontSizes.HUNDRED, Color.DARK_GRAY);
title.setPosition(400, 400, Align.center);

stage.addActor(title);
}

@Override
public void render(float delta) {
super.render(delta);


centreGUI.render(delta);
}

@Override
public void dispose() {
super.dispose();

centreGUI.dispose();
backgroundRenderer.dispose();
}

}

0 comments on commit 63c7195

Please sign in to comment.