-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: quick replace glyph via num key
- Loading branch information
1 parent
4d2db3e
commit 7f4fbe0
Showing
2 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/com/hollingsworth/arsnouveau/common/util/GuiUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.hollingsworth.arsnouveau.common.util; | ||
|
||
import net.minecraft.client.gui.components.AbstractWidget; | ||
|
||
public class GuiUtils { | ||
|
||
public static boolean isMouseInRelativeRange(int mouseX, int mouseY, AbstractWidget widget){ | ||
return isMouseInRelativeRange(mouseX, mouseY, widget.x, widget.y, widget.getWidth(), widget.getHeight()); | ||
} | ||
|
||
public static boolean isMouseInRelativeRange(int mouseX, int mouseY, int x, int y, int w, int h) { | ||
return mouseX >= x && mouseX <= x + w && mouseY >= y && mouseY <= y + h; | ||
} | ||
} |