X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fcomponents%2Fgui%2FBasicGUIComponent.java;h=47479b172bba3a822d06aeedf9a85b729830b637;hb=06b63dbefeb991fdb238ff9e7913acd9503318a5;hp=55929b9d6d332b55ab0af2e075d4c9e782b9e22e;hpb=12dce36e4b1b7ce0aba25ef698d262b588c8b53c;p=Mograsim.git diff --git a/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java b/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java index 55929b9d..47479b17 100644 --- a/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java +++ b/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java @@ -16,6 +16,14 @@ public interface BasicGUIComponent * Used for calculating which component is clicked. */ public Rectangle getBounds(); + /** + * Called when this component is clicked. Relative coordinates of the click are given. + * Returns true if this component has to be redrawn. + */ + public default boolean clicked(double x, double y) + { + return false; + } //TODO this code will be replaced by code in BasicComponent. /**