Tabnine Logo
InputEventQueue.mouseMoved
Code IndexAdd Tabnine to your IDE (free)

How to use
mouseMoved
method
in
com.badlogic.gdx.InputEventQueue

Best Java code snippets using com.badlogic.gdx.InputEventQueue.mouseMoved (Showing top 3 results out of 315)

origin: libgdx/libgdx

  @Override
  public void invoke(long windowHandle, double x, double y) {			
    deltaX = (int)x - logicalMouseX;
    deltaY = (int)y - logicalMouseY;
    mouseX = logicalMouseX = (int)x;
    mouseY = logicalMouseY = (int)y;
    
    if(window.getConfig().hdpiMode == HdpiMode.Pixels) {
      float xScale = window.getGraphics().getBackBufferWidth() / (float)window.getGraphics().getLogicalWidth();
      float yScale = window.getGraphics().getBackBufferHeight() / (float)window.getGraphics().getLogicalHeight();				
      deltaX = (int)(deltaX * xScale);
      deltaY = (int)(deltaY * yScale);
      mouseX = (int)(mouseX * xScale);
      mouseY = (int)(mouseY * yScale);
    }
    
    Lwjgl3Input.this.window.getGraphics().requestRendering();
    if (mousePressed > 0) {								
      eventQueue.touchDragged(mouseX, mouseY, 0);
    } else {								
      eventQueue.mouseMoved(mouseX, mouseY);
    }            
  }
};
origin: libgdx/libgdx

  @Override
  public void invoke(long windowHandle, double x, double y) {			
    deltaX = (int)x - logicalMouseX;
    deltaY = (int)y - logicalMouseY;
    mouseX = logicalMouseX = (int)x;
    mouseY = logicalMouseY = (int)y;
    
    if(window.getConfig().hdpiMode == HdpiMode.Pixels) {
      float xScale = window.getGraphics().getBackBufferWidth() / (float)window.getGraphics().getLogicalWidth();
      float yScale = window.getGraphics().getBackBufferHeight() / (float)window.getGraphics().getLogicalHeight();				
      deltaX = (int)(deltaX * xScale);
      deltaY = (int)(deltaY * yScale);
      mouseX = (int)(mouseX * xScale);
      mouseY = (int)(mouseY * yScale);
    }
    
    Lwjgl3Input.this.window.getGraphics().requestRendering();
    if (mousePressed > 0) {								
      eventQueue.touchDragged(mouseX, mouseY, 0);
    } else {								
      eventQueue.mouseMoved(mouseX, mouseY);
    }            
  }
};
origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

  @Override
  public void invoke(long windowHandle, double x, double y) {			
    deltaX = (int)x - logicalMouseX;
    deltaY = (int)y - logicalMouseY;
    mouseX = logicalMouseX = (int)x;
    mouseY = logicalMouseY = (int)y;
    
    if(window.getConfig().hdpiMode == HdpiMode.Pixels) {
      float xScale = window.getGraphics().getBackBufferWidth() / (float)window.getGraphics().getLogicalWidth();
      float yScale = window.getGraphics().getBackBufferHeight() / (float)window.getGraphics().getLogicalHeight();				
      deltaX = (int)(deltaX * xScale);
      deltaY = (int)(deltaY * yScale);
      mouseX = (int)(mouseX * xScale);
      mouseY = (int)(mouseY * yScale);
    }
    
    Lwjgl3Input.this.window.getGraphics().requestRendering();
    if (mousePressed > 0) {								
      eventQueue.touchDragged(mouseX, mouseY, 0);
    } else {								
      eventQueue.mouseMoved(mouseX, mouseY);
    }            
  }
};
com.badlogic.gdxInputEventQueuemouseMoved

Popular methods of InputEventQueue

  • drain
  • getCurrentEventTime
  • keyDown
  • keyTyped
  • keyUp
  • next
  • queueTime
  • scrolled
  • setProcessor
  • touchDown
  • touchDragged
  • touchUp
  • touchDragged,
  • touchUp,
  • <init>

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • scheduleAtFixedRate (Timer)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Kernel (java.awt.image)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
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