package com.lucasdnd.ags.ui; import com.lucasdnd.ags.ui.components.Clickable; public class ListHeader extends ListColumn implements Clickable { /** * Simple Constructor * @param id * @param text * @param textAlignment * @param xPos * @param yPos * @param width * @param height */ protected ListHeader(int id, String text, int textAlignment, float xPos, float yPos, float width, float height) { super(id, text, textAlignment, xPos, yPos, width, height + 1f); this.isAvailable = true; } @Override public boolean gotLeftClicked(boolean leftMouseClicked, int mouseX, int mouseY) { return ((leftMouseClicked) && (mouseX >= xPos && mouseX <= xPos + width && mouseY >= yPos && mouseY <= yPos + height )); } @Override public boolean gotRightClicked(boolean rightMouseClicked, int mouseX, int mouseY) { return ((rightMouseClicked) && (mouseX >= xPos && mouseX <= xPos + width && mouseY >= yPos && mouseY <= yPos + height )); } }