コード例 #1
0
  @Override
  protected void mouseMovedOrUp(int mouseX, int mouseY, int event) {
    mouseX -= guiLeft;
    mouseY -= guiTop;

    if (event == 0 || event == 1) {
      for (int i = _controls.size() - 1; i >= 0; i--) {
        Control c = _controls.get(i);
        if (!c.visible || !c.enabled) {
          continue;
        }
        c.onMouseReleased(mouseX, mouseY);
      }
    }

    mouseX += guiLeft;
    mouseY += guiTop;
    super.mouseMovedOrUp(mouseX, mouseY, event);
  }
コード例 #2
0
  /**
   * Called when the mouse is moved or a mouse button is released. Signature: (mouseX, mouseY,
   * which) which==-1 is mouseMove, which==0 or which==1 is mouseUp
   */
  protected void mouseMovedOrUp(int p_146286_1_, int p_146286_2_, int p_146286_3_) {
    if (p_146286_3_ == 0) {
      int l = p_146286_1_ - this.guiLeft;
      int i1 = p_146286_2_ - this.guiTop;
      CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
      int j1 = acreativetabs.length;

      for (int k1 = 0; k1 < j1; ++k1) {
        CreativeTabs creativetabs = acreativetabs[k1];

        if (creativetabs != null && this.func_147049_a(creativetabs, l, i1)) {
          this.setCurrentCreativeTab(creativetabs);
          return;
        }
      }
    }

    super.mouseMovedOrUp(p_146286_1_, p_146286_2_, p_146286_3_);
  }
コード例 #3
0
 @Override
 protected void mouseMovedOrUp(int par1, int par2, int par3) {
   // TODO Auto-generated method stub
   super.mouseMovedOrUp(par1, par2, par3);
 }