X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=LogicUI%2Fsrc%2Fera%2Fmi%2Fcomponents%2Fgui%2FBasicGUIComponent.java;h=54384b9f5ba1195b470e56ee6a78ef64b681b9c4;hb=86d7bc9ea84aa04151da9725164f2b7ab9140fe3;hp=925fe4bc7fe7b7eeee8fc4ae164ac3772a57280d;hpb=8feb538ce6cd24b639838abc541cbcb91edce9ad;p=Mograsim.git diff --git a/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java b/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java index 925fe4bc..54384b9f 100644 --- a/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java +++ b/LogicUI/src/era/mi/components/gui/BasicGUIComponent.java @@ -16,6 +16,13 @@ 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. + */ + public default boolean clicked(double x, double y) + { + return false; + } //TODO this code will be replaced by code in BasicComponent. /**