Changed license to Creative Commons Zero (CC0).
[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 *
6  */
7
8 package eu.svjatoslav.sixth.e3d.gui.humaninput;
9
10 import eu.svjatoslav.sixth.e3d.geometry.Point2D;
11
12 public class MouseEvent {
13
14     public Point2D coordinate;
15
16     /**
17      * Indicates pressed mouse button. Except 0 that simply means mouse over
18      * given region.
19      */
20     public int button;
21
22     MouseEvent(final int x, final int y, final int button) {
23         this(new Point2D(x, y), button);
24     }
25
26     MouseEvent(final Point2D coordinate, final int button) {
27         this.coordinate = coordinate;
28         this.button = button;
29     }
30
31     @Override
32     public String toString() {
33         return "MouseEvent{" +
34                 "coordinate=" + coordinate +
35                 ", button=" + button +
36                 '}';
37     }
38 }