本文整理汇总了Java中com.enderio.core.api.client.gui.IGuiOverlay类的典型用法代码示例。如果您正苦于以下问题:Java IGuiOverlay类的具体用法?Java IGuiOverlay怎么用?Java IGuiOverlay使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IGuiOverlay类属于com.enderio.core.api.client.gui包,在下文中一共展示了IGuiOverlay类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleMouseInput
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
public void handleMouseInput() {
int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
int b = Mouse.getEventButton();
for (IGuiOverlay overlay : overlays) {
if (overlay != null && overlay.isVisible() && overlay.handleMouseInput(x, y, b)) {
return;
}
}
int delta = Mouse.getEventDWheel();
if (delta != 0) {
mouseWheel(x, y, delta);
}
super.handleMouseInput();
}
示例2: drawGuiContainerForegroundLayer
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
protected final void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
drawForegroundImpl(mouseX, mouseY);
Timer t = RenderUtil.getTimer();
if (t != null) {
GL11.glPushMatrix();
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GL11.glDisable(GL11.GL_DEPTH_TEST);
for (IGuiOverlay overlay : overlays) {
if (overlay != null && overlay.isVisible()) {
overlay.draw(realMx, realMy, t.renderPartialTicks);
}
}
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glPopMatrix();
}
}
示例3: initGui
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
public void initGui() {
super.initGui();
configB.visible = false;
redstoneButton.visible = false;
for (IGuiOverlay overlay : overlays) {
if (overlay instanceof GuiOverlayIoConfig) {
int x = getXSize() - 5 - BUTTON_SIZE;
int y = 5;
configB2 = new GuiButtonIoConfig(this, CONFIG_ID2, x, y, getTileEntity(), (GuiOverlayIoConfig) overlay);
configB2.onGuiInit();
break;
}
}
plus.onGuiInit();
minus.onGuiInit();
tab_mats.onGuiInit();
tab_enchant.onGuiInit();
getButtons[0].onGuiInit();
getButtons[1].onGuiInit();
getButtons[2].onGuiInit();
updateVisibility();
}
示例4: initGui
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
public void initGui() {
super.initGui();
int x = getGuiLeft() + 36;
int y = getGuiTop() + 43;
buttonList.add(createLockButton(TileFarmStation.minSupSlot + 0, x, y));
buttonList.add(createLockButton(TileFarmStation.minSupSlot + 1, x + 52, y));
buttonList.add(createLockButton(TileFarmStation.minSupSlot + 2, x, y + 20));
buttonList.add(createLockButton(TileFarmStation.minSupSlot + 3, x + 52, y + 20));
((FarmStationContainer) inventorySlots).createGhostSlots(getGhostSlotHandler());
showRangeB.onGuiInit();
showRangeB.setSelected(getTileEntity().isShowingRange());
for (IGuiOverlay overlay : overlays) {
if (overlay instanceof GuiOverlayIoConfig) {
overlay.getBounds().width -= EXTRA_WITH;
}
}
}
示例5: keyTyped
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
protected void keyTyped(char par1, int par2) {
if (par2 == 1) {
for (IGuiOverlay overlay : overlays) {
if (overlay.isVisible()) {
overlay.setIsVisible(false);
return;
}
}
mc.player.closeScreen();
}
for (int i = 0; i < tabs.size(); i++) {
if (i == activeTab) {
tabs.get(i).keyTyped(par1, par2);
return;
}
}
}
示例6: initGui
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
public void initGui() {
super.initGui();
fixupGuiPosition();
for (IGuiOverlay overlay : overlays) {
overlay.init(this);
}
for (TextFieldEnder f : textFields) {
f.init(this);
}
}
示例7: hideOverlays
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
public boolean hideOverlays() {
for (IGuiOverlay overlay : overlays) {
if (overlay.isVisible()) {
overlay.setVisible(false);
return true;
}
}
return false;
}
示例8: func_146978_c
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
@Override
protected boolean func_146978_c(int p_146978_1_, int p_146978_2_, int p_146978_3_, int p_146978_4_, int p_146978_5_, int p_146978_6_) {
int x = Mouse.getEventX() * this.width / this.mc.displayWidth;
int y = this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1;
for (IGuiOverlay overlay : overlays) {
if (overlay != null && overlay.isVisible() && overlay.isMouseInBounds(x, y)) {
return false;
}
}
return super.func_146978_c(p_146978_1_, p_146978_2_, p_146978_3_, p_146978_4_, p_146978_5_, p_146978_6_);
}
示例9: addOverlay
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
public void addOverlay(IGuiOverlay overlay) {
overlays.add(overlay);
}
示例10: removeOverlay
import com.enderio.core.api.client.gui.IGuiOverlay; //导入依赖的package包/类
public void removeOverlay(IGuiOverlay overlay) {
overlays.remove(overlay);
}