Tabnine Logo
Platform.input
Code IndexAdd Tabnine to your IDE (free)

How to use
input
method
in
playn.core.Platform

Best Java code snippets using playn.core.Platform.input (Showing top 8 results out of 315)

origin: threerings/tripleplay

protected void setInputEnabled (boolean enabled) {
  _game.plat.input().mouseEnabled = enabled;
  _game.plat.input().touchEnabled = enabled;
}
origin: threerings/tripleplay

protected Input input () { return game().plat.input(); }
protected Json json () { return game().plat.json(); }
origin: io.playn/playn-core

if (plat.input().hasTouch()) {
 plat.input().touchEvents.connect(new Slot<Touch.Event[]>() {
  private int active = -1;
  @Override public void onEmit (Touch.Event[] events) {
else if (plat.input().hasMouse()) {
 plat.input().mouseEvents.connect(new Slot<Mouse.Event>() {
  private boolean dragging;
  @Override public void onEmit (Mouse.Event event) {
origin: playn/playn

if (plat.input().hasTouch()) {
 plat.input().touchEvents.connect(new Slot<Touch.Event[]>() {
  private int active = -1;
  @Override public void onEmit (Touch.Event[] events) {
else if (plat.input().hasMouse()) {
 plat.input().mouseEvents.connect(new Slot<Mouse.Event>() {
  private boolean dragging;
  @Override public void onEmit (Mouse.Event event) {
origin: threerings/tripleplay

  public MenuRoot (Interface iface, Stylesheet sheet, Pop pop) {
    super(iface, new RootLayout(iface.plat.input().hasTouch()), sheet);
    this.pop = pop;
    layer.setDepth(1);
    layer.setHitTester(null); // get hits from out of bounds
    add(pop.menu);
  }
}
origin: threerings/tripleplay

protected void startEdit () {
  if (hasNative()) {
    updateMode(true);
    _nativeField.focus();
  } else {
    // TODO: multi-line keyboard.getText
    root().iface.plat.input().getText(_textType, _popupLabel, text.get()).
      onSuccess(new Slot<String>() {
        @Override public void onEmit (String result) {
          // null result is a canceled entry dialog
          if (result != null) text.update(result);
          _finishedEditing.emit(result != null);
        }
      });
  }
}
origin: threerings/tripleplay

  public TripleDemo (Platform plat) {
    super(plat, 25); // update our "simulation" 40 times per second
    game = this;     // jam ourselves into a global variable, woo!
    new Pointer(plat, rootLayer, true);        // wire up event dispatch
    screens.push(new DemoMenuScreen(screens)); // start off with our menu screen

    // show debug rectangles when D key is pressed; dump scene graph on shift-D
    plat.input().keyboardEvents.collect(Keyboard.isKey(Key.D)).connect(event -> {
      Layer.DEBUG_RECTS = event.down;
      if (event.down && event.isShiftDown()) {
       rootLayer.debugPrint(plat.log());
      }
    });
  }
}
origin: playn/playn

assets = plat.assets();
graphics = plat.graphics();
input = plat.input();
log = plat.log();
net = plat.net();
playn.corePlatforminput

Javadoc

Returns the Input service.

Popular methods of Platform

  • log
    Returns the Log service.
  • graphics
    Returns the Graphics service.
  • assets
    Returns the Assets service.
  • invokeLater
  • exec
    Returns the Exec service.
  • json
    Returns the Json service.
  • storage
    Returns the Storage storage service.
  • time
    Returns the current time, as a double value in millis since January 1, 1970, 00:00:00 GMT. This is e
  • type
    Returns the platform Platform.Type.
  • net
    Returns the Net service.
  • reportError
    Called when a backend (or other framework code) encounters an exception that it can recover from, bu
  • setPropagateEvents
  • reportError,
  • setPropagateEvents,
  • tick,
  • audio,
  • dispatchEvent,
  • keyboard,
  • mouse,
  • openURL,
  • pointer

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • CodeWhisperer alternatives
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