Continue Button - Click Anywhere?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
willoneill
Posts: 9
Joined: Sun Oct 25, 2015 4:06 pm

Continue Button - Click Anywhere?

Post by willoneill »

Hey Tony,

Dialogue System is great! I'm just having one issue.

I always want people to click to advance dialogue, and so have set 'Continue Button' to 'Always', but rather than there be an actual, explicit button in the UI, I'd like them to be able to click anywhere on the screen to advance it.

Is there a smart way to do this? My thought was that I could make a button that takes up the whole screen, but that seems to push other boxes in the UI out of the way, and of course I also can't have it be 'on top' of, say, the Response Panel buttons.

If there's a smart way of re-arranging the UI to do this or some even easier way, please let me know! Thanks!

Also, I'm using Dialogue System alongside Adventure Creator if that makes any difference.
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue Button - Click Anywhere?

Post by Tony Li »

Hi,

Your instinct is spot-on to make an invisible continue button that takes up the whole screen. To prevent it from affecting the other UI elements' layout, move the button outside of the panels. It'll work even if it's in a completely different Canvas.

Unity sorts UI elements according to their top-to-bottom order in the Hierarchy view. If you move the continue button to the bottom of UI elements, it'll be on top of everything else. If you move the response panel below the continue button, it will be on top of the continue button.
willoneill
Posts: 9
Joined: Sun Oct 25, 2015 4:06 pm

Re: Continue Button - Click Anywhere?

Post by willoneill »

Hi Tony,

Great! Thanks for the quick response. I just gave this a shot and it works perfectly.

My mistake was definitely trying to rig this as a button that would somehow fit into the framework within the existing canvas and panels of the generic template. My advice to anybody who runs into this is definitely to instantiate the template into your project as a great guideline, but to build your own UI from scratch alongside it.

Watching a few tutorial videos out there on Unity UI itself also helped immeasurably - pivots and anchors and the like are so much easier to just see an explanation of instead of trying to put it together through trial and error. :)
User avatar
Tony Li
Posts: 21676
Joined: Thu Jul 18, 2013 1:27 pm

Re: Continue Button - Click Anywhere?

Post by Tony Li »

Good tips!
Post Reply