Fonction des bouton du menu Ingame "GUI"
-
Tu as oublié de mettre la balise Résolu.
-
Par contre je comprend pas, quand je le lance sur mon launcher ça met des tête devant les mots :c http://prntscr.com/bkftb9
-
Le code actuel ?
-
Le problème est au niveau du nom des bouton, il faut utiliser autre chose que “§6”, il y a une class faite exprès pour ça
mais je ne sais plus comment elle s’appelle.Edit : j’ai trouvé, c’est EnumChatFormatting
(ex : EnumChatFormatting.GOLD + “Votez” au lieux de “§6Votez”) -
Ou alors il faut juste mettre sa workspace en UTF8.
Ou passer par les fichiers de lang. -
xDDDDDD , nan donne ton code car moi sa fait pas sa

EDIT: JE VEUX DE BONHOMES AUSSIIIIIIIIIIIIIIIIIIIIIIIIIII
-
Mon code pour les gens a qui sa marche pas.
@SubscribeEvent public void onInitGuiIngameEvent(InitGuiEvent.Post event) { if(event.gui instanceof GuiIngameMenu) { // on cache les boutons de base for(Object b : event.buttonList) { int buttonId = ((GuiButton)b).id; if(buttonId == 1 || buttonId == 4 || buttonId == 0 || buttonId == 2 || buttonId == 7 || buttonId == 5 || buttonId == 12 || buttonId == 6) { ((GuiButton)b).visible = false; } } int i = 16; event.buttonList.add(new GuiButton(-1, event.gui.width / 2 + 2, this.height / 4 + 120 + i, 98, 20, EnumChatFormatting.GOLD + "Votez"){}); event.buttonList.add(new GuiButton(5, event.gui.width / 2 - 100, this.height / 4 + 72 + i, 98, 20, EnumChatFormatting.DARK_PURPLE + "Succes"){}); event.buttonList.add(new GuiButton(6, event.gui.width / 2 - 100, this.height / 4 + 120 + i, 98, 20, EnumChatFormatting.BLUE + "Statistiques"){}); event.buttonList.add(new GuiButton(0, event.gui.width / 2 - 100, this.height / 4 + 96 + i, 98, 20, EnumChatFormatting.GRAY + "Options")); event.buttonList.add(new GuiButton(80, event.gui.width / 2 + 2, this.height / 4 + 72 + i, 98, 20, EnumChatFormatting.DARK_BLUE + "Site") { @Override public void mouseReleased(int x, int y) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("https://w****x.fr/")); } catch(IOException e) { e.printStackTrace(); } catch(URISyntaxException e) { e.printStackTrace(); } }}}); event.buttonList.add(new GuiButton(81, event.gui.width / 2 + 2, this.height / 4 + 96 + i, 98, 20, EnumChatFormatting.DARK_GREEN + "TeamSpeak") { @Override public void mouseReleased(int x, int y) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("ts3server://90.****7")); } catch(IOException e) { e.printStackTrace(); } catch(URISyntaxException e) { e.printStackTrace(); } }}}); event.buttonList.add(new GuiButton(4, event.gui.width / 2 - 100, this.height / 4 + 48 + i, EnumChatFormatting.YELLOW + "Retour au Jeu"){}); event.buttonList.add(new GuiButton(1, event.gui.width / 2 - 100, this.height / 4 + 144 + i, EnumChatFormatting.RED + "Deconnexion"){}); } } protected void actionPerformed(GuiButton p_146284_1_) { switch (p_146284_1_.id) { case 0: this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings)); break; case 1: p_146284_1_.enabled = false; this.mc.theWorld.sendQuittingDisconnectingPacket(); this.mc.loadWorld((WorldClient)null); this.mc.displayGuiScreen(new GuiMainMenu()); case 2: case 3: default: break; case 4: this.mc.displayGuiScreen((GuiScreen)null); this.mc.setIngameFocus(); break; case 5: if (this.mc.thePlayer != null) this.mc.displayGuiScreen(new GuiAchievements(this, this.mc.thePlayer.getStatFileWriter())); break; case 6: if (this.mc.thePlayer != null) this.mc.displayGuiScreen(new GuiStats(this, this.mc.thePlayer.getStatFileWriter())); break; case 7: this.mc.displayGuiScreen(new GuiShareToLan(this)); break; } } public void updateScreen() { super.updateScreen(); ++this.field_146444_f; } /** * Draws the screen and all the components in it. */ public void drawScreen(int p_73863_1_, int p_73863_2_, float p_73863_3_) { this.drawDefaultBackground(); this.drawCenteredString(this.fontRendererObj, I18n.format("menu.game", new Object[0]), this.width / 2, 40, 16777215); super.drawScreen(p_73863_1_, p_73863_2_, p_73863_3_); } }Et si il y a un moyen de mettre le skin comme ça: http://prntscr.com/blanlg
Et de mettre un petit message aussi: http://prntscr.com/blao1q -
Qu’est-ce qui t’en empêche ?
-
Je ne sais pas le faire.
-
Et bien fait des recherches :
- Pour ce qui est du skin moi j’irai voir le Gui de l’inventaire du joueur
- Pour ce qui est du message, je ne vois pas ce que je peux te dire : tu bloques où ?