36 lines
924 B
Java
36 lines
924 B
Java
package de.samdev.colorrunner.screens.menu.impl.elements;
|
|
|
|
import com.badlogic.gdx.Gdx;
|
|
import com.badlogic.gdx.graphics.Color;
|
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
|
|
import com.badlogic.gdx.math.Rectangle;
|
|
|
|
import de.samdev.colorrunner.game.renderer.CRAssets;
|
|
import de.samdev.colorrunner.screens.menu.BaseMenuElement;
|
|
|
|
public class CRMenuRectangle extends BaseMenuElement {
|
|
|
|
public final Rectangle Bounds;
|
|
public final Color Color;
|
|
|
|
public CRMenuRectangle(float x, float y, float w, float h, Color c) {
|
|
Bounds = new Rectangle(x, y, w, h);
|
|
Color = c;
|
|
}
|
|
|
|
@Override
|
|
public void render(SpriteBatch batch) {
|
|
|
|
batch.setColor(Color);
|
|
batch.draw(CRAssets.TEX_BLANK, Bounds.x, Bounds.y, Bounds.width, Bounds.height);
|
|
batch.setColor(0);
|
|
|
|
}
|
|
|
|
@Override
|
|
public void update(float delta) {
|
|
//Gdx.app.log("crmenurect", "> " + delta);
|
|
}
|
|
|
|
}
|