Package cofh.lib.gui.element

Examples of cofh.lib.gui.element.TabBase


        }
        if (c.onMouseWheel(mouseX, mouseY, wheelMovement)) {
          return;
        }
      }
      TabBase tab = getTabAtPosition(mouseX, mouseY);

      if (tab != null && tab.onMouseWheel(mouseX, mouseY, wheelMovement)) {
        return;
      }
    }
    super.handleMouseInput();
  }
View Full Code Here


      }
      if (c.onMousePressed(mX, mY, mouseButton)) {
        return;
      }
    }
    TabBase tab = getTabAtPosition(mX, mY);
    if (tab != null && !tab.onMousePressed(mX, mY, mouseButton)) {
      for (int i = tabs.size(); i-- > 0;) {
        TabBase other = tabs.get(i);
        if (other != tab && other.open && other.side == tab.side) {
          other.toggleOpen();
        }
      }
      tab.toggleOpen();
      return;
    }
View Full Code Here

    }
    int yPosRight = 4;
    int yPosLeft = 4;

    for (int i = 0; i < tabs.size(); i++) {
      TabBase tab = tabs.get(i);
      tab.update();
      if (!tab.isVisible()) {
        continue;
      }
      // TODO: convert these over to foreground/background (maybe logic for top/bottom tabs?)
      if (tab.side == TabBase.LEFT) {
        tab.draw(0, yPosLeft);
        yPosLeft += tab.currentHeight;
      } else {
        tab.draw(xSize, yPosRight);
        yPosRight += tab.currentHeight;
      }
    }
  }
View Full Code Here

    return tooltip;
  }

  public void addTooltips(List<String> tooltip) {

    TabBase tab = getTabAtPosition(mouseX, mouseY);

    if (tab != null) {
      tab.addTooltip(tooltip);
    }
    ElementBase element = getElementAtPosition(mouseX, mouseY);

    if (element != null) {
      element.addTooltip(tooltip);
View Full Code Here

    int xShift = 0;
    int yShift = 4;

    for (int i = 0; i < tabs.size(); i++) {
      TabBase tab = tabs.get(i);
      if (!tab.isVisible() || tab.side == TabBase.RIGHT) {
        continue;
      }
      tab.currentShiftX = xShift;
      tab.currentShiftY = yShift;
      if (tab.intersectsWith(mX, mY, xShift, yShift)) {
        return tab;
      }
      yShift += tab.currentHeight;
    }

    xShift = xSize;
    yShift = 4;

    for (int i = 0; i < tabs.size(); i++) {
      TabBase tab = tabs.get(i);
      if (!tab.isVisible() || tab.side == TabBase.LEFT) {
        continue;
      }
      tab.currentShiftX = xShift;
      tab.currentShiftY = yShift;
      if (tab.intersectsWith(mX, mY, xShift, yShift)) {
        return tab;
      }
      yShift += tab.currentHeight;
    }
    return null;
View Full Code Here

TOP

Related Classes of cofh.lib.gui.element.TabBase

Copyright © 2018 www.massapicom. 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.