Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: SupSuper on Mon 16/06/2008 18:43:23

Title: Editor Plugin question: using IScriptEditor as a TextBox
Post by: SupSuper on Mon 16/06/2008 18:43:23
I created a IScriptEditor control through GUIController.CreateScriptEditor, but there isn't much I can do with it aside from placing it in my panel and changing its content. Is there any way to be able to get text selections and other user input from it, like a TextBox? I can't cast the control since it's a custom type.
Title: Re: Editor Plugin question: using IScriptEditor as a TextBox
Post by: Pumaman on Mon 16/06/2008 19:36:44
The IScriptEditor interface was added basically as a placeholder because I wasn't sure what people would want to do with it. Can you give a list of commands that you want to be able to perform on it?
Title: Re: Editor Plugin question: using IScriptEditor as a TextBox
Post by: SupSuper on Tue 17/06/2008 17:54:43
Well currently I just need to get the position of the text cursor (SelectionStart, SelectedText, etc). Being able to access the text as lines (Lines property) or format bits of text might also be handy in the future.

While I'm at it, is there any way to take advantage of the script editor's auto-complete to automatically figure out what function/property/etc. the text cursor is on, or is it better if I code that on my own?
Title: Re: Editor Plugin question: using IScriptEditor as a TextBox
Post by: Pumaman on Tue 17/06/2008 20:48:48
Quote from: SupSuper on Tue 17/06/2008 17:54:43
Well currently I just need to get the position of the text cursor (SelectionStart, SelectedText, etc). Being able to access the text as lines (Lines property) or format bits of text might also be handy in the future.

Ok thanks, I'll look into those for the next version.

QuoteWhile I'm at it, is there any way to take advantage of the script editor's auto-complete to automatically figure out what function/property/etc. the text cursor is on, or is it better if I code that on my own?

I'll look into that as well.