CondenserOutputWrapper( CondenserOutput condenserOutput, ItemStack outputItem, IDrawable buttonIcon ) { this.condenserOutput = condenserOutput; this.outputItem = outputItem; this.buttonIcon = buttonIcon; this.buttonHoverChecker = new HoverChecker( 28, 28 + 16, 78, 78 + 16, 0 ); }
@Nullable @Override public List<String> getTooltipStrings( int mouseX, int mouseY ) { if( this.buttonHoverChecker.checkHover( mouseX, mouseY ) ) { String key; switch( this.condenserOutput ) { case MATTER_BALLS: key = "gui.tooltips.appliedenergistics2.MatterBalls"; break; case SINGULARITY: key = "gui.tooltips.appliedenergistics2.Singularity"; break; default: return Collections.emptyList(); } return Splitter.on( "\\n" ).splitToList( I18n.format( key, this.condenserOutput.requiredPower ) ); } return Collections.emptyList(); }
public AEConfigGui( final GuiScreen parent ) { super( parent, getConfigElements(), AppEng.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath( AEConfig.instance().getFilePath() ) ); }
public static void drawTooltip(List<String> textLines, int mouseX, int mouseY, FontRenderer font) { GuiUtils.drawHoveringText(textLines, mouseX, mouseY, GuiBook.PAGE_WIDTH, GuiBook.PAGE_HEIGHT, GuiBook.PAGE_WIDTH, font); RenderHelper.disableStandardItemLighting(); }
@Override protected GuiScreen buildChildScreen() { return new GuiConfig(this.owningScreen, this.configElement.getChildElements(), this.owningScreen.modID, owningScreen.allRequireWorldRestart || this.configElement.requiresWorldRestart(), owningScreen.allRequireMcRestart || this.configElement.requiresMcRestart(), this.owningScreen.title, I18n.format("openmodslib.config.update_warning")); }
public DebugRecipe() { this.button = new GuiButtonExt(0, 110, 30, "test"); this.button.setWidth(40); this.buttonHoverChecker = new HoverChecker(this.button, 0); }
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { // You can do things like create animations, draw additional elements, etc. here super.drawScreen(mouseX, mouseY, partialTicks); }
@Override protected void drawTextureBox(int hoverState){ GuiUtils.drawContinuousTexturedBox(CREATIVE_TABS, this.xPosition, this.yPosition, 0, 64 + (hoverState > 0 ? 36 : 0), this.width, this.height, TAB_DIM, TAB_DIM, TAB_BORDER, TAB_BORDER, TAB_BORDER, TAB_BORDER, this.zLevel); } }
@Override protected void actionPerformed(GuiButton button) { super.actionPerformed(button); } }
@Override public void initGui() { // You can add buttons and initialize fields here super.initGui(); }
@Override public void drawToolTip(final int mouseX, final int mouseY) { if(this.pressedCounter-- > 0) this.owningScreen.drawToolTip(ImmutableList.of(TextFormatting.AQUA+"Scripts reloaded.", TextFormatting.RED+"Don't spam the button!"), mouseX, mouseY); else super.drawToolTip(mouseX, mouseY); }
@Override public void onGuiClosed(){ super.onGuiClosed(); } }
public void updateOredictPattern(boolean checked) { if (oredictPattern != null) { oredictPattern.setIsChecked(checked); } }
@Override public void mouseReleased(int mouseX, int mouseY) { super.mouseReleased(mouseX, mouseY); this.isMouseDown = false; }
public GuiBotaniaConfig(GuiScreen parentScreen) { super(parentScreen, new ConfigElement(ConfigHandler.config.getCategory(Configuration.CATEGORY_GENERAL)).getChildElements(), LibMisc.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(ConfigHandler.config.toString())); }
@Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { super.drawScreen(mouseX, mouseY, partialTicks); }
public RecipeGuiTab(int x, int y) { this.x = x; this.y = y; this.hoverChecker = new HoverChecker(y, y + TAB_HEIGHT, x, x + TAB_WIDTH, 0); }
@Override public boolean isMouseOver(int mouseX, int mouseY) { return hoverChecker.checkHover(mouseX, mouseY); }
@Override public void initGui() { super.initGui(); }
@Override public void drawToolTip(final int mouseX, final int mouseY) { if(this.pressedCounter-- > 0) this.owningScreen.drawToolTip(ImmutableList.of(TextFormatting.AQUA+"Output files regenerated.", TextFormatting.RED+"Don't spam the button!"), mouseX, mouseY); else super.drawToolTip(mouseX, mouseY); }