Virtual Resolution / Diddy / SimpleGui on Android

Monkey Targets Forums/Android/Virtual Resolution / Diddy / SimpleGui on Android

AndroidAndy(Posted 2012) [#1]
I noticed that Diddy's SimpleMenu is rendered on the ExtraRenderer method, works fine, but if you use also use Diddy's virtual resolution and move your menu.Draw() to the Render method, the buttons are scaled, but the "hot spot" for the button click stays at the original resolution location and size.

Not sure how the SimpleGui class could be tied into the virtual resolution functionality? I already made a change to the SimpleMenu class to allow for horizontal menu layout. I would be happy to contribute code to the project, but not sure how to "officially" contribute? Also not sure if (or what type of) enhancements are welcome?

It would also be nice to have a section in the "Monkey General" section for "Monkey Open Frameworks". In that section you could place a forum Diddy and others. Or if that cannot be done, just a Diddy Forum under the "Monkey General" category :) Seems like there are enough posts in the forums to warrant a specific forum for the popular open source frameworks?


Samah(Posted 2012) [#2]
SimpleGui is therevills's baby, so he might want to answer this one. As to "official" contributions, we haven't really thought much about it at this stage.

Edit: I'm a little disillusioned with Google Code at the moment due to the removal of the "Updates" tab. Also I've been working with Mercurial a lot recently and I'm thinking that switching repositories from SVN might be better for collaborative work (more than therevills and me).


therevills(Posted 2012) [#3]
Re: SimpleGUI and Virtual Resolution

All you need to do is when you instantiate the SimpleMenu object is set the final parameter to True:

menu = New SimpleMenu("ButtonOver", "ButtonClick", 0, 0, 10, True)

As the final parameter is useVirtualRes:
Class SimpleMenu

Method New(soundMouseOverFile$, soundClickFile$, x:Int, y:Int, gap:Int, useVirtualRes:Bool)


And of course you can draw the menu in the normal render section, the example just shows it in the ExtraRender method.

With contributing you can post your enhancements/fixes in the Diddy thread and we'll have a look at them.

Re: Mercurial, I do like it, but for Diddy SVN is all we need...


AndroidAndy(Posted 2012) [#4]
@therevills - Thanks, forgot about that last param :)


AndroidAndy(Posted 2012) [#5]
@therevills - Sorry where exactly is the Diddy thread and I don't see how I can upload the source, do I just past the entire source into the reply?


therevills(Posted 2012) [#6]
Heres the main thread: http://www.monkeycoder.co.nz/Community/posts.php?topic=1964

And you can either upload source via a free file storage site, pastebin and just wrap you code in codebox tags on the post itself.