Skip to content

Commit

Permalink
Merge pull request #14 from Interrupt/features/versioning
Browse files Browse the repository at this point in the history
Display Engine version on MainMenuScreen
  • Loading branch information
Interrupt authored Dec 12, 2018
2 parents 410696a + 6f36ac8 commit 244a8f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Dungeoneer/src/com/interrupt/dungeoneer/game/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@
import java.util.concurrent.Executors;

public class Game {
// The save game version, gets saved in the player
/** Engine version */
public static String VERSION = "v1.1.0";

/** The save game version, gets saved in the player */
public static int SAVE_VERSION = 1;

public float time = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,18 @@ public void draw(float delta) {
if(fadeFactor < 1f) {
renderer.drawFlashOverlay(fadeColor.set(0f, 0f, 0f, 1f - fadeFactor));
}

float w = Gdx.graphics.getWidth();
float h = Gdx.graphics.getHeight();
float fontSize = Game.getDynamicUiScale() * 140;
float smallFontSize = fontSize * 0.15f;

renderer.uiBatch.setProjectionMatrix(renderer.camera2D.combined);
renderer.uiBatch.begin();

renderer.drawTextRightJustified(Game.VERSION, (w / 2) - smallFontSize, (-h / 2) + smallFontSize, smallFontSize, Color.GRAY, Color.BLACK);

renderer.uiBatch.end();
}

private String getSaveName(Progression p, Integer levelNum, String levelName) {
Expand Down

0 comments on commit 244a8f6

Please sign in to comment.