Hey guys!
I have a simple dialog box class that when I create it accepts different arguments to populate different options on the screen. In the dialog class this is done by simply adding the passed strings. What I am trying to do now, is via the dialog class, make the different strings clickable.
Relevant code from the Dialog class:
this.addGraphic(choice);
Relevant code from the Dialog Update method:
override public function update():void
{
if (collidePoint(choice.x, choice.y, world.mouseX, world.mouseY))
{
if (Input.mouseReleased) click();
}
}
public function click():void
{
trace("clicking added graphic");
}
I feel like I am doing something fundamentally incorrect…
Thanks guys!