adds green backing ready for criteria

This commit is contained in:
Rosia E Evans 2024-04-21 12:42:30 +01:00
parent 06b61bdcbb
commit 75f14cb3d4
2 changed files with 37 additions and 0 deletions

View file

@ -0,0 +1,32 @@
package com.monjaro.gamejam;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.monjaro.gamejam.main.Actor;
public class SegmentUI extends Actor {
private Texture separator;
private Texture criteriaSheet;
@Override
public void tick() {
}
@Override
public void render(SpriteBatch batch) {
batch.end();
ShapeRenderer renderer = new ShapeRenderer();
renderer.begin(ShapeRenderer.ShapeType.Filled);
renderer.setColor(0.4f, 0.7f, 0.4f, 1);
renderer.rect(0, (Gdx.graphics.getHeight()/3)*2, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()/3);
renderer.end();
batch.begin();
}
}

View file

@ -8,6 +8,7 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.ScreenUtils;
import com.monjaro.gamejam.SegmentUI;
import com.monjaro.gamejam.segment.DualSegment;
import com.monjaro.gamejam.segment.KinSegment;
import com.monjaro.gamejam.segment.OlympicSegment;
@ -31,6 +32,7 @@ public class Game extends ApplicationAdapter {
private RoundData roundData;
private UI ui;
private SegmentUI segUi;
@Override
public void create() {
@ -41,6 +43,7 @@ public class Game extends ApplicationAdapter {
ui = new UI(50, 280, 10);
roundData = new RoundData(10);
segUi = new SegmentUI();
Face.setBlankFaceSprite(new Texture("blank_die_face.png"));
Face.setPipSprite(new Texture("pip.png"));
@ -115,6 +118,8 @@ public class Game extends ApplicationAdapter {
ui.render(batch);
segUi.render(batch);
batch.end();
}