Monkey + Js = awesome

Monkey Archive Forums/Monkey Discussion/Monkey + Js = awesome

Shinkiro1(Posted 2016) [#1]
So here is an idea for you, if you are struggeling with UI code.
Just wire up monkey with the dom and add elements to it (textfields, buttons, maybe videos ...)
Now you get all that functionality for free, while still having a nice typed language :)


Shinkiro1(Posted 2016) [#2]
This is what I mean:


The textarea is html, the map in the background is canvas/monkey.
Maybe later I will drop in something like Ace: https://ace.c9.io

And I only use it for internal gui stuff, so when I ship the game I can just remove the editor and compile for any platform available.


Pakz(Posted 2016) [#3]
Another thing to learn :)

I have not looked at the inners of html5 monkey. One thing I wish to learn is how to let monkey programs output text to a html textarea. Then I would be able to convert my sprite editor that creates/read data statements for pasting into code. But monkey 2 might have a useable textarea gadget that can be used to copy paste data. Might be good to wait if it is not to long.