The Game Creators
The Game Creators Home Click to Login
  Hot: April NewsletterAGK V108.2xAGK V2 Alpha 3AGK Google Nexus 10 Competition
The Game Creators
AGK Product Chat / Text Input and v1075

Go to the first page of this board Return to the Forum Menu Post Message
6 Messages - Page   of 1   
Bookmark and Share Search the Forum

Author Message
DaveP

User


Joined: Sun Sep 11th 2011
Location: Cyberspace
Posted: 4th Jun 2012 10:17           | link | toggle

I'm trying out v1075 in tier 2 (bought last year, finally cracking it open!) and now have the examples working - mostly. One that is troublesome is the text input, which doesn't allow any keys in Windows except for Esc and Return.

Looking through the forum, I understand the text input is not quite up to snuff, but this seems more than that - is this a case of 1075 being broken, or does Windows ignore most of the keyboard for some reason?

Also, according to the docs, agk::GetTextInput() returns a char* - how do we handle the value? Do we manage memory for that (and if so, do we use delete[] or free()?) or if the system does, when does the value go out of scope?

Finally, is there an anticipated timeline for a working text box, or do you recommend I roll my own for now?

Thanks
Back to top
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Gods own County, UK
Posted: 4th Jun 2012 12:24           | link | toggle

You should replace TextInput with Editbox functionality, which is a much richer set of commands and control.

I can't comment on the Tier 2 experience, but it's working better for me in Tier 1. I still have some issues, but hopefully they'll be down to my misunderstanding.

Back to top
Report this message as abusive
DaveP

User


Joined: Sun Sep 11th 2011
Location: Cyberspace
Posted: 4th Jun 2012 23:49           | link | toggle

Excellent! I'm digging into it now... any examples?

I notice this too requires a string returned for the result - does anyone know the proper way to manage its memory in tier 2 as well?
Back to top
Report this message as abusive
Google Ad
Back to top
 
Ancient Lady

AGK Master


Joined: Wed Mar 17th 2004
Location: Virginia, USA
Posted: 5th Jun 2012 00:17           | link | toggle

Here is a complete example, with fancy bits:
+ Code Snippet

It should be noted that input fields should be displayed 'high' enough on the page to allow for the pop-up keyboard on portable devices. This sample doesn't do that, it just shows off getting multiple inputs in one screen.

Cheers,
Ancient Lady
Back to top
Report this message as abusive
DaveP

User


Joined: Sun Sep 11th 2011
Location: Cyberspace
Posted: 5th Jun 2012 07:37           | link | toggle

Thanks very much!
Back to top
Report this message as abusive
Paul Johnston

TGC Developer


Joined: Sat Nov 16th 2002
Location: United Kingdom
Posted: 6th Jun 2012 03:17           | link | toggle

Quote: "One that is troublesome is the text input, which doesn't allow any keys in Windows except for Esc and Return."

This can happen if the Core.cpp files is not up to date, the latest should be in the AGK\IDE\apps\interpreter folder.

Quote: "Also, according to the docs, agk::GetTextInput() returns a char* - how do we handle the value? Do we manage memory for that (and if so, do we use delete[] or free()?)"

You should delete the string when you are done with it using delete[]. In general you can assume that if an AGK function returns char* then you are given control of the memory, if it returns const char* then the string is handled by AGK and could disappear at any time (for example reusing an HTTP connection by sending a request deletes any existing response string returned by GetResponseC)
Back to top
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
6 Messages - Page   of 1   
Search the Forum

Sorry, but it has been so long since anyone replied to this Thread that it has been automatically locked.
You may read it but not reply.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Dark Game Studio
Privacy Policy AUP Top of Page