I'm a total noob and have no idea what I'm doing.
But I DID manage (with help) to get Dark GDK to take a string of typed text as input and then output it elsewhere on the screen. You can use backspace and everything.
If you're interested, here's the full code of the project:
// Dark GDK - The Game Creators - www.thegamecreators.com
// the wizard has created a very simple project that uses Dark GDK
// it contains the basic code for a GDK application
// whenever using Dark GDK you must ensure you include the header file
#include "DarkGDK.h"
#include <string.h>
// the main entry point for the application is this function
void DarkGDK ( void )
{
// turn on sync rate and set maximum rate to 60 fps
dbSyncOn ( );
dbSyncRate ( 60 );
char myString[60];
// our main loop
while ( LoopGDK ( ) )
{
dbInk ( dbRGB(255,255,255), dbRGB(0,0,0) );
dbText ( 100, 100, "Enter Text: " );
dbSync();
dbSetCursor ( 200, 100 );
strcpy ( myString, dbInput() );
dbInk ( dbRGB(0,0,0), dbRGB (0,0,0) );
dbBox ( 200, 100, 500, 150 );
dbBox ( 100, 170, 400, 220 );
dbInk ( dbRGB(255,255,255), dbRGB(0,0,0) );
dbText ( 100, 170, myString );
// update the screen
dbSync ( );
}
// return back to windows
return;
}
Right now it's "erasing" the old text by drawing black boxes over it. It would be more efficient to just retype the exact same string over it, except in black, but I haven't added that yet.