home *** CD-ROM | disk | FTP | other *** search
- global gNamenAuswahlPos, gLastNamenAuswahlPos, gScrollWhichDir, glastname
-
- on exitFrame
- go(the frame)
- if gNamenAuswahlPos > 1 then
- SpriteCursor(9, "Finger")
- set the visible of sprite 9 to 1
- else
- SpriteCursor(9, 0)
- set the visible of sprite 9 to 0
- end if
- if (gNamenAuswahlPos + 6) < count(gPlayers) then
- SpriteCursor(10, "Finger")
- set the visible of sprite 10 to 1
- else
- SpriteCursor(10, 0)
- set the visible of sprite 10 to 0
- end if
- if (glastname = field "NameField") and (gScrollWhichDir = #None) then
- return
- end if
- if field "NameField" <> EMPTY then
- set the visible of sprite 5 to 1
- SpriteCursor(5, "Finger")
- else
- set the visible of sprite 5 to 0
- SpriteCursor(5, 0)
- end if
- if gScrollWhichDir <> #None then
- set the visible of sprite 13 to 0
- end if
- case gScrollWhichDir of
- #down:
- set gNamenAuswahlPos to gNamenAuswahlPos + 1
- #Up:
- set gNamenAuswahlPos to gNamenAuswahlPos - 1
- #OneDown:
- set gNamenAuswahlPos to gNamenAuswahlPos + 1
- set gScrollWhichDir to #None
- #OneUp:
- set gNamenAuswahlPos to gNamenAuswahlPos - 1
- set gScrollWhichDir to #None
- end case
- if field "NameField" <> glastname then
- set gNamePos to 0
- repeat with i = 1 to count(gPlayers)
- if getAt(getAt(gPlayers, i), 1) = field "NameField" then
- set gNamePos to i
- exit repeat
- end if
- end repeat
- if gNamePos > 0 then
- if (gNamePos < gNamenAuswahlPos) or (gNamePos > (gNamenAuswahlPos + 6)) then
- set gNamenAuswahlPos to gNamePos
- end if
- end if
- end if
- if (gNamenAuswahlPos + 6) > count(gPlayers) then
- set gScrollWhichDir to #None
- set gNamenAuswahlPos to count(gPlayers) - 6
- end if
- if gNamenAuswahlPos < 1 then
- set gScrollWhichDir to #None
- set gNamenAuswahlPos to 1
- end if
- if gNamenAuswahlPos <> gLastNamenAuswahlPos then
- set text to EMPTY
- repeat with i = gNamenAuswahlPos to min(gNamenAuswahlPos + 6, count(gPlayers))
- set text to text & getAt(getAt(gPlayers, i), 1) & RETURN
- end repeat
- put text into field "NamenAuswahl"
- set the visible of sprite 13 to 0
- end if
- set the visible of sprite 13 to 0
- if (gScrollWhichDir = #None) and (field "NameField" <> EMPTY) then
- set pos to 0
- repeat with i = 1 to 7
- if field "NameField" = line i of field "NamenAuswahl" then
- set pos to i
- exit repeat
- end if
- end repeat
- if pos > 0 then
- updateStage()
- put field "NameField" into field "HiliteNameText"
- set the puppet of sprite 13 to 1
- set the locH of sprite 13 to the locH of sprite 12
- set the locV of sprite 13 to the locV of sprite 12 + ((pos - 1) * the height of cast "HiliteNameText")
- set the visible of sprite 13 to 1
- updateStage()
- end if
- end if
- set glastname to field "NameField"
- end
-
- on keyUp
- DoNameKey(1)
- end
-
- on keyDown
- DoNameKey(0)
- end
-