crayon icon indicating copy to clipboard operation
crayon copied to clipboard

cbx requires separate draw commands for text to work (unlike javascript)

Open TimJSwan89 opened this issue 5 years ago • 0 comments

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();
    }

TimJSwan89 avatar Oct 17 '19 23:10 TimJSwan89