Examples of TabBase


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

Examples of cofh.lib.gui.element.TabBase

      }
      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

Examples of cofh.lib.gui.element.TabBase

    }
    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

Examples of cofh.lib.gui.element.TabBase

    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

Examples of cofh.lib.gui.element.TabBase

    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

Examples of com.pahimar.repackage.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

Examples of com.pahimar.repackage.cofh.lib.gui.element.TabBase

            }
            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

Examples of com.pahimar.repackage.cofh.lib.gui.element.TabBase

        }
        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

Examples of com.pahimar.repackage.cofh.lib.gui.element.TabBase

        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

Examples of com.pahimar.repackage.cofh.lib.gui.element.TabBase

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