@Override public void drawScreen(final int mouseX, final int mouseY, final float btn) { super.drawScreen(mouseX, mouseY, btn); final boolean hasClicked = Mouse.isButtonDown(0); if (hasClicked && this.scrollBar != null) { this.scrollBar.click(this, mouseX - this.guiLeft, mouseY - this.guiTop); } for (final Object c : this.buttonList) { if (c instanceof ITooltip) { final ITooltip tooltip = (ITooltip) c; final int x = tooltip.xPos(); // ((GuiImgButton) c).xPosition; int y = tooltip.yPos(); // ((GuiImgButton) c).yPosition; if (x < mouseX && x + tooltip.getWidth() > mouseX && tooltip.isVisible()) { if (y < mouseY && y + tooltip.getHeight() > mouseY) { if (y < 15) { y = 15; } final String msg = tooltip.getMessage(); if (msg != null) { this.drawTooltip(x + 11, y + 4, 0, msg); } } } } } }
@Override public void drawScreen(int mouseX, int mouseY, float f1) { this.mouseX = mouseX - (width - xSize) / 2; this.mouseY = mouseY - (height - ySize) / 2; super.drawScreen(mouseX, mouseY, f1); }
public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); boolean op = false; // TODO: Check if player is OP if (Keyboard.isKeyDown(Keyboard.KEY_O) && op) { player.openGui(ModUncrafting.instance, 1, worldObj, x, y, z); } }
@Override public void drawScreen(int x, int y, float f) { super.drawScreen(x, y, f); this.drawToolTips(x, y, FluidRegistry.WATER, 29, 26); this.drawToolTips(x, y, FluidRegistry.LAVA, 49, 26); this.drawToolTips(x, y, AMBlocks.pymParticles, 185, 26); }
@Override public void drawScreen(int mouseX, int mouseY, float par3) { boolean flag = Mouse.isButtonDown(0); if (flag) { if (!clicked) { int x = mouseX - guiLeft - 56; int y = mouseY - guiTop - 7; if (0 <= x && x < 130 && 0 <= y && y < 105) { System.out.println(String.format("%d %d", x, y)); int value = scroller.getValue(); int index = ((value + y) / 16) % 16; isMoveGui[index] = !isMoveGui[index]; } clicked = true; } } else { clicked = false; } if (scroller.mouseOver(mouseX, mouseY)) { scroller.scrollTo(flag, mouseX, mouseY); } super.drawScreen(mouseX, mouseY, par3); }
@Override public void drawScreen(int mouseX, int mouseY, float ticks) { super.drawScreen(mouseX, mouseY, ticks); int i = 0; if (prevHover.checkHover(mouseX, mouseY)) { i = -1; } else if (nextHover.checkHover(mouseX, mouseY)) { i = 1; } if (container.isRecipes() && i != 0) { ItemStack stack = container.getNextRecipe(i); drawCreativeTabHoveringText(stack.getDisplayName(), mouseX, mouseY); } if (container.isRecipes() && mouseX >= guiLeft + recipesX - 5 && mouseX <= guiLeft + xSize - 5 && mouseY >= guiTop + recipesY - 4 && mouseY <= guiTop + recipesY + 10) { tooltips.clear(); for (ItemStack stack : container.getRecipes()) { tooltips.add(stack.getDisplayName()); } drawHoveringText(tooltips, mouseX, mouseY); } }
@Override public void drawScreen(int x, int y, float f) { super.drawScreen(x, y, f); String text1 = this.machine.storage.getEnergyStored() + "/" + this.machine.storage.getMaxEnergyStored() + " RF"; if (x >= guiLeft + 16 && y >= guiTop + 5 && x <= guiLeft + 23 && y <= guiTop + 89) { this.func_146283_a(Collections.singletonList(text1), x, y); } String text3 = this.machine.tank.getFluidAmount() + "/" + this.machine.tank.getCapacity() + " mB " + FluidRegistry.WATER.getLocalizedName(this.machine.tank.getFluid()); if (x >= guiLeft + 27 && y >= guiTop + 5 && x <= guiLeft + 33 && y <= guiTop + 70) { this.func_146283_a(Collections.singletonList(text3), x, y); } String text2 = this.machine.coffeeCacheAmount + "/" + this.machine.coffeeCacheMaxAmount + " " + StatCollector.translateToLocal("info." + ModUtil.MOD_ID_LOWER + ".gui.coffee"); if (x >= guiLeft + 40 && y >= guiTop + 25 && x <= guiLeft + 49 && y <= guiTop + 56) { this.func_146283_a(Collections.singletonList(text2), x, y); } }
@Override public void drawScreen(int x, int y, float par3) { super.drawScreen(x, y, par3); MerchantRecipeList recipes = this.villager.getRecipes(this.mc.thePlayer); if ((recipes != null) && !(recipes.isEmpty())) { int xCenter = (this.width - this.xSize) / 2; int yCenter = (this.height - this.ySize) / 2; MerchantRecipe recipe = (MerchantRecipe) recipes.get(this.currentRecipeIndex); ItemStack[] slot = new ItemStack[3]; slot[0] = recipe.getItemToBuy(); slot[1] = recipe.getSecondItemToBuy(); slot[2] = recipe.getItemToSell(); GL11.glPushMatrix(); GL11.glPushAttrib(GL11.GL_ENABLE_BIT); RenderHelper.enableGUIStandardItemLighting(); GL11.glEnable(GL12.GL_RESCALE_NORMAL); itemRender.zLevel = 100; itemRender.renderItemAndEffectIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[0], xCenter + 36, yCenter + 24); itemRender.renderItemOverlayIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[0], xCenter + 36, yCenter + 24); if (slot[1] != null) { itemRender.renderItemAndEffectIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[1], xCenter + 62, yCenter + 24); itemRender.renderItemOverlayIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[1], xCenter + 62, yCenter + 24); } itemRender.renderItemAndEffectIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[2], xCenter + 120, yCenter + 24); itemRender.renderItemOverlayIntoGUI( this.fontRendererObj, this.mc.renderEngine, slot[2], xCenter + 120, yCenter + 24); itemRender.zLevel = 0; GL11.glDisable(GL11.GL_LIGHTING); if (this.func_146978_c(36, 24, 16, 16, x, y)) { this.renderToolTip(slot[0], x, y); } else if ((slot[1] != null) && this.func_146978_c(62, 24, 16, 16, x, y)) { this.renderToolTip(slot[1], x, y); } else if (this.func_146978_c(120, 24, 16, 16, x, y)) { this.renderToolTip(slot[2], x, y); } RenderHelper.enableStandardItemLighting(); GL11.glPopAttrib(); GL11.glPopMatrix(); } }
@Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); for (int k = 0; k < this.infoRegions.size(); ++k) { GuiElementInfoRegion guibutton = this.infoRegions.get(k); guibutton.drawRegion(par1, par2); } }
/** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */ @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); boolean var4 = mc.thePlayer.capabilities.isCreativeMode; int var5 = field_147075_G.func_178147_e(); for (int var6 = 0; var6 < 3; ++var6) { int var7 = field_147075_G.enchantLevels[var6]; int var8 = field_147075_G.field_178151_h[var6]; int var9 = var6 + 1; if (func_146978_c(60, 14 + 19 * var6, 108, 17, mouseX, mouseY) && var7 > 0 && var8 >= 0) { ArrayList<Object> var10 = Lists.newArrayList(); String var11; if (var8 >= 0 && Enchantment.enchantmentsList[var8 & 255] != null) { var11 = Enchantment.enchantmentsList[var8 & 255].getTranslatedName((var8 & 65280) >> 8); var10.add( EnumChatFormatting.WHITE.toString() + EnumChatFormatting.ITALIC.toString() + I18n.format("container.enchant.clue", new Object[] {var11})); } if (!var4) { if (var8 >= 0) var10.add(""); if (mc.thePlayer.experienceLevel < var7) var10.add( EnumChatFormatting.RED.toString() + "Level Requirement: " + field_147075_G.enchantLevels[var6]); else { var11 = ""; if (var9 == 1) var11 = I18n.format("container.enchant.lapis.one", new Object[0]); else var11 = I18n.format("container.enchant.lapis.many", new Object[] {Integer.valueOf(var9)}); if (var5 >= var9) var10.add(EnumChatFormatting.GRAY.toString() + "" + var11); else var10.add(EnumChatFormatting.RED.toString() + "" + var11); if (var9 == 1) var11 = I18n.format("container.enchant.level.one", new Object[0]); else var11 = I18n.format("container.enchant.level.many", new Object[] {Integer.valueOf(var9)}); var10.add(EnumChatFormatting.GRAY.toString() + "" + var11); } } drawHoveringText(var10, mouseX, mouseY, fontRendererObj); break; } } }
/** Draws the screen and all the components in it. */ @Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); MerchantRecipeList var4 = this.recordList; if (var4 != null && !var4.isEmpty()) { int var5 = (this.width - this.xSize) / 2; int var6 = (this.height - this.ySize) / 2; int var7 = this.currentRecipeIndex; MerchantRecipe var8 = (MerchantRecipe) var4.get(var7); GL11.glPushMatrix(); ItemStack var9 = var8.getItemToBuy(); ItemStack var10 = var8.getSecondItemToBuy(); ItemStack var11 = var8.getItemToSell(); RenderHelper.enableGUIStandardItemLighting(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL12.GL_RESCALE_NORMAL); GL11.glEnable(GL11.GL_COLOR_MATERIAL); GL11.glEnable(GL11.GL_LIGHTING); GuiContainer.itemRenderer.zLevel = 100.0F; GuiContainer.itemRenderer.renderItemAndEffectIntoGUI( this.fontRenderer, this.mc.renderEngine, var9, var5 + 36, var6 + 24); GuiContainer.itemRenderer.renderItemOverlayIntoGUI( this.fontRenderer, this.mc.renderEngine, var9, var5 + 36, var6 + 24); if (var10 != null) { GuiContainer.itemRenderer.renderItemAndEffectIntoGUI( this.fontRenderer, this.mc.renderEngine, var10, var5 + 62, var6 + 24); GuiContainer.itemRenderer.renderItemOverlayIntoGUI( this.fontRenderer, this.mc.renderEngine, var10, var5 + 62, var6 + 24); } GuiContainer.itemRenderer.renderItemAndEffectIntoGUI( this.fontRenderer, this.mc.renderEngine, var11, var5 + 120, var6 + 24); GuiContainer.itemRenderer.renderItemOverlayIntoGUI( this.fontRenderer, this.mc.renderEngine, var11, var5 + 120, var6 + 24); GuiContainer.itemRenderer.zLevel = 0.0F; GL11.glDisable(GL11.GL_LIGHTING); if (this.isPointInRegion(36, 24, 16, 16, par1, par2)) { this.drawItemStackTooltip(var9, par1, par2); } else if (var10 != null && this.isPointInRegion(62, 24, 16, 16, par1, par2)) { this.drawItemStackTooltip(var10, par1, par2); } else if (this.isPointInRegion(120, 24, 16, 16, par1, par2)) { this.drawItemStackTooltip(var11, par1, par2); } GL11.glPopMatrix(); GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); RenderHelper.enableStandardItemLighting(); } }
@Override public void drawScreen(int rawMouseX, int rawMouseY, float partialTicks) { super.drawScreen(rawMouseX, rawMouseY, partialTicks); updateAdjustedMousePosition(rawMouseX, rawMouseY); for (GuiComponent guiComponent : getGuiComponents()) { if (guiComponent.intersectsWith(getAdjustedMouseX(), getAdjustedMouseY())) { guiComponent.onMouseOver(getAdjustedMouseX(), getAdjustedMouseY(), partialTicks); } } }
@Override public void drawScreen(int x, int y, float f) { super.drawScreen(x, y, f); String text1 = this.generator.storage.getEnergyStored() + "/" + this.generator.storage.getMaxEnergyStored() + " RF"; if (x >= guiLeft + 43 && y >= guiTop + 6 && x <= guiLeft + 58 && y <= guiTop + 88) { this.drawHoveringText(Collections.singletonList(text1), x, y); } }
@Override public void drawScreen(int t, int g, float par3) { super.drawScreen(t, g, par3); int amount = dieselInventory.getLiquidAmount(); int liqui = (amount * 50) / dieselInventory.getTankCapacity(); // if ((LiquidManager.diesel != null && dieselInventory.getLiquidItemIDClient() == // LiquidManager.diesel.itemID)) { if (intersectsWith(t, g)) { drawCreativeTabHoveringText("Diesel", t, g); } // } }
/** Draws the screen and all the components in it. */ @Override public void drawScreen(int par1, int par2, float par3) { final boolean var4 = Mouse.isButtonDown(0); final int var5 = guiLeft; final int var6 = guiTop; final int var7 = var5 + 175; final int var8 = var6 + 18; final int var9 = var7 + 14; final int var10 = var8 + 112; if (!wasClicking && var4 && par1 >= var7 && par2 >= var8 && par1 < var9 && par2 < var10) { isScrolling = needsScrollBars(); } if (!var4) { isScrolling = false; } wasClicking = var4; if (isScrolling) { final int invHeight = ((ContainerStorage) inventorySlots).inventory.getSizeInventory() / 9 - 5; final float scrollFraction = (par2 - var8 - 7.5F) / (var10 - var8 - 15.0F); final float oldScroll = currentScroll; currentScroll = (int) Math.floor(invHeight * scrollFraction + 0.5); if (currentScroll < 0.0F) { currentScroll = 0; } if (currentScroll > invHeight) { currentScroll = invHeight; } if (Math.floor(currentScroll) != Math.floor(oldScroll)) { // ((ContainerStorage)this.inventorySlots).inventory.scroll = // currentScroll; PacketDispatcher.sendPacketToServer( PacketHandler.getScrollPacket( tabList.get(selectedTabIndex).icon.itemID, (int) Math.floor(currentScroll), x, y, z)); } } super.drawScreen(par1, par2, par3); }
public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); Minecraft mc = Minecraft.getMinecraft(); MerchantRecipeList merchantrecipelist = this.theIMerchant.getRecipes(mc.thePlayer); if (merchantrecipelist != null && !merchantrecipelist.isEmpty()) { int k = (super.width - super.xSize) / 2; int l = (super.height - super.ySize) / 2; int i1 = this.currentRecipeIndex; MerchantRecipe merchantrecipe = (MerchantRecipe) merchantrecipelist.get(i1); GL11.glPushMatrix(); ItemStack itemstack = merchantrecipe.getItemToBuy(); ItemStack itemstack1 = merchantrecipe.getSecondItemToBuy(); ItemStack itemstack2 = merchantrecipe.getItemToSell(); RenderHelper.enableGUIStandardItemLighting(); GL11.glDisable(2896); GL11.glEnable('\u803a'); GL11.glEnable(2903); GL11.glEnable(2896); GuiScreen.itemRender.zLevel = 100.0F; GuiScreen.itemRender.renderItemAndEffectIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack, k + 36, l + 24); GuiScreen.itemRender.renderItemOverlayIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack, k + 36, l + 24); if (itemstack1 != null) { GuiScreen.itemRender.renderItemAndEffectIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack1, k + 62, l + 24); GuiScreen.itemRender.renderItemOverlayIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack1, k + 62, l + 24); } GuiScreen.itemRender.renderItemAndEffectIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack2, k + 120, l + 24); GuiScreen.itemRender.renderItemOverlayIntoGUI( super.fontRendererObj, mc.getTextureManager(), itemstack2, k + 120, l + 24); GuiScreen.itemRender.zLevel = 0.0F; GL11.glDisable(2896); if (this.isPointInRegion(36, 24, 16, 16, par1, par2)) { this.renderToolTip(itemstack, par1, par2); } else if (itemstack1 != null && this.isPointInRegion(62, 24, 16, 16, par1, par2)) { this.renderToolTip(itemstack1, par1, par2); } else if (this.isPointInRegion(120, 24, 16, 16, par1, par2)) { this.renderToolTip(itemstack2, par1, par2); } GL11.glPopMatrix(); GL11.glEnable(2896); GL11.glEnable(2929); RenderHelper.enableStandardItemLighting(); } }
public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); for (int i = 0; i < hoverCheckers.length; i++) { if (hoverCheckers[i] != null && hoverCheckers[i].checkHover(mouseX, mouseY)) { this.drawHoveringText( this.mc.fontRendererObj.listFormattedStringToWidth( tileEntity.getOptionDescriptions()[i], 150), mouseX, mouseY, this.mc.fontRendererObj); } } }
@Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); this.xSize_lo = par1; this.ySize_lo = par2; final ScaledResolution var5 = new ScaledResolution(this.mc.gameSettings, this.mc.displayWidth, this.mc.displayHeight); final int var6 = var5.getScaledWidth(); final int var7 = var5.getScaledHeight(); this.mc.entityRenderer.setupOverlayRendering(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glBindTexture( GL11.GL_TEXTURE_2D, this.mc.renderEngine.getTexture("/micdoodle8/mods/galacticraft/core/client/gui/gui.png")); final short var21 = 248; final int var22 = (int) (this.mc.thePlayer.experience * (var21 + 1)); final int var23 = (this.height - this.ySize) / 2 - 5; final int var18 = (this.width - this.xSize) / 2 + 2 - 50; this.drawTexturedModalRect(var18 - 2, var23 - 10 - 5, 0, 226, 256, 15); this.drawTexturedModalRect(var18 + 2, var23 - 5 - 5, 0, 242, var21, 7); if (var22 > 0) { this.drawTexturedModalRect(var18 + 2, var23 - 5 - 5, 0, 249, var22, 7); } final int var19b = par1 - (var18 - 2); final int var20b = par2 - (var23 - 10); if (var19b >= 0 && var20b >= 0 && var19b < 256 && var20b < 15) { // GCCorePlayerBase playerBase = // GCCoreUtil.getPlayerBaseServerFromPlayer(this.mc.thePlayer); // // if (playerBase != null) // { // final List list = new ArrayList(); // list.add(String.valueOf("Galactic Level " + playerBase.astronomyPointsLevel)); // list.add(String.valueOf(Math.round(var22 / 2.56) + "%")); // this.drawInfoText(list, par1, par2); // } TODO final List list = new ArrayList(); list.add("Work In Progress"); this.drawInfoText(list, par1, par2); } }
/** Draws the screen and all the components in it. */ public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) { boolean flag = Mouse.isButtonDown(0); int k = this.guiLeft; int l = this.guiTop; int i1 = k + 175; int j1 = l + 18; int k1 = i1 + 14; int l1 = j1 + 112; if (!this.wasClicking && flag && p_73863_1_ >= i1 && p_73863_2_ >= j1 && p_73863_1_ < k1 && p_73863_2_ < l1) { this.isScrolling = this.needsScrollBars(); } if (!flag) { this.isScrolling = false; } this.wasClicking = flag; if (this.isScrolling) { this.currentScroll = ((float) (p_73863_2_ - j1) - 7.5F) / ((float) (l1 - j1) - 15.0F); if (this.currentScroll < 0.0F) { this.currentScroll = 0.0F; } if (this.currentScroll > 1.0F) { this.currentScroll = 1.0F; } ((CreativeInv.ContainerCreative) this.inventorySlots).scrollTo(this.currentScroll); } super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray; int start = tabPage * 10; int i2 = Math.min(acreativetabs.length, ((tabPage + 1) * 10) + 2); if (tabPage != 0) start += 2; boolean rendered = false; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_LIGHTING); }
@Override public void drawScreen(int par1, int par2, float par3) { if (this.terraformer.disableCooldown > 0) { this.enableTreesButton.enabled = false; this.enableGrassButton.enabled = false; } else { this.enableTreesButton.enabled = true; this.enableGrassButton.enabled = true; } this.enableTreesButton.displayString = (this.terraformer.treesDisabled ? "Enable" : "Disable") + " Trees"; this.enableGrassButton.displayString = (this.terraformer.grassDisabled ? "Enable" : "Disable") + " Grass"; super.drawScreen(par1, par2, par3); }
@Override public void drawScreen(int mouseX, int mouseY, float gameTicks) { super.drawScreen(mouseX, mouseY, gameTicks); mouseX -= guiLeft; mouseY -= guiTop; for (Control c : _controls) { if (c.getVisible() && c.getEnabled()) { c.drawTooltip(mouseX, mouseY, gameTicks); } } for (int i = _controls.size() - 1; i >= 0; i--) { Control c = _controls.get(i); if (!c.visible || !c.enabled) { continue; } c.updateTick(mouseX, mouseY); } }
/** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); GlStateManager.disableLighting(); GlStateManager.disableBlend(); this.nameField.drawTextBox(); }
/** Draws the screen and all the components in it. Args : mouseX, mouseY, renderPartialTicks */ public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.field_147033_y = (float) mouseX; this.field_147032_z = (float) mouseY; super.drawScreen(mouseX, mouseY, partialTicks); }
@Override public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); this.textBoxFilter.drawTextBox(); }
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); drawToolTips(mouseX, mouseY); }
@Overridepublic void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) { if (!dead) { super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); } }
@Override public void drawScreen(int x, int y, float f) { this.mouseX = (float) x; this.mouseY = (float) y; super.drawScreen(x, y, f); }
@Override public void drawScreen(int mouseX, int mouseY, float gameTicks) { super.drawScreen(mouseX, mouseY, gameTicks); this.drawTooltips(mouseX, mouseY); }
public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); GL11.glDisable(GL11.GL_LIGHTING); buttonGrounded.displayString = "Grounded : " + render.grounded; this.buttonGrounded.drawButton(Minecraft.getMinecraft(), par1, par2); }
/** Draws the screen and all the components in it. */ public void drawScreen(int par1, int par2, float par3) { this.field_110416_x = (float) par1; this.field_110415_y = (float) par2; super.drawScreen(par1, par2, par3); }