public static void onTick() { if (waiting) { ScreenshotTaker.capture( VoxelCamCore.getConfig().getIntProperty(VoxelCamConfig.PHOTOWIDTH), VoxelCamCore.getConfig().getIntProperty(VoxelCamConfig.PHOTOHEIGHT), VoxelCamCore.getConfig().getStringProperty(VoxelCamConfig.BIGSCREENSHOTNAMINGMETHOD)); fbo.end(); fbo.dispose(); returnMinecraftToNormal(); Minecraft.getMinecraft().gameSettings.hideGUI = false; waiting = false; } }
@Test public void should_take_screenshot_of_Component_and_save_it_in_given_path() throws Exception { taker.saveComponentAsPng(window.button, imagePath); assertThat(read(imagePath)).hasSize(sizeOf(window.button)); }