diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-01-09 23:35:45 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-01-09 23:35:45 +0800 |
| commit | 1b21d26487636e50d03979acd5ca4a2a07761a25 (patch) | |
| tree | d7d066b4e7491474f3a962593e97a2d6f0aa2ea2 /src/main/java/me/shedaniel/gui/Drawable.java | |
| parent | 77af6b3f548d34bfdafc585847d3d80ec783c7e7 (diff) | |
| download | RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.tar.gz RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.tar.bz2 RoughlyEnoughItems-1b21d26487636e50d03979acd5ca4a2a07761a25.zip | |
Starting off rewrite
Diffstat (limited to 'src/main/java/me/shedaniel/gui/Drawable.java')
| -rwxr-xr-x | src/main/java/me/shedaniel/gui/Drawable.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/main/java/me/shedaniel/gui/Drawable.java b/src/main/java/me/shedaniel/gui/Drawable.java deleted file mode 100755 index a2e5740a4..000000000 --- a/src/main/java/me/shedaniel/gui/Drawable.java +++ /dev/null @@ -1,35 +0,0 @@ -package me.shedaniel.gui; - -import me.shedaniel.api.IDrawable; -import me.shedaniel.gui.widget.Control; - -import java.awt.*; - -/** - * Created by James on 7/28/2018. - */ -public abstract class Drawable implements IDrawable { - - protected Rectangle rect; - - public Drawable(int x, int y, int width, int height) { - rect = new Rectangle(x, y, width, height); - } - - public Drawable(Rectangle rect) { - this.rect = rect; - } - - public abstract void draw(); - - public boolean isHighlighted() { - Point mousePoint = REIRenderHelper.getMouseLoc(); - if (rect.contains(mousePoint.x, mousePoint.y)) { - if (this instanceof Control) - REIRenderHelper.reiGui.setLastHovered((Control) this); - return true; - } - return false; - } - -} |
