fagiano:GUIEvent = {
Clicked = 1,
Resized = 2,
MouseMove = 3,
...
}
This doesn't seem to work. You say that you are using a global table, but this doesn't seem to follow the global format. As far as I can tell, it should be something more like this:
GUIEvent <- {
Clicked = 1,
Resized = 2,
MouseMove = 3,
...
}
This seems to work fine for the individual script that it's declared in, but any attempts to use this value from another script or from within C++ do not work. The docs fall short of useful examples here IMO. How should this be accessed from each? Is this considered to be part of the root table after it is executed?
This DOES NOT work:
const SquirrelObject rt = SquirrelVM::GetRootTable();
int value = rt.GetInt("GUIEvent.Resized");
'value' will be set to 0 every time. What am I doing wrong?