Active Forums => QB64 Discussion => Topic started by: Zeppelin on November 01, 2019, 04:11:23 am
Title: _PRINTSTRING For INPUT
Post by: Zeppelin on November 01, 2019, 04:11:23 am
Hey, Is there a command like _PRINTSTRING that allows coordinate placement of text but for INPUT? I am aware of LOCATE, but it doesnt use screen coordinates. If there isnt a way to do this, is there a way to convert LOCATE coords to _PRINTSCREEN coords?
Thanks, Zep
Title: Re: _PRINTSTRING For INPUT
Post by: FellippeHeitor on November 01, 2019, 04:22:25 am
LOCATE row, col: PRINT text$ 'is the same as _PRINTSTRING (col * _FONTWIDTH - _FONTWIDTH, row * _FONTHEIGHT - _FONTHEIGHT), text$ 'provided you’re using a fixed-width font
I just don’t know if INPUT will continue from the last _PRINTSTRING coordinates. You’ll have to try it out. (I have a hunch it won’t).
Title: Re: _PRINTSTRING For INPUT
Post by: TempodiBasic on November 01, 2019, 07:56:33 am
Hi Zeppelin ...about use of INPUT I find INPUT treacherouse!
Why? Because 1. when you use INPUT your control of flow of program is suspended 2. if you press RETURN key the output text is a new line... so how do you have control of the output in your program interface? 3. if you, user of the program, give the erroneous input type , INPUT goes ahead asking again input from user... also this is out of control and creates problems with your interface of program IMHO so INPUT is good only for programs with text line of output i.e. the command line of old OSes It seems that you have to use INPUT in a graphic interface... evaluate your conditions
Title: Re: _PRINTSTRING For INPUT
Post by: SMcNeill on November 01, 2019, 10:18:15 am
You might want to check out Terry Ritchie’s Input library. It has graphic coordinate input in it,
Title: Re: _PRINTSTRING For INPUT
Post by: TempodiBasic on November 01, 2019, 11:31:26 am
Hi again here an example of a new INPUT function in graphic mode 32 bit
You can modify for your needs eg adding colors and anticolors in user input section, but this demos the general idea of doing this and should serve basic needs.