Formatting update
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / gui / humaninput / MouseEvent.java
1 /*
2  * Sixth 3D engine. Author: Svjatoslav Agejenko. 
3  * This project is released under Creative Commons Zero (CC0) license.
4  */
5 package eu.svjatoslav.sixth.e3d.gui.humaninput;
6
7 import eu.svjatoslav.sixth.e3d.geometry.Point2D;
8
9 public class MouseEvent {
10
11     public Point2D coordinate;
12
13     /**
14      * Indicates pressed mouse button. Except 0 that simply means mouse over
15      * given region.
16      */
17     public int button;
18
19     MouseEvent(final int x, final int y, final int button) {
20         this(new Point2D(x, y), button);
21     }
22
23     MouseEvent(final Point2D coordinate, final int button) {
24         this.coordinate = coordinate;
25         this.button = button;
26     }
27
28     @Override
29     public String toString() {
30         return "MouseEvent{" +
31                 "coordinate=" + coordinate +
32                 ", button=" + button +
33                 '}';
34     }
35 }