Optimized frame repainting. Fixed mouse click processing.
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / RenderingContext.java
index afbe22d..2603c11 100644 (file)
@@ -9,7 +9,7 @@
 
 package eu.svjatoslav.sixth.e3d.gui;
 
-import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseClick;
+import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseEvent;
 import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
 
 import java.awt.*;
@@ -30,22 +30,15 @@ public class RenderingContext {
     final BufferedImage bufferedImage;
     public int frameNumber = 0;
 
-    /**
-     * 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.
-     */
-    public boolean doRender = true; // TODO: make use of the variable
-
     /**
      * Mouse click. During rendering we can detect which item user clicked on.
      */
-    public MouseClick mouseClick;
+    public MouseEvent mouseEvent;
 
     /**
      * Item that user clicked on.
      */
-    public MouseInteractionController clickedItem;
+    public MouseInteractionController objectUnderMouse;
 
     public RenderingContext(final int width, final int height) {
         this.width = width;