crayon
crayon copied to clipboard
cbx requires separate draw commands for text to work (unlike javascript)
import Game;
import Graphics2D;
import Graphics2DText;
function main() {
//Uncomment the following line to allow cbx to work.
//Draw.line(5, 5, 30, 30, 2, 240, 100, 240);
window = new GameWindow("λ++", 40, 500, 500);
fontresource = FontResource.fromSystem("Courier New");
renderer = new FontRenderer(fontresource);
while(true) {
texture = renderer.render("This isn't printed in cbx (but it is in javascript)");
texture.draw(20, 20);
window.clockTick();
}