TGC Codebase Backup



input for 3D programs by sengsjc

5th Feb 2004 11:54
Summary

A replacement for the core command for 3D games



Description

this function replaces the standard input command.
The reason is that the "input text" will not appear when working with 3D environents, with this code it will.
Parameters are:
message$ - some text to prompt the user
cx - the cursor x position on screen for the message
cy - the cursor y position on screen for the message
Usage:
text_in$ = get_text("Enter some text",10,10)



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    function get_text(message$,cx,cy)
   repeat until returnkey()=0
   CLEAR ENTRY BUFFER
   repeat
      set cursor cx,cy
      print message$+" "+ENTRY$()+"_"
      sync
   until returnkey()
   repeat until returnkey()=0
endfunction ENTRY$()