Jump to content

[HELP] Display counter on GUI screen..

Recommended Posts

Use the onPaint() method in the script class


public void onPaint(Graphics2D g) {    
    if(image != null){          
         g.drawImage(image, 545, 139, null);
    g.drawString(formatTime(timer.getElapsed()), 388, 277); //395
    g.drawString("Hides: " + hides, 388, 289);
    if(buryBones || keepBones)g.drawString("Bones: " + bones, 388, 301);

Graphis2D api https://docs.oracle.com/javase/8/docs/api/java/awt/Graphics2D.html

Edited by Qubit
  • Like 1
Link to comment
Share on other sites

last qustion for today , what methoed used to place a counter on client screen ?

lets say counter for how many bones the script already collected or feathers or what ever i want  ?

int bones;

if condition

g2d.drawString("Bones: " + bones, x position, y position);
  • Like 1
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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...