home *** CD-ROM | disk | FTP | other *** search
- [==========================================================================
- PROFILE.ACE
- ------------
-
- The Knowledge Land main navigation interface.
-
- Requires:
- FRAMEWRK.ACE.
-
- ==========================================================================]
-
- Refer to ..\..\LIB\CNET.ACE.
-
- To activate profile interface,
- If profileentry does not exist in mainScreen,
- In mainScreen,
- Make profileentry.
- Set mainScreen's profileentry to a profileEntryModule from 0,0 to 640,480.
- Record that mainScreen's module is inEntryMode.
- In mainScreen's profileentry,
- Set editIndex to 1.
- Give editControl # 1 keyboard focus.
- Load the user profile in mainScreen's profileentry.
- Fade in.
- Wait until the next cycle.
- If system is firstTime,
- Play voice over "NARRATE\\IDINTR2.SND".
- Wait until mediaPlayer is not running.
- If system is TTS,
- Play voice over "NARRATE\\IDVOICE.SND".
- Wait until mediaPlayer is not running.
- Play voice over "NARRATE\\IDCHANG.SND".
- Wait until mediaPlayer is not running.
-
- In system,
- Make userProfile. In it,
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
- Add "".
-
- A profileEntryModule is a kind of module which has:
-
- A way for anyone to get
- a profileEntryModule from an xynumber 'a' to an xynumber 'b',
-
- Make new. Set it to a module from a to b.
- Make it into a profileEntryModule.
- In new,
- Make editIndex. Set it to 1.
- Make profileEntryData. Set it to an array of the data "PROFILE\\PROENTRY.DAT".
- For each controlarray 'a' in profileEntryData,
- In new,
- Make a control of a.
- If it is an editcontrol,
- In it,
- Make editIndex. Set it to new's editIndex.
- new's editIndex += 1.
- Make avatarData. Set it to an array of the data (avatarList's string #
- (theUser's playerAvatar)).
- Make avatarArray. Set it to the HD file (avatarData's walk_'s string).
- In new's control # 3,
- Make a picture named avatarPic of avatarArray's bitmap from 0,0 to size.
- Change the text of new's stringcontrol to theUser's id.
- Make new's dialogcontrol into a modaldialog.
- Hide it.
- Detach it. Return it.
-
- A way to handle a keyevent 'e' in an editcontrol 'c' in a profileEntryModule 'm',
-
- If e's key is the enter key,
- m's editIndex += 1.
- If m's editIndex > the number of editcontrols in m,
- m's editIndex = 1.
- give m's editcontrol # (m's editIndex) keyboard focus.
-
- A way to handle a downclickevent 'e' in a control 'c' in a profileEntryModule 'm',
-
- If c's id is "boy",
- Show c's picture.
- Hide m's control # 9's picture.
- Otherwise if c's id is "girl",
- Show c's picture.
- Hide m's control # 8's picture.
-
- A way to handle an upclickevent 'e' in a control 'c' in a profileEntryModule 'm',
- //Turn tracing on.
- If c's id is "okbutton",
- Save the user profile in m.
- Enter module "main".
- Otherwise if c's id is "change",
- Save the user profile in m.
- Enter module "avatar" from module "profile".
- Otherwise if c's id is "exit",
- Save the user profile in m.
- Enter module "login".
- Otherwise if c's id is "voice",
- Put up m's modaldialog in m.
- //Save the user profile in m.
- Otherwise if c's id is "help",
- Launch "helpme".
- Otherwise if c's id is "d_ok",
- Clear modal dialog in m.
-
- A way to remove keyboard focus from an editcontrol 'c' in a ProfileEntryModule 'm',
- Set userProfile's string # (c's editIndex) to c's buffer.
- // Set m's editIndex to c's editIndex.
-
- A way to load the user profile in a ProfileEntryModule 'm',
- Make s. Set it to "PROF".
- For each number 'n' from 5 to the number of characters in theUser's fileName,
- Append theUser's filename's character # n to s.
- Make a. Set it to an array of the data s.
- If the number of strings in a > 0,
- For each number 'n' from 1 to the number of strings in userProfile,
- Set userProfile's string # n to a's string # n.
- If n <= the number of editcontrols in m,
- Call m's editcontrol # n ec.
- Change the text of ec to a's string # n.
- if n = m's editIndex,
- Give ec keyboard focus.
- If sex_ exists in a,
- If the number of characters in a's sex_ = 2,
- Show m's control # 8's picture.
- Hide m's control # 9's picture.
- Otherwise,
- Show m's control # 9's picture.
- Hide m's control # 8's picture.
- Otherwise,
- Hide m's control # 8's picture.
- Hide m's control # 9's picture.
-
- A way to save the user profile in a ProfileEntryModule 'm',
- If m's keyfocus's target is an editcontrol,
- Hide cursor in m's keyfocus's target.
- Set userProfile's string # (m's keyfocus's target's editIndex) to
- m's keyfocus's target's buffer.
- Make s. Set it to "PROF".
- For each number 'n' from 5 to the number of characters in theUser's fileName,
- Append theUser's filename's character # n to s.
- Make a. Set it to an array.
- For each string 's' in userProfile,
- Add s to a.
- In a,
- Make sex_.
- If m's control # 8's picture is visible,
- Set a's sex_ to "xx".
- Otherwise,
- Set a's sex_ to "x".
- Save a to the data s.
-
- To create profile display interface of a number 'idx',
- If profiledisplay does not exist in mainScreen,
- In mainScreen,
- Make profiledisplay.
- Set mainScreen's profiledisplay to a profileDisplayModule from 0,0 to 640,480 with idx.
- //In mainScreen's profiledisplay,
- // Set stringIndex to 1.
- // Record that mainScreen's module is inEntryMode.
-
-
- A profileDisplayModule is a kind of module which has:
-
- A way for anyone to get
- a profileDisplayModule from an xynumber 'a' to an xynumber 'b'
- with a number 'idx',
-
- Make new. Set it to a module from a to b.
- Make it into a profileDisplayModule.
- Make na. Set it to a netarray.
- In new,
- Make a netControl of na.
- Make stringIndex. Set it to 1.
- Make profileDisplayData. Set it to an array of the data "PROFILE\\PROFSHOW.DAT".
- For each controlarray 'a' in profileDisplayData,
- In new,
- Make a control of a.
- If it is a stringControl,
- In it,
- Make stringIndex. Set it to new's stringIndex.
- new's stringIndex += 1.
- Subscribe new's picturecontrol to new's NetControl.
- Make avatarData. Set it to an array of the data (avatarList's string #
- (theUser's playerAvatar)).
- Make avatarArray. Set it to the HD file (avatarData's walk_'s string).
- In new's control # 2,
- Make a picture named avatarPic of avatarArray's bitmap from 0,0 to size.
- Change the text of new's stringcontrol to theUser's id.
- Make new's dialogcontrol into a modaldialog.
- Hide it.
- Detach new. Return it.
-
-
- A way to handle a downclickevent 'e' in a control 'c' in a profileDisplayModule 'm',
-
- If c's id is "okbutton",
- Detach mainScreen's profileDisplay.
-
- A way to receive a NetWhisperEvent 'e' in a picturecontrol 'c' in a ProfileDisplayModule 'm',
-
- log e.
- Make sp. Set it to " ".
- Make ns. Set it to 0.
- Make commandNumber. Set it to "".
- Make fieldstring. Set it to "".
- Make fieldnumber. Set it to "".
- For each character 'ch' in e's str,
- If ns = 1,
- Append ch to commandNumber.
- If ns = 3,
- Append ch to fieldNumber.
- Otherwise if ns > 3,
- Append ch to fieldstring.
- If ch = sp's character,
- ns += 1.
- log fieldstring.
- Make cn. Set it to atoi(commandNumber).
- log cn.
- If cn = 400,
- If fieldstring is "xx",
- Show m's control # 8's picture.
- Hide m's control # 9's picture.
- Otherwise if fieldstring is "x",
- Show m's control # 9's picture.
- Hide m's control # 8's picture.
- Otherwise,
- Make fn. Set it to atoi(fieldnumber).
- log fn.
- Call c's container's stringcontrol # fn sb.
- Change the text of sb to fieldstring.
-
- A way to handle an upclickevent 'e' in a control 'c' in a profileDisplayModule 'm',
- //Turn tracing on.
- If c's id is "okbutton",
- Save the user profile in m.
- Enter module "main".
- Otherwise if c's id is "change",
- Save the user profile in m.
- Enter module "avatar" from module "profile".
- Otherwise if c's id is "exit",
- If profileDisplay exists in mainScreen,
- Detach mainScreen's profileDisplay.
- Otherwise if c's id is "voice",
- Put up m's modaldialog in m.
- //Save the user profile in m.
- Otherwise if c's id is "help",
- Launch "helpme".
-
- // $Log: PROFILE.ACE $
- // Revision 1.15 1996/08/26 09:27:59 Quoc
- // Revision 1.14 1996/08/15 18:23:27 Quoc
- // Revision 1.13 1996/08/15 15:29:52 Quoc
- // Revision 1.12 1996/08/12 13:57:31 Quoc
- // Revision 1.11 1996/08/05 18:11:43 Quoc
- // Revision 1.10 1996/08/02 20:56:46 Quoc
- // Revision 1.9 1996/07/27 18:22:02 Quoc
- // Revision 1.8 1996/07/22 02:02:19 Quoc
- // Revision 1.7 1996/07/19 08:13:17 Quoc
- // Revision 1.6 1996/07/13 05:12:17 Quoc
- // Revision 1.5 1996/07/11 02:35:09 Quoc
- // Trade interface and profile screens working.
- // Revision 1.4 1996/07/08 17:36:21 Quoc
- // Revision 1.3 1996/07/08 10:10:49 Quoc
- // Profile sent to server
- // Revision 1.2 1996/07/06 05:16:05 Quoc
- // Revision 1.1 1996/07/04 02:59:24 Quoc