NSpDoModalJoinDialog
You can use theNSpDoModalJoinDialog
function to present the user with a default dialog box for finding and joining a game advertised on the network.
NSpAddressReference NSpDoModalJoinDialog ( ConstStr31Param inGameType, ConstStr31Param inEntityListLabel, Str31 ioName, Str31 ioPassword, NSpEventProcPtr inEventProcPtr);
inGameType
- A Pascal (maximum 31 characters) string used to register your game's NBP (Name Binding Protocol) type. This must be the same as the one used to host a game.
inEntityListLabel
- A Pascal string that will be displayed above the entity list in the AppleTalk panel of the dialog box, as a label for the list of available games.
ioName
- 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 will contain any changes the user made to the name on return.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 will contain the any changes the user made to the password on return.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 NetSprocket dialog box is being displayed.- function result
- An opaque reference to a protocol address selected by the user.
DESCRIPTION
If the user cancels the dialog box, the function will returnNULL
. If the user selects OK, it will return a reference to the protocol address of a game host. This reference should then be passed toNSpGame_Join
. Once you have calledNSpGame_Join
, callNSpReleaseAddressReference
to release the reference.