Jump to content

[1.8] Pictures in GuiScreen


Kaneka

Recommended Posts

Hi everyone,

 

I am trying to make a GuiScreen as a guide for my mod, and it have pictures in it. And in Eclipse it works well, every picture is shown, but when i export the mod, the bookbackground is shown, every text shows up, but the images i put in are only shown as error image(these purple/black image). Where is my mistake when it is right in Eclipse but not in the exported mod?

 

Thanks for answers,

 

Kaneka

Link to comment
Share on other sites

Code?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Hope this is enought:

 

public class GuiGuidebook extends GuiScreen {
public static final ResourceLocation BACKGROUND = new ResourceLocation("planttech:textures/gui/bookt.png");
private static ResourceLocation[] picture = new ResourceLocation[bookTotalPages];

...

public GuiGuidebook()
{
    stringHeaderText[0] = "Compost Bin";
    stringPageText[0] = "Takes apples, potatoes, leaves or equal and a bit of time to transform them to biomass. \n\nThe basic of every good planttechian!";
    picture[0] = new ResourceLocation("planttech:textures/gui/recipes/compostbin.png");

...

public void drawScreen(int parWidth, int parHeight, float p_73863_3_)
{
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    
    mc.getTextureManager().bindTexture(BACKGROUND);
    int offsetFromScreenLeft = (width - bookImageWidth ) / 2;
    drawModalRectWithCustomSizedTexture(offsetFromScreenLeft, 2, 0, 0, 400, 250, 400, 300);
    mc.getTextureManager().bindTexture(picture[currPage]);
    drawModalRectWithCustomSizedTexture(280, 80, 0, 0, 100, 100, 100, 100);
...

 

If more is needet, tell me to post more

Link to comment
Share on other sites

Also do this for me:

 

Capture.png

 

(This is my own resources, I'm interested in seeing yours, open up just enough to show me the compostbin.png)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Yup, case matters when compiled. Windows doesn't give a shit.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.