About Monkey 2 › Forums › Monkey 2 Development › I'de like to work on Ted2
This topic contains 10 replies, has 3 voices, and was last updated by
AdamStrange
2 years, 9 months ago.
-
AuthorPosts
-
July 5, 2016 at 6:29 am #1750
OK, first off thanks…. And i’ll try to be a good person.
I’d like to work on TED2 and bring it up to something more usable (for me) and possibly others.
Although I’m just learning Monkey 2, most should know my name from the blitzMax world?
So, first up would be to make ted2 a bit more pretty in the UI department.
I’ve been tinkering with the code and just made the line numbers more separated from the text (which brings it more into line with other editors)

I think <skidracer> is the author? Please let me know if I tread on anyones toes?
One thing I really would like to approach is how TED merges with documentation (currently it doesn’t seem to on a mac anyway), add a command index and searchable command tree, etc.
Attachments:
July 5, 2016 at 7:04 am #1752It’s open source – go nuts!
There actually an ‘almost working’ help browser in there – uncomment out this line in mainwindow.monkey2:
_browser.AddTab( “Help”,_helpView )
You’ll also need to add a ‘modules.txt’ inside /modules containing a list of modules, eg:
monkey
std
mojoJuly 5, 2016 at 7:25 am #1753Brilliant. Thank you Mark.
When you say ‘almost’, what do you mean? Where should I start to look to fix, aimed things?
July 6, 2016 at 6:25 am #1778What is the best practice for submitting changes to ted2?
July 6, 2016 at 7:03 am #1779You can make a pull request, but I wont be accepting any major architectural changes in the near future – sorry if I gave the wrong impression there.
If you are wanting to improve the look of the GUI, any tweaks to mojox/theme.monkey2 would be most welcome. The ‘Style’ system actually offers a lot of flexibility here, including the ability to use ‘nine-patch’ style images for any class of view. But this stuff is still undocced and a little rough so it might not be easy going.
You are free to release your own version though, perhaps I should start a monkey2 ‘projects’ forum for things like this?
July 6, 2016 at 7:47 am #1780ok, no worries.
Currently I’m looking into the themes and already having some luck with it.
In essence I am going for the visual studio look, so everything should be (in some respects) less flat and easier on the eye.
Most Of what I’m doing is inside the mojox folder
On thing.
I can backwards trace most functions to the root routine and forward to edit the code, but have hit a small wall with things that have the base class of ‘View’. Where do I find this class?
July 6, 2016 at 7:57 am #1781the issues I have is in the onRender
There seems to be an offset to the canvas so (say) canvas.DrawRect(0,0, 10,10) does not draw it at 0,0 but is off set inside a button by a few pixels
The background style color is fine, but I’m wanting to get the correct button canvas not the offset canvas
(not sure if I’m making sense) Here’s a pic of drawing at 0,0
You can see the white square is not at the top left of the button, but inset
Attachments:
July 6, 2016 at 8:05 am #1783View is in mojo.app, it’s actually the base class of Window.
If you can create a new theme by modifying just the theme.monkey2 file I’ll definitely add it to the release. But this is all likely to change in the long run (Style.Get should be in theme, and it should be possible to serialize a theme etc) so don’t get too carried away!
See source code for mojo.app.Skin for loading android style 9-patches. The Style class also has a ‘Skin’ property for setting skins. Padding rect goes ‘inside’ the skin, Margin rect goes ‘outside’.
Also, editor colors are inconveniently in ted2/mx2document.monkey2 so you’ll have to hack that too if you want to change editor colors.
July 6, 2016 at 9:16 am #1784Just a thought… maybe Ted2 should have its own Git repos by itself?
July 6, 2016 at 11:33 am #1787mmmm,
ted2/mx2document.monkey2 I was already inside there ;p
I’ll need to sit down and go through the skin and theme classes and get a good feel for what is going on. I’m sure I’ll break something along the way…
But it is a great place to start to learn what really make Monkey2 tick
July 6, 2016 at 11:43 am #1788Brilliant, sorted out the basics from the theme file!
-
AuthorPosts
You must be logged in to reply to this topic.

