コード例 #1
0
  @Override
  public void MouseMoved(MouseEvent mouseEvent) {
    // Is inside
    if (mouseEvent.position.x > m_size.x && mouseEvent.position.y > m_size.y) return;

    if (m_leftMouseHold) m_currentPan = Vector2i.sub(m_holdMousePos, mouseEvent.position);
  }
コード例 #2
0
 @Override
 public void clickedSomewhere(MouseEvent mouseEvent) {
   m_leftMouseHold = false;
   m_pan = Vector2i.add(m_pan, m_currentPan);
   m_currentPan = Vector2i.ZERO;
 }