Input without console

BlitzPlus Forums/BlitzPlus Beginners Area/Input without console

Castrapolis(Posted 2005) [#1]
Hi!!
How can I use the Input command without opening the console window?? Or is there any other command for
2D full screen mode??
Thanks Castrapolis


CS_TBL(Posted 2005) [#2]
see the help for:

CreateTextField
CreateTextArea


CS_TBL(Posted 2005) [#3]
Or use this full 24bit 5.1 audio, 32bit gfx, athlon hammer, multiduplex, single threading, and uncomplete ..: RequestInput!

; request input - CS^TBL
;
; and for the highlighting decls: RequestInput$(s$,x,y,width,height,def$)

StupidWindow=CreateWindow("o_O",0,0,320,240)

StupidButton=CreateButton("O_o",16,16,64,24,StupidWindow)

Repeat
	WaitEvent()
	If EventID()=$803 quit=True

	If EventID()=$401
		StupidCrap$=RequestInput$("what's up Doc?",64,64,160,48,"ooooohh... you wabbit!")
	EndIf

Until quit

Notify StupidCrap$

End



Function RequestInput$(q$,x,y,w,h,def$="")

	FlushEvents()

	requestwindow=CreateWindow(q$,x,y,w,h,0,1)
	txtfield=CreateTextField(2,2,ClientWidth(requestwindow)-4,ClientHeight(requestwindow)-4,requestwindow)
	If def$<>"" SetGadgetText txtfield,def$

	Repeat
		WaitEvent()
		If EventID()=$803
			If EventSource()=requestwindow
				localquit=True
				txt$=def$
			EndIf
		EndIf
		If EventID()=$401
			If EventData()=13
				localquit=True
				txt$=TextFieldText$(txtfield)
			EndIf
;			If EventData()=27 ; [esc] doesn't work orso  .. any suggestions? :)
;				localquit=True
;				txt$=def$
;			EndIf
		EndIf
	Until localquit

	FreeGadget requestwindow
	FlushEvents()
	Return txt$
	
End Function



rdodson41(Posted 2005) [#4]
Yes you would have to make, your own command like CS_TBL said, I actually asked a similar question recently:

http://www.blitzbasic.com/Community/posts.php?topic=40752