Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Texture tex = new Texture(ResourceLoc, texWidth, texHeight);
  2. Sprite sprite = tex.getSprite(left, top, width, height); < this creates an object that holds a part of the texture. So for a gui it'd be a specific button or something.
  3. Then you can do tex.bind() and sprite.draw(x,y)
  4. or sprite.draw(x,y,width,height)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement