use of buildcraft.core.lib.gui.widgets.Widget in project BuildCraft by BuildCraft.
the class GuiBuildCraft method mouseClicked.
// / MOUSE CLICKS
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
int mX = mouseX - guiLeft;
int mY = mouseY - guiTop;
for (Widget widget : container.getWidgets()) {
if (widget.hidden) {
continue;
} else if (!widget.isMouseOver(mX, mY)) {
continue;
} else if (widget.handleMouseClick(mX, mY, mouseButton)) {
return;
}
}
super.mouseClicked(mouseX, mouseY, mouseButton);
// / Handle ledger clicks
ledgerManager.handleMouseClicked(mouseX, mouseY, mouseButton);
}
use of buildcraft.core.lib.gui.widgets.Widget in project BuildCraft by BuildCraft.
the class GuiBuildCraft method mouseReleased.
@Override
protected void mouseReleased(int mouseX, int mouseY, int eventType) {
super.mouseReleased(mouseX, mouseY, eventType);
int mX = mouseX - guiLeft;
int mY = mouseY - guiTop;
for (Widget widget : container.getWidgets()) {
if (widget.hidden) {
continue;
}
widget.handleMouseRelease(mX, mY, eventType);
}
}
use of buildcraft.core.lib.gui.widgets.Widget in project BuildCraft by BuildCraft.
the class GuiBuildCraft method mouseClickMove.
@Override
protected void mouseClickMove(int mouseX, int mouseY, int mouseButton, long time) {
int mX = mouseX - guiLeft;
int mY = mouseY - guiTop;
for (Widget widget : container.getWidgets()) {
if (widget.hidden) {
continue;
}
widget.handleMouseMove(mX, mY, mouseButton, time);
}
Slot slot = getSlotAtPosition(mouseX, mouseY);
if (mouseButton == 1 && slot instanceof IPhantomSlot) {
return;
}
super.mouseClickMove(mouseX, mouseY, mouseButton, time);
}
Aggregations