mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 19:34:09 +00:00
Hovering System
This commit is contained in:
1 parent
728ab7313b
commit
48f7380913
2 files changed
+13
-3
No files matched your search
@@ -58,7 +58,7 @@ public class GuiMagicCycleMap extends GuiDiagram {
|
||||
setCurveAngle(-25);
|
||||
invalidateCache();
|
||||
|
||||
this.allowTwoWay = false;
|
||||
this.allowTwoWay = true;
|
||||
this.iconSize = 20;
|
||||
this.slotSize = iconSize + slotPadding;
|
||||
}
|
||||
|
||||
@@ -1288,7 +1288,12 @@ public abstract class GuiDiagram extends Gui {
|
||||
Point pTo = positions.get(conn.idTo);
|
||||
if (pFrom == null || pTo == null) continue;
|
||||
int ax = pFrom.x, ay = pFrom.y, bx = pTo.x, by = pTo.y;
|
||||
boolean dim = !selectedIconIds.isEmpty() && !(selectedIconIds.contains(conn.idFrom) && selectedIconIds.contains(conn.idTo));
|
||||
boolean dim;
|
||||
if (hoveredIconId != null) {
|
||||
dim = (conn.idFrom != hoveredIconId);
|
||||
} else {
|
||||
dim = !selectedIconIds.isEmpty() && !(selectedIconIds.contains(conn.idFrom) && selectedIconIds.contains(conn.idTo));
|
||||
}
|
||||
drawConnectionLine(ax, ay, bx, by, conn, dim);
|
||||
}
|
||||
for (DiagramIcon icon : getIcons()) {
|
||||
@@ -1316,7 +1321,12 @@ public abstract class GuiDiagram extends Gui {
|
||||
Point pTo = positions.get(conn.idTo);
|
||||
if (pFrom == null || pTo == null) continue;
|
||||
int ax = pFrom.x, ay = pFrom.y, bx = pTo.x, by = pTo.y;
|
||||
boolean dim = !selectedIconIds.isEmpty() && !(selectedIconIds.contains(conn.idFrom) && selectedIconIds.contains(conn.idTo));
|
||||
boolean dim;
|
||||
if (hoveredIconId != null) {
|
||||
dim = (conn.idFrom != hoveredIconId);
|
||||
} else {
|
||||
dim = !selectedIconIds.isEmpty() && !(selectedIconIds.contains(conn.idFrom) && selectedIconIds.contains(conn.idTo));
|
||||
}
|
||||
drawArrowHead(ax, ay, bx, by, conn, dim);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
Reference in new issue
Block a user