- * Used to signal that actual rendering should be performed. It is useful to
- * skip rendering when we only want to detect mouse clicks intersections
- * without actually updating rendered frame.
+ * UI component that mouse is currently hovering over.
+ */
+ private MouseInteractionController objectPreviouslyUnderMouseCursor;
+
+ public void prepareForNewFrameRendering(){
+ mouseEvent = null;
+ currentObjectUnderMouseCursor = null;
+ }
+
+ /**
+ * Mouse click event that needs to be processed.
+ * This event is processed only once per frame.
+ * If there are multiple objects under mouse cursor, the top-most object will receive the event.
+ * If there are no objects under mouse cursor, the event will be ignored.
+ * If there is no event, this field will be null.
+ * This field is set to null after the event is processed.