Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exit help

Status
Not open for further replies.

Shark76

Programmer
Sep 3, 2002
11
0
0
AU
Can anyone please help me in adding the following behaviour to a menu option (It is a dialogue box asking the user if they want to quit). I want to have the user select the exit from a drop down menu and then have the box pop up asking them if they are sure they want to quit. I have the menu but don't know how to go about attaching the behaviour to it.

on endGame me
-- check if player really wnats to EXIT movie
-- create an instance of the MUI object
myMui = new(xtra "mui")
-- define attributes of the dialog box in a property list
myList = [:]
myList.addprop (#buttons, #YesNo)
myList.addprop (#default, 2)
myList.addprop (#title, "Quit")
myList.addprop (#Message, "Do you really want to quit?")
myList.addprop (#icon, #question)
myList.addprop (#moveable, false)
-- post the dialog and wait for a user response
myChoice = alert(myMui, myList)
-- dispose of the MUI objects when done
myMui = 0
-- will only quit if the YES button was clicked
if myChoice = 1 then halt
end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top