blob: da18cfc9709a6cd73f24d92bb7ba6cafda2ac843 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package me.shedaniel.rei.gui.widget;
import java.awt.*;
public interface HighlightableWidget extends IWidget {
public Rectangle getBounds();
default boolean isHighlighted(int mouseX, int mouseY) {
return getBounds().contains(mouseX, mouseY);
}
default boolean isHighlighted(Point point) {
return this.isHighlighted(point.x, point.y);
}
default boolean isHighlighted(double mouseX, double mouseY) {
return this.isHighlighted((int) mouseX, (int) mouseY);
}
}
|