@Override public void create () { font = new BitmapFont(); batch = new SpriteBatch(); }
@Override public void create () { batch = new SpriteBatch(); font = new BitmapFont(); }
@Override public void create () { batch = new SpriteBatch(); font = new BitmapFont(Gdx.files.internal("data/utf-font.fnt")); }
@Override public void create () { font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false); batch = new SpriteBatch(); }
public void create () { batch = new SpriteBatch(); font = new BitmapFont(); text = ""; Gdx.input.setInputProcessor(this); // Gdx.input.setOnscreenKeyboardVisible(true); }
@Override public void create () { spriteBatch = new SpriteBatch(); atlas = new TextureAtlas("data/pack"); smallFont = new BitmapFont(); font = new BitmapFont(Gdx.files.internal("data/verdana39.fnt"), atlas.findRegion("verdana39"), false); font = new BitmapFont(Gdx.files.internal("data/arial-32-pad.fnt"), false); renderer = new ShapeRenderer(); renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix()); }
@Override public void create () { batch = new SpriteBatch(); font = new BitmapFont(); Gdx.input.setInputProcessor(this); glProfiler = new GLProfiler(Gdx.graphics); }
@Override public void create () { font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false); batch = new SpriteBatch(); texture = new Texture(Gdx.files.internal("data/badlogicsmall.jpg")); }
@Override public void create () { batch = new SpriteBatch(); font = new BitmapFont(); tex = new Texture(Gdx.files.internal("data/badlogic.jpg")); DisplayMode[] modes = Gdx.graphics.getDisplayModes(); for (DisplayMode mode : modes) { System.out.println(mode); } Gdx.app.log("FullscreenTest", Gdx.graphics.getBufferFormat().toString()); }
/** Generates a new {@link BitmapFont}. The size is expressed in pixels. Throws a GdxRuntimeException if the font could not be * generated. Using big sizes might cause such an exception. * @param parameter configures how the font is generated */ public BitmapFont generateFont (FreeTypeFontParameter parameter, FreeTypeBitmapFontData data) { boolean updateTextureRegions = data.regions == null && parameter.packer != null; if (updateTextureRegions) data.regions = new Array(); generateData(parameter, data); if (updateTextureRegions) parameter.packer.updateTextureRegions(data.regions, parameter.minFilter, parameter.magFilter, parameter.genMipMaps); if (data.regions.isEmpty()) throw new GdxRuntimeException("Unable to create a font with no texture regions."); BitmapFont font = new BitmapFont(data, data.regions, true); font.setOwnsTexture(parameter.packer == null); return font; }
public void create () { renderer = new ShapeRenderer(); cam = new PerspectiveCamera(47, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); cam.position.set(0, 0, 2); cam.near = 0.1f; controller = new PerspectiveCamController(cam); Gdx.input.setInputProcessor(controller); batch = new SpriteBatch(); font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false); }
@Override public void create () { world = new World(new Vector2(0, -40), true); renderer = new Box2DDebugRenderer(); cam = new OrthographicCamera(28, 20); createWorld(); Gdx.input.setInputProcessor(this); batch = new SpriteBatch(); font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false); }
public void create () { TextureAtlas textureAtlas = new TextureAtlas("data/pack"); font = new BitmapFont(Gdx.files.internal("data/verdana39.fnt"), textureAtlas.findRegion("verdana39"), false); singleLineCache = new BitmapFontCache(font, true); multiLineCache = new BitmapFontCache(font, true); singleLineCacheNonInteger = new BitmapFontCache(font, false); multiLineCacheNonInteger = new BitmapFontCache(font, false); batch = new SpriteBatch(); fillCaches(); }
@Override public void create () { spriteBatch = new SpriteBatch(); atlas = new TextureAtlas("data/pack"); smallFont = new BitmapFont(); FreeTypeFontParameter parameter = new FreeTypeFontParameter(); parameter.size = 60; FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("data/arial.ttf")); font = generator.generateFont(parameter); generator.dispose(); renderer = new ShapeRenderer(); renderer.setProjectionMatrix(spriteBatch.getProjectionMatrix()); }
@Override public void create () { Texture texture = new Texture(Gdx.files.internal("data/layers.png")); layers = new TextureRegion[3]; layers[0] = new TextureRegion(texture, 0, 0, 542, 363); layers[1] = new TextureRegion(texture, 0, 363, 1024, 149); layers[2] = new TextureRegion(texture, 547, 0, 224, 51); camera = new ParallaxCamera(480, 320); controller = new OrthoCamController(camera); Gdx.input.setInputProcessor(controller); batch = new SpriteBatch(); font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false); }
public void create () { batch = new SpriteBatch(); batch.setProjectionMatrix(new Matrix4().setToOrtho2D(0, 0, 855, 480)); atlas = new TextureAtlas(Gdx.files.internal("data/issue_pack"), Gdx.files.internal("data/")); sprite = atlas.createSprite("map"); font = new BitmapFont(Gdx.files.internal("data/font.fnt"), Gdx.files.internal("data/font.png"), false); Gdx.gl.glClearColor(0, 1, 0, 1); }
@Override public void create () { float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new OrthographicCamera(); camera.setToOrtho(false, (w / h) * 10, 10); camera.update(); cameraController = new OrthoCamController(camera); Gdx.input.setInputProcessor(cameraController); font = new BitmapFont(); batch = new SpriteBatch(); map = new TmxMapLoader().load("data/maps/tiled/super-koalio/level1.tmx"); renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); }
@Override public void create () { float w = Gdx.graphics.getWidth(); float h = Gdx.graphics.getHeight(); camera = new OrthographicCamera(); camera.setToOrtho(false, (w / h) * 10, 10); camera.update(); cameraController = new OrthoCamController(camera); Gdx.input.setInputProcessor(cameraController); font = new BitmapFont(); batch = new SpriteBatch(); map = new TideMapLoader().load("data/maps/tide/Map01.tide"); renderer = new OrthogonalTiledMapRenderer(map, 1f / 32f); }
@Override public void create () { batch = new SpriteBatch(); texture = new Texture("data/badlogic.jpg"); region = new TextureRegion(texture); stage = new Stage(new ScreenViewport(), batch); Gdx.input.setInputProcessor(stage); skin = new Skin(Gdx.files.internal("data/uiskin.json")); skin.add("default", font = new BitmapFont(Gdx.files.internal("data/arial-32.fnt"), false)); populateTable(); Gdx.graphics.setContinuousRendering(false); Gdx.graphics.requestRendering(); }
public void create () { Gdx.app.setLogLevel(Application.LOG_ERROR); Resolution[] resolutions = {new Resolution(320, 480, ".320480"), new Resolution(480, 800, ".480800"), new Resolution(480, 856, ".480854")}; ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), resolutions); manager = new AssetManager(); manager.setLoader(Texture.class, new TextureLoader(resolver)); manager.setErrorListener(this); load(); Texture.setAssetManager(manager); batch = new SpriteBatch(); font = new BitmapFont(Gdx.files.internal("data/font.fnt"), false); }