@Override public void create () { // Gdx.input = new RemoteInput(); Gdx.input.setInputProcessor(this); // Gdx.input.setCursorCatched(true); }
public RemoteSender (String ip, int port) { try { Socket socket = new Socket(ip, port); socket.setTcpNoDelay(true); socket.setSoTimeout(3000); out = new DataOutputStream(socket.getOutputStream()); out.writeBoolean(Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen)); connected = true; Gdx.input.setInputProcessor(this); } catch (Exception e) { Gdx.app.log("RemoteSender", "couldn't connect to " + ip + ":" + port); } }
public RemoteSender (String ip, int port) { try { Socket socket = new Socket(ip, port); socket.setTcpNoDelay(true); socket.setSoTimeout(3000); out = new DataOutputStream(socket.getOutputStream()); out.writeBoolean(Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen)); connected = true; Gdx.input.setInputProcessor(this); } catch (Exception e) { Gdx.app.log("RemoteSender", "couldn't connect to " + ip + ":" + port); } }
@Override public void create () { renderer = new ShapeRenderer(); Gdx.input.setInputProcessor(this); Gdx.app.setLogLevel(Application.LOG_DEBUG); }
public InputWrapper (Input input) { this.input = input; this.multiplexer = new InputMultiplexer(); this.multiplexer.addProcessor(this); input.setInputProcessor(multiplexer); }
public void create () { batch = new SpriteBatch(); font = new BitmapFont(); text = ""; Gdx.input.setInputProcessor(this); // Gdx.input.setOnscreenKeyboardVisible(true); }
@Override public void create () { super.create(); createHUD(); Gdx.input.setInputProcessor(new InputMultiplexer(hud, this, inputController)); }
@Override public void create () { batch = new SpriteBatch(); font = new BitmapFont(); Gdx.input.setInputProcessor(this); glProfiler = new GLProfiler(Gdx.graphics); }
@Override public void create () { setupScene(); setupUI(); setupShaders(); multiplexer.addProcessor(ui); multiplexer.addProcessor(controller); Gdx.input.setInputProcessor(multiplexer); // renderer = new ImmediateModeRenderer20(false, true, 0); }
@Override public void create () { if (this.app == null) { this.app = Gdx.app; Box2DTest test = tests[testIndex]; test.create(); } InputMultiplexer multiplexer = new InputMultiplexer(); multiplexer.addProcessor(this); multiplexer.addProcessor(new GestureDetector(this)); Gdx.input.setInputProcessor(multiplexer); }
@Override public void create () { Gdx.app.log("Multitouch", "multitouch supported: " + Gdx.input.isPeripheralAvailable(Peripheral.MultitouchScreen)); renderer = new ShapeRenderer(); camera = new OrthographicCamera(); viewport = new ScreenViewport(camera); Gdx.input.setInputProcessor(this); }
public void create () { stage = new Stage(); Gdx.input.setInputProcessor(stage); Skin skin = new Skin(Gdx.files.internal("data/uiskin.json")); touchpad = new Touchpad(20, skin); touchpad.setBounds(15, 15, 100, 100); stage.addActor(touchpad); }
@Override public void resize (int width, int height) { Gdx.input.setInputProcessor(new InputMultiplexer(ui, cameraInputController)); Gdx.gl.glViewport(0, 0, width, height); worldCamera.viewportWidth = width; worldCamera.viewportHeight = height; worldCamera.update(); ui.getViewport().setWorldSize(width, height); ui.getViewport().update(width, height, true); }
@Override public void resize (int width, int height) { Gdx.input.setInputProcessor(new InputMultiplexer(ui, cameraInputController)); Gdx.gl.glViewport(0, 0, width, height); worldCamera.viewportWidth = width; worldCamera.viewportHeight = height; worldCamera.update(); ui.getViewport().setWorldSize(width, height); ui.getViewport().update(width, height, true); }
@Override public void create () { texture = new Texture("data/stones.jpg"); batch = new SpriteBatch(); camera = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); controller = new CameraController(); gestureDetector = new GestureDetector(20, 40, 0.5f, 2, 0.15f, controller); Gdx.input.setInputProcessor(gestureDetector); }
@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 () { 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 () { if (assets == null) assets = new AssetManager(); modelBatch = new ModelBatch(); cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); cam.position.set(10f, 10f, 10f); cam.lookAt(0, 0, 0); cam.near = 0.1f; cam.far = 1000f; cam.update(); createAxes(); Gdx.input.setInputProcessor(inputController = new CameraInputController(cam)); }
public void create () { Batch batch = new CpuSpriteBatch(); // batch = new SpriteBatch(); stage = new Stage(new ExtendViewport(500, 500), batch); Gdx.input.setInputProcessor(stage); texture = new Texture("data/bobargb8888-32x32.png"); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); TextureRegionDrawable drawable = new TextureRegionDrawable(new TextureRegion(texture)); for (int i = 0; i < NUM_GROUPS; i++) { Group group = createActorGroup(drawable); stage.addActor(group); } }
@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(); }