/** * @param xrel X position within this component * @param yrel Y position within this component * @return true if click was handled by this component, false otherwise. */ public boolean handleClick(int xrel, int yrel) { // This method should be overriden by ANY interactive component for (MenuComponent mc : components) { if (mc.handleClick(xrel, yrel)) { return true; } } return false; }
/** * @param xmod X position of parent component * @param ymod Y position of parent component */ public void draw() { // This method should be overriden by ANY visual component for (MenuComponent mc : components) { mc.draw(); } }