LONG STORY
I can not for the life of me figure this thing out. Although I've seen many post on drawString(), I have yet to see a simple one with the exact code I need. I created an Actor, class MASTER, and a subclass for MASTER, MASTERSAYS, which is just a white rectangle, sort of like Simon Says. I wanted to at the very least find the correct code for drawing a string on an Image/Actor and I can work by myself from there. MASTERSAYS will obtain a String from master and that String should appear in MASTERSAYS exclusively wherever MASTERSAYS is located, because its a text box, but I have yet to figure this out please help.SHORT STORY
I'm trying to make text appear on this Actor/Image, but I don't know how.CODE
I don't think my code is necessary for a solution, but here it is.1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | // MASTER creates MASTERSAYS directly below if (SCRIPT == 3 ) { int X = getX(); int Y = getY(); getWorld().addObject( new MASTERSAYS(), X, Y+ 200 ); } // This is where MASTERSAYS will insert the first sentence protected void addedToWorld() { int X = getX(); int Y = getY(); getImage().drawString( "I JUST F*CKING DID IT" , X, Y); } // P.S. I did not do anything it does not work. |