@Override public void init() { // remove the background layer added by default graphics().rootLayer().clear(); // add a grey square square = graphics().createSurfaceLayer(width, height); square.surface().setFillColor(Color.rgb(200, 200, 200)); square.surface().fillRect(0, 0, square.surface().width(), square.surface().height()); graphics().rootLayer().add(square); }
void nextTest() { currentTest = (currentTest + 1) % tests.length; // setup root layer for next test graphics().rootLayer().clear(); ImmediateLayer bg = graphics().createImmediateLayer(new ImmediateLayer.Renderer() { public void render(Surface surf) { surf.setFillColor(Color.rgb(255, 255, 255)); surf.fillRect(0, 0, graphics().width(), graphics().height()); } }); bg.setDepth(Float.NEGATIVE_INFINITY); // render behind everything graphics().rootLayer().add(bg); log().info("Starting " + currentTest().getName()); log().info(" Description: " + currentTest().getDescription()); currentTest().init(); }