Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / How to access Text created in Visual Editor?

Author
Message
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 9th Feb 2018 12:12
I inserted a text box into the visual editor, it gave me the ID as 103, however the following code...



has no effect, and debugging produces

Text 103 does not exist in main.agc at line 158

Am I doing something wrong? How do I access text boxes?
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 9th Feb 2018 13:50 Edited at: 9th Feb 2018 13:56
Try putting this before your main loop SYNC:
print(GetCurrentEditBox())

Run your app, then click the edit box... You should see the ID.

Or you can use the Visual Editor function: VisualEditor_GetID(name$, Scene)

i.e. if you edit box was called "edit box 1" and your are using scene 1, then use VisualEditor_GetID("edit box 1",1)

Happy coding!
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 9th Feb 2018 14:52
Oh wow, I was really confused by the Visual Editor then! The TextBoxes are simply assigned IDs as per Sprites...(from 100000).....

SO what is that field "Text ID" mean?

I just presumed it was the ID to use to identify the Text Box!
AdamRyan
6
Years of Service
User Offline
Joined: 13th Dec 2017
Location:
Posted: 9th Feb 2018 14:52
Thanks By The Way!!!!!!!!!!

Login to post a reply

Server time is: 2024-11-21 19:37:27
Your offset time is: 2024-11-21 19:37:27