NSpDoModalHostDialog
You can use theNSpDoModalHostDialog
function to present your user with a default modal dialog box on for hosting a game on the network.
Boolean NSpDoModalHostDialog ( NSpProtocolListReference ioProtocolList, Str31 ioGameName, Str31 ioPlayerName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr);
- ioProtocolList
- An opaque reference to a list of protocols. You can create an empty list that will be filled in with information about the protocols the user selects, but you cannot pass
NULL
. If you wish to preconfigure certain protocols, you can create protocol references for them, then add them to your protocol list before passing it to this function.ioGameName
- A Pascal string (maximum 31 characters) of the name of the game to be registered in NBP and displayed to users if you are using the
NSpGame_Join
function in their game. Pass an empty string (notNULL
) if you don't want to display a default game name. The value ofioGameName
is often obtained from a preferences setting. This field contains changes (if any) the user made to theioGameName
field.ioPlayerName
- A Pascal (maximum 31 characters) string of the user name (generally from a preferences setting). Pass an empty string (not
NULL
) if you do not want a default name displayed in the dialog box. This field contains any changes the user has made to the name.ioPassword
- A Pascal (maximum 31 characters) string of the password (generally from a preferences setting). Pass an empty string (not
NULL
) if you do not want a default password displayed in the dialog box. This field contains any changes the user made to the password.inEventProcPtr
- A pointer to
DialogProcUPP
, the dialog filter function for handling Mac OS events that may affect other windows you have displayed on the screen concurrently. PassNULL
if you do not need to receive Mac OS events while the dialog box is being displayed.- function result
- A value of
true
if the user selected OK,false
if the user selected Cancel.DESCRIPTION
This function fills in the protocol list with the protocol(s) the user has selected and configures the protocol references in the list with the proper information. If the user did not cancel the dialog box, you should then pass the protocol list to theNSpGame_Host
function.