I am busy working on a mod, and I need a GuiTextField that has multiple lines, like a book and quill. I looked for any tutorials, I looked through the GuiBook and I even tried to add JTextArea to the Gui but you can't add those objects to and instance of GUI. Please help me! I want it to be like the normal TextFields that scroll sideways but it also has to be able to scroll down. Thanks
CODE:
public class GuiPixelWrite extends GuiScreenMod
{
private World world;
private EntityPlayer entityplayer;
private Minecraft mc;
private final TileEntitymyTiletile;
public GuiPixelWrite(World world1, EntityPlayer entityplayer1, Minecraft minecraft, TileEntitymyTile compTile)
{
world = world1;
entityplayer = entityplayer1;
mc = minecraft;
tile = compTile;
}
public void updateScreen()
{
}
public void initGui()
{
buttonList.clear();
//buttonList.add(new GuiButtonFolder(8, width / 2 - 133, height / 2 + 60, "Name"));
}
protected void actionRPerformed(GuiButton guibutton)
{
}
protected void actionPerformed(GuiButton guibutton)
{
}
public boolean doesGuiPauseGame()
{
return true;
}
public void drawScreen(int i, int j, float f)
{
drawDefaultBackground();
int x = width / 3 - 128;
int y = height / 3 - 128;
try{
GL11.glPushMatrix();
GL11.glScalef(1.5F, 1.5F, 1.5F);
GL11.glColor4f(2.0F, 2.0F, 2.0F, 2.0F);
mc.renderEngine.bindTexture(new ResourceLocation("myDir:App.png"));
drawTexturedModalRect(x, y, 0, 0, 256, 256);
GL11.glPopMatrix();
}
finally{
}
super.drawScreen(i, j, f);
}
}
I have a TileEntity but there is just the read/write to NTB. Thanks
The default minecraft TextField's are only one-liners, sorry xD. Im sure you'll be able to find the code in the GuiBook class if you look hard enough. (I would have looked for you, but im on my other computer, not my modding one)
I am busy working on a mod, and I need a GuiTextField that has multiple lines, like a book and quill. I looked for any tutorials, I looked through the GuiBook and I even tried to add JTextArea to the Gui but you can't add those objects to and instance of GUI. Please help me! I want it to be like the normal TextFields that scroll sideways but it also has to be able to scroll down. Thanks
CODE:
I have a TileEntity but there is just the read/write to NTB. Thanks
-Regards
marko5049
P.S You cant add JTextArea's to Minecraft GUI's.
Mapping and Modding rules | Global rules