Jump to content

yourname99

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

yourname99's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. When I make a GUI I begin mostly by just copying one of the minecraft GUI's (for example dispenser.png). After that I gray out everything that I don't need so that I have a nearly blank GUI. Then I add everything that will later be static directly with the image editing program on the GUI. Every other stuff I place somethere in the unused transparent area of the picture and place them later right with rectangles. For finding out pixel coordinates and sizes for rectangles I use something like the measurement tools in photoshop. Everything else I do in code. An easy way to place things like the rectangles right in the GUI is this: this.drawTexturedModalRect(x, y, 7, 134, 54, 18); if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { y--; System.out.println("y = " + y); } if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { y++; System.out.println("y = " + y); } if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { x--; System.out.println("x = " + x); } if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { x++; System.out.println("x = " + x); } With this you can adjust everything ingame with the arrow keys and then read later the right coordinates out of the console. I also prefer to make the text in code. So you can easily change things dynamically for things such as the localization.
×
×
  • Create New...

Important Information

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