[SOLVED] PaintListener not painting?

Discussion in 'Developer Support' started by SlashnHax, Dec 14, 2014.

  1. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,895
    Likes Received:
    824
    For some reason nothing is being painted to the canvas. My script bot extends LoopingScript and implements PaintListener, but onRepaint doesn't seem to be drawing anything to the client screen :(

    Code (Text):
    1.  
    2. @Override
    3. public void onPaint(Graphics2D g){
    4.     g.drawString("TEST", 300, 300);
    5. }
    6.  
     
  2. Tikas

    Joined:
    Oct 30, 2014
    Messages:
    68
    Likes Received:
    6
    Do you have this on your onStart()?
    Code (Text):
    1. getEventDispatcher().addListener(this);
     
  3. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,895
    Likes Received:
    824
    I do not. Thanks :D
     
  4. Tikas

    Joined:
    Oct 30, 2014
    Messages:
    68
    Likes Received:
    6
    Np :p
     
  5. Cloud

    Cloud The Developer

    Joined:
    Jul 28, 2013
    Messages:
    2,332
    Likes Received:
    758
    I suggest you take a look at one of our official script bot skeletons.
     

Share This Page

Loading...