home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Magazin 1997 March / Image.iso / wd.dxr / Namen_16_NamenEingeben.ls < prev    next >
Encoding:
Text File  |  1996-10-28  |  987 b   |  41 lines

  1. on NamenEingebenKeyDown num
  2.   if the key = RETURN then
  3.     dontPassEvent()
  4.   else
  5.     pass()
  6.   end if
  7. end
  8.  
  9. on NamenEingebenkeyUp num
  10.   global gNoPlayers
  11.   set fAllOk to 1
  12.   repeat with i = 1 to gNoPlayers
  13.     if the text of member ("NameField" & i) = EMPTY then
  14.       set fAllOk to 0
  15.     end if
  16.   end repeat
  17.   if fAllOk then
  18.     repeat with i = 1 to gNoPlayers
  19.       repeat with j = 1 to gNoPlayers
  20.         if i <> j then
  21.           if the text of member ("NameField" & i) = the text of member ("NameField" & j) then
  22.             set fAllOk to 0
  23.           end if
  24.         end if
  25.       end repeat
  26.     end repeat
  27.   end if
  28.   if fAllOk and (the visible of sprite 5 = 0) then
  29.     set the visible of sprite 5 to 1
  30.     SpriteCursor(5, ["CursorFinger", "CursorFingerMask"])
  31.   end if
  32.   if not fAllOk and (the visible of sprite 5 = 1) then
  33.     set the visible of sprite 5 to 0
  34.     SpriteCursor(5, 0)
  35.   end if
  36. end
  37.  
  38. on NamenEingebenMouseUp num
  39.   set the editable of member ("NameField" & num) to 1
  40. end
  41.