Forum rules - please read before posting.

Warning popup like "Unsaved progress will be lost, Proceed?"

I'm trying to implement a "Are you sure you want to 'x' " kinda warning popup .

i want to use this menu type in several other situations with longer texts so instead of making a brand new menu for every text, i'm copying the default "subtitles" menu and adding buttons to it

The problem i'm facing is, I can create a dialogue which ask the question but i cannot implement "yes" and "no" because even if i add buttons to the menu , the moment dialogue menu opens up, the mouse icon disappears as if the game pauses.

I'm sure there is a more elegant way than trying to force subtitles menu but cant seem to find it. I can see the new Unity Ui has something that might work for me but i'm still trying to understand it through their new tutorials (and how to implement it to AC). If i can implement that (unity Ui text) instead of forcing subtitles menu to do my bidding, i would be one step closer to achieve my goal.





Comments

  • edited January 2015
    Try creating a Global string variable that stores the 'X' text.  So e.g. Variable 2 is now "shut down the world".

    Then create a Label element in your Menu, and set the text to:

    Are you sure you want to [var:2]?

    The [var:2] will get replaced by the variable's value:

    Are you sure you want to shut down the world?

    You can then use the Variable: Set Action just before turning on the menu to change the variable's text.
  • edited January 2015
    Hey Chris.

    Nice :D But this is basicly not different than making a multiple menu layouts and simply write the labels with whatever you want. I guess i can make a popup global variable and fill it with choices and check the conditions to display them. I was hoping i would have much easier aproach than this.

    Than maybe i should ask that, how can i use Unitys Ui canvas'es in AC? I did create canvas and have some text in it but i dont know how to use them globaly with all my scenes. Or should i re create the same warning window in every scene ?

    Note: Kudos for Snake
  • Unity UI canvases can be prefabbed and use in all scenes - this tutorial covers the basics.
  • Alright thanks alot.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.