Hi. I have the code:
inside act() in my World class. (Is it obvious what I want to do?)
I also have this code in my Display class inside my World class:
I was wondering if there was a nice way around this error. This is for my Calculator Project
I have a feeling that this video contains the answer I'm searching for but I can't seem to apply it to me scenario:
Any comments welcome. Thanks :)
(Display.getImage()).clear(); (Display.getImage()).drawString(numOne+op+numTwo,2,20);
public class Display extends Actor{ public Display(String text){ GreenfootImage Textbox= new GreenfootImage(24*text.length(),20); Textbox.setFont(new Font("Consolas", Font.PLAIN, 22)); Textbox.drawString(text,2,20); setImage(Textbox); } }