TextBox _Activate Isn't Working (Solved)

Started by Yuko Ichihara, Tue 07/10/2008 15:43:51

Previous topic - Next topic

Yuko Ichihara

I know this has been asked before,  but after trying all the different 'solutions' I decided to specifically post my situation and problem.

I'm trying to create a text parser GUI similar to that of the older Sierra games like Kings Quest I.

I've created a TextBox GUI which is shown all the time...well except for when text pops up or saving/loading etc...
I use the -
Code: ags

function textboxname_Activate (GUIControl *control) {
//Do something based on input
}

When I test it pressing enter does not perform the actions in the function, I even tried making it display a GUI.

I had previously tried using the On_Activate (GUIControl *control) function but it kept giving me errors in regards to the parameters and other errors.

Normally I'm really good with scripting but this is weird...I've tried a number of things and looked at examples but still nothing...so any suggestions would be appreciated.
"Normal? What's normal? To only do what the masses do? And what is the benefit of that? Where is the problem in adopting a custom that is 'abnormal' if it has no negative effect on the world at large?" - Yuko Ichihara

monkey0506

Have you properly linked the function in the TextBox's Events pane? When you have the GUI open and the TextBox selected, in the bottom right hand corner you should see the Properties pane. Right above that you should see a lightning bolt-shaped icon. Click on that. There you should see one item: OnActivate. In the box to the left put the name of your function: textboxname_Activate (or just click the ellipses (...) button on the right). And that's it!

If you've already done this...I'm not sure off the top of my head what could be wrong. But from the sound of things I'm almost certain it's not properly linked...

Yuko Ichihara

Thanks that fixed the problem so now it works. :)
"Normal? What's normal? To only do what the masses do? And what is the benefit of that? Where is the problem in adopting a custom that is 'abnormal' if it has no negative effect on the world at large?" - Yuko Ichihara

SMF spam blocked by CleanTalk