I've been trying to mod the UI a bit, but have not been able to properly integrate the Angelscript function calls in the Javascript elements. I'm almost certain that I'm missing something simple and obvious here, perhaps you can help me out. (It might also just be that what i'm trying to do is currently impossible, in which case I'll feel even dummer.)
Let's take a very simple example. In AS you can simply display some text with:
Code: Select all
SendLevelMessage2("displaytext","derp text here");
However if have not yet figured out how to call the same function from within the webkit User Interface, assuming of-course that's possible. For example, in palette.html (the tool palette) I tried repurposing the onclick() of the brush tool (line 95), and would like to do something like
Code: Select all
onclick="Client.SendLevelMessage2('displaytext','derp text here');"
Ultimately I'd like to load UI elements, like a custom window, by clicking a button in either the ribbon or the palette, basically using something like 'gui.AddGUI(...)' etc.
Also, It would be very useful for debugging purposes to write to the console. I found several functions mentions of 'console.warn()' and 'console.error()' in Data/UI/global/util.js but those don't seem to do anything.
Has anyone had any luck trying to create a new window from within The Webkit UI?
Any thoughts would be appreciated.