Quote from: monkey_05_06 on Sat 28/08/2010 17:09:31
CJ told me off for using reflection to access things that aren't directly exposed in the plugin API, so I have a question. Is there any sort of precompile event exposed?
Not at the moment, no. I'll look into it for a future version.
QuoteAlso, I'm curious whether there's any way to access AGS event handler names, specifically for GUI event handlers. I don't need to invoke them (which I know editor plugins can't do of course), I just need to know the names. If possible, getting the parameter list as well would be nice.
Yes, this is accessible.
The IAGSEditor.CurrentGame.GUIs collection has all the GUIs in it, if the GUI is a normal GUI (rather than a Text Window) then it has an OnClick property (which is the only event that a GUI exposes):
foreach (GUI gui in _editor.CurrentGame.GUIs)
{
NormalGUI normalGui = gui as NormalGUI;
if (normalGui != null)
{
string onClickHandler = normalGui.OnClick;
// TODO: use the onClick handler name
}
}