congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
InputMultiplexer
Code IndexAdd Tabnine to your IDE (free)

How to use
InputMultiplexer
in
com.badlogic.gdx

Best Java code snippets using com.badlogic.gdx.InputMultiplexer (Showing top 20 results out of 315)

origin: libgdx/libgdx

public InputWrapper (Input input) {
  this.input = input;
  this.multiplexer = new InputMultiplexer();
  this.multiplexer.addProcessor(this);
  input.setInputProcessor(multiplexer);
}
origin: libgdx/libgdx

@Override
public void setInputProcessor (InputProcessor processor) {
  multiplexer.removeProcessor(lastProcessor);
  multiplexer.addProcessor(processor);
  lastProcessor = processor;
}
origin: libgdx/libgdx

@Override
public void create () {
  super.create();
  createHUD();
  Gdx.input.setInputProcessor(new InputMultiplexer(hud, this, inputController));
}
origin: libgdx/libgdx

@Override
public void create () {
  setupScene();
  setupUI();
  setupShaders();
  multiplexer.addProcessor(ui);
  multiplexer.addProcessor(controller);
  Gdx.input.setInputProcessor(multiplexer);
  // renderer = new ImmediateModeRenderer20(false, true, 0);
}
origin: lycying/c2d-engine

@Override
public InputProcessor getInputProcessor() {
  input.clear();
  input.addProcessor(this);
  input.addProcessor(bodySelectInput);
  return input;
}
origin: langurmonkey/gaiasky

Gdx.app.postRunnable(() -> {
  if (!im.getProcessors().contains(inputController, true))
    im.addProcessor(im.size(), inputController);
Gdx.app.postRunnable(() -> {
  im.removeProcessor(inputController);
origin: stackoverflow.com

redStage = new Stage();
blackStage = new Stage();
plexer = new InputMultiplexer();
plexer.addProcessor(hudStage);
final TextButton switchButton = new TextButton("switch",skin);
switchButton.addListener(new ClickListener(){
      plexer.removeProcessor(redStage);
      plexer.addProcessor(blackStage);
      plexer.addProcessor(redStage);
      plexer.removeProcessor(blackStage);
origin: stackoverflow.com

 InputMultiplexer inputMultiplexer = (InputMultiplexer) Gdx.input.getInputProcessor();
if (!inputMultiplexer.getProcessors().contains(stageMainMenu))
  inputMultiplexer.addProcessor(stageMainMenu);
origin: libgdx/libgdx

  @Override
  public void clicked (InputEvent event, float x, float y) {
    ((InputWrapper)Gdx.input).multiplexer.removeProcessor(ui);
    test = instancer.instance();
    Gdx.app.log("GdxTestGwt", "Clicked on " + test.getClass().getName());
    test.create();
    test.resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
  }
});
origin: nifty-gui/nifty-gui

@Nonnull
public Array<InputProcessor> getCustomProcessors() {
 return nonNiftyCustomInputMultiplexer.getProcessors();
}
origin: nifty-gui/nifty-gui

public void clearCustomProcessors() {
 nonNiftyCustomInputMultiplexer.clear();
}
origin: com.github.nifty-gui/nifty-libgdx-renderer

public int getCustomProcessorCount() {
 return nonNiftyCustomInputMultiplexer.size();
}
origin: libgdx/libgdx

@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);
}
origin: libgdx/libgdx

((InputWrapper)Gdx.input).multiplexer.addProcessor(ui);
origin: jmrapp1/SpaceInvaders

public void clearProcessors() {
  processors.clear();
  processors.addProcessor(new GestureDetector(this));
  Gdx.input.setInputProcessor(processors);
}
origin: langurmonkey/gaiasky

Gdx.app.postRunnable(() -> {
  if (!im.getProcessors().contains(inputController, true))
    im.addProcessor(im.size(), inputController);
  Gdx.app.postRunnable(() -> {
    im.removeProcessor(inputController);
origin: nifty-gui/nifty-gui

public void removeCustomProcessor(final int index) {
 nonNiftyCustomInputMultiplexer.removeProcessor(index);
}
origin: com.github.nifty-gui/nifty-libgdx-renderer

@Nonnull
public Array<InputProcessor> getCustomProcessors() {
 return nonNiftyCustomInputMultiplexer.getProcessors();
}
origin: com.github.nifty-gui/nifty-libgdx-renderer

public void clearCustomProcessors() {
 nonNiftyCustomInputMultiplexer.clear();
}
origin: nifty-gui/nifty-gui

public int getCustomProcessorCount() {
 return nonNiftyCustomInputMultiplexer.size();
}
com.badlogic.gdxInputMultiplexer

Javadoc

An InputProcessor that delegates to an ordered list of other InputProcessors. Delegation for an event stops if a processor returns true, which indicates that the event was handled.

Most used methods

  • addProcessor
  • <init>
  • removeProcessor
  • clear
  • getProcessors
  • size
  • setProcessors

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • onRequestPermissionsResult (Fragment)
  • setScale (BigDecimal)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JList (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now