• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

How to create a generic "verify" dialog/option

Status
Not open for further replies.
Level 15
Joined
Aug 7, 2013
Messages
1,337
Hi,

I am using dialogs a way for players to select options. These include buying items, throwing items out, or even permanently removing party members.

Naturally when a player is deciding such an option, we want to be certain it is the option they want and not just an errant mouse/keyboard click.

Thus we use a verify dialog, which basically goes like this:

dialog 1: Player selects an item to throw away

Response: show verify dialog

verify dialog: Are you sure? (two buttons: yes or no).

This reduces the chance of the player hurting themselves or buying an unwanted item and also lets them think over the choice.

Now when the player hits yes, it confirms the choice and does whatever.

Now, is there a way to make a single callback for all verify dialogs, regardless of the result?

Or do I need O(n) verify dialogs, one for each unique callback (removing an item, buying an item, firing a party member, etc.)?
 
Status
Not open for further replies.
Top