コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
 /**
  * @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();
   }
 }