Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void drawScreen(int mouseX, int mouseY, float f) {
- // Draw your stuff like Textures and Strings
- this.drawDefaultBackground();
- drawRect(width / 2 - 105, 60, width / 2 - 35, height / 2 + 5, new Color(50, 170, 170, 70).getRGB());
- this.drawCenteredString(fontRendererObj, I18n.format("menu.title"), width / 2, 25, Color.WHITE.getRGB());
- // Call this methods super, as it draws buttons and stuff
- super.drawScreen(x, y, f);
- // Add the hovering for all GuiButtons in the buttonList
- for (int i = 0; i < buttonList.size(); i++) {
- if (buttonList.get(i) instanceof GuiButton) {
- GuiButton btn = (GuiButton) buttonList.get(i);
- if (btn.func_146115_a()) { // Tells you if the button is hovered by mouse
- String[] desc = { "WHAT_EVER_TEXT_YOU_WANT" };
- @SuppressWarnings("rawtypes")
- List temp = Arrays.asList(desc);
- drawHoveringText(temp, x, y, fontRendererObj);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment