Social Icons

Thursday, 3 May 2012

[Tut] How to make compasses and sundials/watches on the screen!

[Image: 338SA.png]

__

What this tutorial does

This tutorial will draw a compass and a sundial on the screen.
[Image: 2012-05-01_21-02-41.snagproj.png]
Can't see the image? Click here.

__

Code

Place this in GuiIngame.java or wherever you keep your in-game rendering code.

[Image: 2012-05-02_06-54-18.snagproj.png]
Can't see the image? Click here


I hoped I explained the code well. The parameters for this function are: drawItemSprite(x position of the item, y position of the item, item id).

To actually render the watch and sundial, put this code wherever you render the in-game GUI.

PHP Code:
drawItemSprite(1010345);drawItemSprite(2714347); 

__

Hope I helped you out ;)

1 comment: