i set canvas actor no parent, when i click on button that is child of view, how to contact with canvas actor?
i mean, is that a way simulation click canvas actor when i click button at the same time?
Thanks in advance
canvasActorName.x=0;
Actor* canvasActor = getclone("canvasActorName");
canvasActor->x = 0;
skydereign wrote:Well you can reference it like this. Not sure what you want to do with it and I am pretty sure there is more to the
- Code: Select all
canvasActorName.x=0;
Another method to reference the canvas actor is to grab its Actor*, which can be done and used like this.
- Code: Select all
Actor* canvasActor = getclone("canvasActorName");
canvasActor->x = 0;
Both of these methods allow for use of other actors when dealing with an event. I don't think this is exactly what you wanted, if not than can you explain more? Did you want to drag the canvas actor when clicking the button?
Users browsing this forum: No registered users and 1 guest