44 lines
1.1 KiB
Java
44 lines
1.1 KiB
Java
package com.jalenwinslow.game.ui;
|
|
|
|
import com.badlogic.gdx.Gdx;
|
|
import com.badlogic.gdx.graphics.Texture;
|
|
import com.badlogic.gdx.graphics.g2d.Batch;
|
|
import com.badlogic.gdx.graphics.g2d.BitmapFont;
|
|
import com.jalenwinslow.game.Handler;
|
|
import com.jalenwinslow.game.utils.Assets;
|
|
|
|
/**
|
|
* Created by jalen on --/--/----.
|
|
*/
|
|
|
|
public class UIDebug extends UIObject {
|
|
|
|
//private BitmapFont font;
|
|
public String msg;
|
|
private String debugMsg;
|
|
|
|
public UIDebug(Handler handler, Texture texture, float x, float y, boolean visible) {
|
|
super(handler, texture, x, y, visible);
|
|
//font = new BitmapFont(Gdx.files.internal(Assets.customPixelFont1));
|
|
//font.setColor(1, 0, 0, 1);
|
|
//font.getData().scale(2f);
|
|
msg = "";
|
|
debugMsg = "Debugger: ";
|
|
}
|
|
|
|
@Override
|
|
public void update(float dt) {
|
|
debugMsg = "Debugger(FPS:" + Gdx.graphics.getFramesPerSecond() + "): " + msg;
|
|
}
|
|
|
|
@Override
|
|
public void draw(Batch batch, float parentAlpha) {
|
|
//font.draw(batch, debugMsg, pos.x, pos.y);
|
|
}
|
|
|
|
public void dispose() {
|
|
//font.dispose();
|
|
remove();
|
|
}
|
|
}
|