So here's the setup: I'm working on an addon to give the player more control over which bit of equipment to replace when wielding something, so that your Shadowblade can decide which dagger to replace, or your Stone Warden which shield, or your any character which ring, and so on. The tricky bit is how to actually ask the user what to replace. At first I just assumed I could do a quickie Dialog:listPopup(), but that returns immediately and does most of its work in the provided callback function --- which doesn't help in this case, since ActorInventory:wearObject() has to return whatever item it swapped out.
So what I'm looking for is a way to wait until a dialog is unregistered, or some other way of getting input from the user that "blocks" until said input has been provided. I tried pfutzing around with coroutines briefly, but just got confused, and everything else in the UI seem to be based around callbacks.
User input without callbacks?
Moderator: Moderator
-
- Sher'Tul Godslayer
- Posts: 2521
- Joined: Thu Jan 23, 2003 8:13 pm
- Location: A shallow water area south of Bree
- Contact:
User input without callbacks?
"Blessed are the yeeks, for they shall inherit Arda..."