Components now can be clicked
[Mograsim.git] / LogicUI / src / era / mi / components / gui / BasicGUIComponent.java
index 55929b9..db586a2 100644 (file)
@@ -16,6 +16,13 @@ public interface BasicGUIComponent
         * Used for calculating which component is clicked.\r
         */\r
        public Rectangle getBounds();\r
+       /**\r
+        * Called when this component is clicked. Relative coordinates of the click are given.\r
+        */\r
+       public default boolean clicked(double x, double y)\r
+       {\r
+               return false;\r
+       }\r
 \r
        //TODO this code will be replaced by code in BasicComponent.\r
        /**\r