Masked edit

Blitz3D Forums/Blitz3D Beginners Area/Masked edit

Agamer(Posted 2003) [#1]
DOes anyone know how I could make a textbox using blitz UI in blitz 3d which apears in stars like *****


eBusiness(Posted 2003) [#2]
Ya, just print your stars to the screen, preferably using the Text command.


Agamer(Posted 2003) [#3]
kwl thanks


Agamer(Posted 2003) [#4]
but one wuestion how do I get so they can type and the'll come up as stars without the other non star ones being seen


eBusiness(Posted 2003) [#5]
Oh, you mean password enter way, so you enter a password and it'll appear as stars?

Then you'll need to make your own input code, (or borrow one from me, just a moment)

This is probably what you want:
		value=0
		cmsg$=""
		stars$=""
		period=0
		Color 0,0,0
		While value<>13
			value=GetKey()
			If value<>0 And value<>13 Then
				If value<>8 Then 
					If Len(cmsg)<24 Then
						cmsg=cmsg+Chr(value)
						stars=stars+"*"
					End If
				Else
					cmsg=LSet(cmsg,Len(cmsg)-1)
					stars=LSet(stars,Len(cmsg)-1)
				End If
			End If
			Color 255,255,255
			Rect 0,0,200,15
			Color 0,0,0
			If period<250 Then
				Text 0,0,stars
			Else
				Text 0,0,stars + "_"
			End If
			Delay 2
			period=period+1
			If period=500 Then period=0
		Wend