Examples of InputSystem


Examples of de.lessvoid.nifty.spi.input.InputSystem

    SlickCallable.enterSafeBlock();
    this.nifty = new Nifty(
        new SlickRenderDevice(container),
        new SlickSoundDevice(),
        new InputSystem() {
          public void forwardEvents(final NiftyInputConsumer inputEventConsumer) {
            for (MouseEvent event : mouseEvents) {
              event.processMouseEvents(inputEventConsumer);
            }
            mouseEvents.clear();
View Full Code Here

Examples of de.lessvoid.nifty.spi.input.InputSystem

    return title;
  }

  @Override
  public void init(GameContainer container) throws SlickException {
    nifty = new Nifty(new SlickRenderDevice(container), new SlickSoundDevice(), new InputSystem() {
      public void forwardEvents(final NiftyInputConsumer inputEventConsumer) {
        for (MouseEvent event : mouseEvents) {
          event.processMouseEvents(inputEventConsumer);
        }
        mouseEvents.clear();
View Full Code Here

Examples of org.terasology.input.InputSystem

        newState.init(this);
        for (StateChangeSubscriber subscriber : stateChangeSubscribers) {
            subscriber.onStateChange();
        }
        // drain input queues
        InputSystem inputSystem = CoreRegistry.get(InputSystem.class);
        inputSystem.getMouseDevice().getInputQueue();
        inputSystem.getKeyboard().getInputQueue();
    }
View Full Code Here

Examples of org.terasology.input.InputSystem

    private void initControls() {
        try {
            Keyboard.create();
            Keyboard.enableRepeatEvents(true);
            Mouse.create();
            InputSystem inputSystem = CoreRegistry.putPermanently(InputSystem.class, new InputSystem());
            inputSystem.setMouseDevice(new LwjglMouseDevice());
            inputSystem.setKeyboardDevice(new LwjglKeyboardDevice());
        } catch (LWJGLException e) {
            throw new RuntimeException("Could not initialize controls.", e);
        }
    }
View Full Code Here

Examples of org.terasology.input.InputSystem

    @Override
    public void dispose() {
    }

    private void initControls() {
        InputSystem inputSystem = new InputSystem();
        CoreRegistry.putPermanently(InputSystem.class, inputSystem);
    }
View Full Code Here

Examples of org.terasology.input.InputSystem

        CameraTargetSystem cameraTargetSystem = new CameraTargetSystem();
        CoreRegistry.put(CameraTargetSystem.class, cameraTargetSystem);
        componentSystemManager.register(cameraTargetSystem, "engine:CameraTargetSystem");

        BindsConfig bindsConfig = CoreRegistry.get(Config.class).getInput().getBinds();
        InputSystem inputSystem = CoreRegistry.get(InputSystem.class);
        componentSystemManager.register(inputSystem, "engine:InputSystem");

        bindsConfig.applyBinds(inputSystem, moduleManager);

        return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.