Challenger GUI

Monkey Archive Forums/Monkey Projects/Challenger GUI

chrisc2977(Posted 2012) [#1]
Challenger GUI - a simple yet powerful customisable gui system

Flash Example: http://megaswf.com/serve/2337573 - (click 'edit' - 'Preferences' to change style and shadows)

Mobile Example: http://megaswf.com/serve/2337255

Download latest release (1.1): http://megaswf.com/serve/2337967



You also need the FREE FontMachine module: http://www.jungleide.com/?page_id=515





What do you think?

Incredibly Easy to use and implement
Import challengergui
Global MyWindow:CHGUI
MyWindow = CreateWindow(X, ,Y, W, H, Title, Flags....)

CHGUI_Update()
If MyWindow.Clicked then blah blah

CHGUI_Draw()


Other Features
Custom Styles/skins
Optional Custom keyboards (Work in portrait and landscape)
Optional shadows
Nearly everything is done automatically
Compatable with all targets
Module based with full documentation
Infinite Multi tier menus
Infinite parenting
Tabs
Ability to 'LockFocus' on a specific window
Mobile_mode
Optional Drag scrolling
Optional textbox Autoscroll
Message box

Still to do
Visual builder (paid for software - but not required)
More example skin/s


All comments, ideas, problems and suggestions very much welcome!


chrisc2977(Posted 2012) [#2]
Any preference to whether the window titles should be bold?


NoOdle(Posted 2012) [#3]
I think you should be able to have the option to make any text bold.


Cartman(Posted 2012) [#4]
Very nice job. Looks very smooth. Keep up the good work.


Snader(Posted 2012) [#5]
Nice job!


ziggy(Posted 2012) [#6]
Looks awesome!


DPbrad(Posted 2012) [#7]
Looks great!


chrisc2977(Posted 2012) [#8]
Just finished the parent system.
- You can parent a GUI Element to a window (Optional)
- You can Parent a window to another window (Optional)
- Child inherits state (visible / Active) and relative position
- Child Windows stay on top of Parent Window
- Its unlimited - i.e. you can have parents of parents of parents etc.

Dropdown boxes nearly finished also


Goodlookinguy(Posted 2012) [#9]
Keep up the great work. Also, I was looking for focus locking on the box in front. Like a preferences box in a standard application. Does your recent update allow that as well?


chrisc2977(Posted 2012) [#10]
@Goodlookingguy
How about a command like LockFocus(Window) that makes all other elements Inactive and keeps the chosen one ontop untill you use UnlockFocus() ?

I.e.
If Preferences.Visible then 
    LockFocus(Preferences)
Else
    UnlockFocus()
End If



Goodlookinguy(Posted 2012) [#11]
Yeah, that'd be great. Cause it'd also allow focus to be thrown to something else if necessary pretty easily.


chrisc2977(Posted 2012) [#12]
Cool I'll implement that aftervwork 2night, thanks for the great input. Also when lockedFocis is used it should keep any child windows of the lockfocus's window active.

After a think this should be an easy feature to add with the current framework, 10 lines of code max :) so will update top post example 2nite


chrisc2977(Posted 2012) [#13]
Cool I'll implement that after work, thanks for the great input.
Also when LockFocus is used it should keep any child windows of the lockfocus's window active also.

Edit
After a bit of a think earlier I recon this should be an easy feature to add with the current framework, 10 lines of code max :) so will update top post example 2nite.


Skn3(Posted 2012) [#14]
This is very slick :D will it be skinable?


chrisc2977(Posted 2012) [#15]
Yes it is skinable.
All of imagery is taken from a png file.
You can do your own and apply it simply by:
GUI_Style = LoadImage("MyStyle.png")



matty47(Posted 2012) [#16]
Given your previous high quality work this is looking great. Anticipating being able to create "Good Looking" GUI apps when this is available.


chrisc2977(Posted 2012) [#17]
Wow :) Thank you all for such nice comments, Im so glad I posted my work/progress on the forums, so many nice people and good suggestions :) Really makes the difference and such a motivation boost.

Ive finished the LockFocus() and UnlockFocus() Code but I just want to improve the Imagery of the Dropdown box before I post an example up.


chrisc2977(Posted 2012) [#18]
Update:
Different Skins
LockFocus() and UnlockFocus()
Parent / Child System


Raz(Posted 2012) [#19]
Hey that's really smart :) Nice one


Goodlookinguy(Posted 2012) [#20]
Awesome. Can't wait until this is available. I've been putting off working on the GUI for my simulator until this is ready. Seeing this latest update assured me that it was the right choice.

Edit: When you release this I'll be taking advantage of, probably, most of the GUI elements. So I'll report as many bugs or suggestions of features at that time. Getting anxious waiting, thinking what could be done with this. :)


chrisc2977(Posted 2012) [#21]
@Goodlookingguy
Thanks that would b great :) Glad its living up to exectations so far.

I've just finished Imagebuttons and am working on the menu system


chrisc2977(Posted 2012) [#22]
Changes
Implemented a Menusystem
Image Buttons
Added Shadows to menu system (optional)
Added Shadows to dropdown {Optional)
Changed the way the dropdown Close code.

Dropdown Items and Menu Items can now be made Active/Inactive and Visible/Hidden.

I have also rewritten the way the GUI handles parented windows, its now a lot smoother and more 'right'.

After spotting a nightmare bug Involving the checking I have re-vamped a lot of the update/Checking code.

All should be working smoothly now :)


chrisc2977(Posted 2012) [#23]
Ok, Sliders now finished

Also check out the retro window theme (Under Edit - preferences) :)


fsoft(Posted 2012) [#24]
@297chrisc, when will we be able to test some of your code? :-)


chrisc2977(Posted 2012) [#25]
If I get the textfield and labels done first then if u want I can release a beta? ( it wont have docs thou)?

Ater that I'll be coding
- 'mobile mode' which will feature increased sizing for small screens
- GUI drag scrolling
- Auto scroll for 'onfocus' textffields (moving them from under the onscreen keyboard)
- and custom keyboards.

All of the above will be optional so for example you can have a keyboard on Xbox in non mobile mode etc, Optional keyboard on mobiles etc etc.


visionastral(Posted 2012) [#26]
Hey! thank you very very much 297chrisc!!
Its really a wonderful gui system you are making there!
Can't wait for the textfield/keyboard input !
:p


visionastral(Posted 2012) [#27]
You know what would be a really really cool feature?
TABS
Tabs are those kind of wonderful things that makes a GUI so much powerful by allowing the reuse of space dinamically.

Another feature that you could implement is the ability to resize windows and add some widgets properties for them to follow the resized window (sticking to a side) or be resized along with the window.

Just my personal wish list :p


chrisc2977(Posted 2012) [#28]
@ visiona astral
Hey, thanks for the input, shouldn't be too long for the beta now, custom keyboard will take a bit longer thou :)
I agree tabs and resize would be very cool but am worried it would stop being a simple system, if when creating an element you had to enter which window, which tab, how it resizes etc?
Currently for example to add a top menu (not inside a window) u just have to type
Myfilemenu = CreateMenu("File")

Id hate to loose that level of simplicity.

Thoughts anyone?


chrisc2977(Posted 2012) [#29]
Tabs I think I can do without overcomplicating things, so yes, I will implement them :)
But personally I think resizing would be a step to far.

Saying that im open to opinions so let me know what u want guys


matty47(Posted 2012) [#30]
I don't believe that resizing is necessary especially when using a gui on mobile phone and tablet applications. How many apps on these platforms do you have that have resizable windows? My experience is that you are after all the 'real estate' that you can get.
As I use a mac i am quite used to a single menu at the top of the screen.......but tabs would be nice
Hope to be able to try this soon. Thanks


visionastral(Posted 2012) [#31]
"Id hate to loose that level of simplicity."

you are right, simplicity is a priority!
I only thought of the resize thing because every device out there is having diferent resolutions lately and it's quite a concern.
But I suppose the best solution right now is to use a virtual resolution aproach. (externally of the gui module I mean)

Anyway, if you make tabs, I will be more than happy!


fsoft(Posted 2012) [#32]
297chrisc, I think you should try to feature-freeze your GUI system, in order to be able to have a first release, then get a list of "desiderata" and prioritize them for next releases.

I just can't wait to test your system. I have a gfx guy that could make some pretty good new skins ;-)


c.k.(Posted 2012) [#33]
I'd like to have an option such that child windows can't be dragged outside the parent window's border.


chrisc2977(Posted 2012) [#34]
@C.K
Cheers, I have been thinking about this for a while and I think that in most situations you will want them within the parents so I will make it do this by default.


chrisc2977(Posted 2012) [#35]
Had a very productive evening :)

Update
Tabs (you can even parent a sub window to a tab - as demonstrated)
Textfields
Subwindows remain inside their parent window


All is going as planned for the Beta release on Friday :)


NoOdle(Posted 2012) [#36]
ooohh nice! I like this a lot


fsoft(Posted 2012) [#37]
@297chrisc .... Friday? It is tomorrow!! :-))


chrisc2977(Posted 2012) [#38]
Lol yeah it is tomorrow :)
I just need to make a few tweeks and I want to write a few examples.
Might even get it done late tonight :)

After that its on to GUI scrolling, mobile mode and custom keyboards.

Then port it to Bmax (wont take long - its written with this in mind)

After that it will be time to make a 'visual builder' so you can layout the elements visually and set the parameters in a nice environment (made using my module of course) (Think a visual basic style layout editor) and it will export the code to either monkey or bmax so you can just paste it into your project (create an entire GUI without typing a single line ) :) That's the plan anyway.


fsoft(Posted 2012) [#39]
Lots of good ideas! :-)

Since I am subscribed to this topic, if you are going to release late this night, I'll be there catching the source ASAP :-)

I'd also like to contribute in some way. Hope to be able to read and "handle" your source code ;-)


chrisc2977(Posted 2012) [#40]
Challenger gui Beta released :)


visionastral(Posted 2012) [#41]
First one to catch it!
xD

Hell THANK YOU


visionastral(Posted 2012) [#42]
COOOOOL YOU MADE TABS!!!!!
:D

Bye the way, I had to download the last FontMachine module from the Jungle IDE website for this to work (mine was an old version) and it doesn't works on HTML5 (don't know why, thought) (did work on GLFW, XNA and FLASH)

Can't wait to test it on android!

-update-

YEAH! it works like a charm on android too!

Chris, you really made my day, man.
You granted yourself a free copy of the app I'm building (if only I finish it one day xD)

A quick suggestion: double click on the window title bar to collapse/show it (like with old macos)


visionastral(Posted 2012) [#43]
Any idea when will you start the visual editor?
(don't want to rush anyone here, just to know if I should wait for it or start on my own)


chrisc2977(Posted 2012) [#44]
Lol love the enthusiasm :) glad you like it lol. It will get a whole lot better for android one mobile mode is done.

As for the builder, this will be quite a big project that has not been started, so don't hold your breath, id say at a rough guess a month or 2?


visionastral(Posted 2012) [#45]
"Lol love the enthusiasm :) glad you like it lol"

You saved me from making a GUI from scratch that wouldn't be as cool featured as yours, so I suppose that's the minimum I can do: being enthusiast! xD

By the way, what are the differences with the mobile mode? (aside from launching the virtual keyboard of course)

Pushing those little tiny touch buttons in a phone screen isn't easy, either you make them bigger or you make a "coarse" precision mode for clicking next to them.


chrisc2977(Posted 2012) [#46]
Mobile mode will Automatically increase the size of the fonts (If NOT using custom fonts) Also it will increase the size of the menu's and titlebars etc.

For example if you enter
GUI_TitleHeight = 40 in your 'OnCreate' method you will see what happens :)

Menu height and Tab Height goes off the height of the GUI_Font

Edit
Ignore that line across the titlebar, it is in the image not the code :) just fixed it.


c.k.(Posted 2012) [#47]
Another SMALL, TINY suggestion: Could you make the top menus toggle? That is, when I click a menu item, I can click on it again to turn it off.

Thanks! :)


chrisc2977(Posted 2012) [#48]
@c.k.
Great, will do that now :)


chrisc2977(Posted 2012) [#49]
"A quick suggestion: double click on the window title bar to collapse/show it"

I will try to do this, not sure how to go about it atm - will have a think :)


chrisc2977(Posted 2012) [#50]
A quick suggestion: double click on the window title bar to collapse/show it


Could you make the top menus toggle? That is, when I click a menu item, I can click on it again to turn it off.


These have now both been implemented along with labels


(not uploaded yet - will wait a bit for any other things to fix / change)


therevills(Posted 2012) [#51]
Hey Chris,

This looks great :)

I've just downloaded it and was wondering what is the license for use is?

Also just looking thru your code:

* I normally place all the private fields together so I dont have to keep switching between private and public

* Not very OO... any reason you coded it like this? (Not that its bad, its just strange ;))

* And a weird code standard, but hey each to their own and its consistant :)


visionastral(Posted 2012) [#52]
Actually, I find this way of coding quite similar to mine.
Old school ways I suppose...


therevills(Posted 2012) [#53]
Old school ways I suppose...

Yeah very procedural... which is why I find it strange in Monkey, since its very OO ;)


visionastral(Posted 2012) [#54]
Chris, I had to change your module's name to something less generalistic in order to avoid conflicts with other modules like therevills's Diddy (wich also has a GUI and a GUI class...)

So I just named it "challengergui" in the modules folder and changed the GUI class name to CHGUI in order to avoid problems.

I'm making a visual editor for your Challenger GUI and needed some (very useful) native functions from diddy.
The visual editor will be opensource for everyone to hack around.
(by the way therevills, what is the difference between GNU and MIT licenses??)

If you don't like those names just tell me and I'll change them, but let's avoid general terms like GUI.


NoOdle(Posted 2012) [#55]
Where can I get the fontmachine module from? Can run any of the examples which could be a problem!


Goodlookinguy(Posted 2012) [#56]
http://www.jungleide.com/?page_id=515


NoOdle(Posted 2012) [#57]
ah thank you! I didn't realise it was a free module


visionastral(Posted 2012) [#58]
You can get the fontmachine module here:
http://www.jungleide.com/?page_id=515

too late :p


chrisc2977(Posted 2012) [#59]
I don't know a lot about licences, this module is free for anyone to use, change etc, do what u want with it :).

As for the coding style, I'm still a bit of a noob, this project is only the third one I've made I'm just surprised it works and other people like it lol.
I guess my style will get beter the mire I do :)

Can I include the Fontmachine module in my download?

challengergui and CHGUI sound good ill change that on mine too.

Would love to see your visual editor, when its done ill post the link at the top of this thread :)

Any screenshots of custom skins yet?
Any other issues to fix?

Thanks all :)


visionastral(Posted 2012) [#60]
the reason people out there license their code (even under free licenses) is simple:
if you don?t license it, anyone can pick can pick your code, made a paid software with it and then sue YOU for copyright infringement.
That's why GNU and MIT licenses exists, to protect free software and developpers against this kind of tricks.
It has already happened to me and to a lot of us. (to make a free software and then someone comes and just sell it. But it could get worse, like banning you, the creator, from using it.
Licensing source code is as easy as this: (from the MIT license site)

I want to publish some code as Open Source code — can I get a license from you?
As long as you own that source code, all that you need to do is choose one of the approved Open Source licenses, include a copy of the license text, typically in a filenamed "COPYRIGHT", including a statement saying that you are licensing the code under that copyright, and give it to somebody else! Of course, you probably want to give it to a lot of people in order to gain the maximum benefit from giving away your code. A number of websites will help you do that: berlios.de, sourceforge.net, code.google.com, and others.

http://www.opensource.org/licenses/mit-license.php


visionastral(Posted 2012) [#61]
so you're a noob! I suppose that makes my coding style a noob one then! xD

I want to make a simple suggestion for optimisation sacke:
every time you use a variavle to store only 2 cases (0 or 1), use a BOOL type instead of an INT (default)
this will lower memory consumption and boost performances.

changing all your binary variables to boolean type will make them false=0 and true=1 (meaning you don't have to change the rest of the code, as you already use this convention)

bool types can be read as true/false or 0/1

good candidates are: Clicked, Over, GUI_Started....
when declaring them, just use the Bool identifier:

Field Clicked:Bool=false (or 0 if you like, it's the same)

(sorry for the typos: virtual keyboard)


chrisc2977(Posted 2012) [#62]
Thanks Visionastral,
But I get an error that says 'cannot convert from Int to Bool' Even when im only using 0 or 1?

I will defiantly get a licence then!

Nearly ready to upload an update


therevills(Posted 2012) [#63]
But I get an error that says 'cannot convert from Int to Bool' Even when im only using 0 or 1?

I wouldnt worry about it, keep it at INT - the memory saved isnt worth it and performance "increase" would be so small (if there is one).

And in Monkey you can't use 0 or 1 for the Bool type... and at the machine level there is no such thing as bool ;)


chrisc2977(Posted 2012) [#64]
in Monkey you can't use 0 or 1 for the Bool type

Thanks therevills, thought I was going mad :)


invaderJim(Posted 2012) [#65]
This is very good! Will definitely be using this for my editors from here on out.

297chrisc, you should consider using google code for this. You can host your files and license your code all at once! :)


chrisc2977(Posted 2012) [#66]
Latest Update.

Changes
module name = challengergui
class name = CHGUI
Command name changes - CHGUI_Draw() CHGUI_Update() etc
Double click titlebar to minimise window
Top menu toggle
MobileMode
Drag Scrolling
Textfield scroll - (moves the gui so that the textfield is not under the keyboard)
Few other minor changes / improvements

Still to do
Custom keyboards
Documentation
Couple more examples


visionastral(Posted 2012) [#67]
Ok, sorry for the Bool thing :P
I'm pretty paranoid with optimization.


visionastral(Posted 2012) [#68]
Thanks for the update!
Visual editor on the way. (making the visual interface now. With Challenger GUI of course)

By the way, I'm making the visual editor on monkey since I really want it to be WYSIWYG (what you see is what you get).
Even being coded in monkey, you are supposed to use it only in Windows or Macos, since I need OS module to manage files and make an output!
Output will be a .txt file and you'll have to rename it to .monkey

The editor will generate a main application from scratch and handle events with individual functions for each window. Much like Visual Basic / Visual C event based windows.
Basic wiring will be implemented: pressing a button open/close another window. Window can keep focus on activation and lose it once invisible.

Menu editor too.

I wish to use it for real projects, so it will be full featured.
and open source :)


chrisc2977(Posted 2012) [#69]
@visionastral
Sounds really good :) Exactly what I had in mind
I was going to make it in Bmax thou lol.

Im so jealous because I really wanted to start coding a visual editor but need to get the custom keyboards done first!

You need any help in working out my code just yell.


visionastral(Posted 2012) [#70]
Sorry :P
I desperately need a GUI for the app I'm making, and I need it to be flexible and well designed, since it will be used for development purposes. That's why I just couldn't wait for the visual editor! (I was at the point of begining my own GUI when I saw yours here, that's why I was so happy! xD)
I suppose most people would have turned to BlitzMax for making the visual editor, but since I never learned it (I was more like Blitz3D/BlitzPlus) it's not an option for me. :p

By the way, I just had an idea for the Challenger GUI: changing Windows colors.

Monkey has the particularity of drawing anything (even images) at the color you set before it starts drawing.

Example:
SetColor(255,255,255) will draw things normally
SetColor(255,0,0) will draw the same things in red only

This way, with 3 properties more for the CHGUI class (.RC .GC .BC), you can render the window and all its content in the desired color.

Implementing it is as easy as put SetColor at the begining of the DrawWindows method and put SetColor(255,255,255) at the end. (to avoid issues with the main app drawing)
Much like what you do with SetBlend. (by the way, an aditional property for the blending mode would be cool too)

I was thinking of it while making the editor.
Just an idea.


chrisc2977(Posted 2012) [#71]
I will run a test with SetColor later, but I'm thinking it will slow it down a lot because of the amount of images drawn. I'll give it a go thou
Cheers


visionastral(Posted 2012) [#72]
It shouldn't, since Monkey is doing it anyway. It's fast even in Android (tested it with other apps)
What IS slower is setting the blending mode to additive.


chrisc2977(Posted 2012) [#73]
Im right it does slow it down :)
I just commented out the SetColor inside the module and ran a test by setting the colour before the CHGUI_Draw() Function.


visionastral(Posted 2012) [#74]
After the name change from GUI to CHGUI the examples are broken. (at least the big nasty one)
I made a search and replace for "GUI_" to "CHGUI_" and that fixed it.

There is a little glitch too when your GUI draws the "T" letter: it makes 2 little points under it.

There is some kind of problem with the CreateLabel function. It raises an error saying it can't find the override.
I'm making regular labels using Tickboxes with a 0 size instead. (it works pretty well)

Still working on the visual editor. It will take some time thought, since it's quite complex to handle everything together. Not difficult, but very complex = time consuming.


Beaker(Posted 2012) [#75]
Isn't SetColor very slow on Html5?


visionastral(Posted 2012) [#76]
Since HTML5 is very slow for everything, I don't really know.
I think not, as long as it is hardware accelerated.
I'm using Firefox, don't know with other browsers.


NoOdle(Posted 2012) [#77]
Isn't SetColor very slow on Html5?

Yea I was also pretty sure SetColor was slow on HTLM5. I tried making particle make use of it and it barely ran. Might have to test again, maybe things have changed!


chrisc2977(Posted 2012) [#78]
Nope, still slow, FPS dropped from 60 to 25 when using SetColor on my big example.


chrisc2977(Posted 2012) [#79]
There is a little glitch too when your GUI draws the "T" letter: it makes 2 little points under it.

I could not see this - I tried an example in the titlebar, button and Tab??

There is some kind of problem with the CreateLabel function. It raises an error saying it can't find the override.

I think this is because of the syntax
Currently it is:
CreateLabel(Text, CentreX=0, CentreY=0,Parent=Null)

I think I will change it to
CreateLabel(Text, Parent=Null, CentreX=0, CentreY=0)


visionastral(Posted 2012) [#80]
The errors have something to do with all the things you declared as Private in your module. I just commented them out (because I needed more control over the events) and now the 'Can't find Override' things are gone.
Didn't checked the CreateLabel thought (since I'm using the Tickboxes succesfully)

About the SetColor thing, yeah, in HTML5 it's pure havoc. Doesn't happen on Android, XNA and GL (don't know with flash)

I have implemented a CPU throttle in your module in order to avoid high CPU charges: it lowers the framerate when not needed and raises it when input is required automatically. Works pretty well. It wouldn't be suited for games and things like this, but is cool for massive GUI apps like the visual editor I'm doing. Otherwise my macbook heated a lot.

The Visual Editor is on it's way: I have already done all the tedious part of managing and controlling every widget in an internal database and wiring properties with the user interface. Now It should be more fun.
How can I post screenshots here??


fsoft(Posted 2012) [#81]
297chrisc ... you did it man! :-)

Just wondering why I didn't get any email notification when you first post the beta announce on this forum page ...

I am downloading it right now! :-)

Thanks a lot!


chrisc2977(Posted 2012) [#82]
@ visuonastral
Wow that sound awsome, far beyond my level of coding :) would love to see it,
Just find a site to upload like photibucket and copy paste the line to the image with no tags.
That's going well fast, im still pottering about trying to get this dam custom keyboards to work!

@fsoft
Cheers bud, hope u enjoy :)


chrisc2977(Posted 2012) [#83]
Hell yeah!!!!

Got custom keyboards working :)
They work in landscape and portrait and even resizes itself on change :)

See top post for example and latest beta download.

[edit]
Worth mentioning it resizes to the device width so its great to use on any target

Also it uses the CHGUI_Style so it will always match any custom skins


visionastral(Posted 2012) [#84]
COOL! :)

We are definitively going somewere now! ;)
Monkey really needed this badly. I'm glad to be part of this :)
About the visual editor: creation and management of windows and button widgets done. Visual interface done at 85% and working as expected (all properties can be set visually)
Implementing the rest of the widgets and diferent edition modes now.

By the way, the CPU throttle thing are just some SetUpdateRate lines here and there, nothing fancy, really. Just did it for the editor so I did it quick and dirty but it could be fully implemented in the Challenger GUI module once you have a final release. This would be helpful for portable devices to avoid battery drain (android/ios)

Is still the module broken in HTML5? it didn't recognize any click interaction here.


screenshot of the early alpha:




chrisc2977(Posted 2012) [#85]
Looks amazing :) I'm really impressed!
You could also have a 'always on bottom' option too, gui supports this.

Html broken still broken? Don't think so, I do 90% of tests on html, all running smooth. Wonder why its not at your end? Can you try a quick test with the latest and unmodified module?

Great work again. I'll start on the documentation maybe 2mro.


visionastral(Posted 2012) [#86]
Actually, the Always on Top option doesn't work... it makes weird things. I have issues too with the Clicked method of the buttons and have to use the Down method instead. Don't know why is happening, but since it's minor bugs, I'll just pass and finish the editor. Once finished we could take a look together and fix it. (and since it will be open source, everybody could help on this too)

About the HTML, I will have to test it again, but the last time I did it, it was with the stock version of CHGUI. It must be something on my side...


chrisc2977(Posted 2012) [#87]
I'll have a look at these 2night after work. Must admit diddnt notice these errors lol


chrisc2977(Posted 2012) [#88]
@visionastral
I have had a look for your errors but cant find them?
Below is an example of different window modes (Always below, variable and Always on Top)
http://megaswf.com/serve/2337539

Also the button click thing? example should show the button number increasing when the button is clicked. (I have used Button.Clicked)

Here is the source for the example:


Any luck finding why your isnt working properly? also in html? Mine is still fine here.


chrisc2977(Posted 2012) [#89]
[Update]
MsgBox() Added
Main Example changed so you can see different keyboard styles and MsgBox
Few other minor changes


visionastral(Posted 2012) [#90]
Since the visual editor is quite complex in it's workflow (it's making windows on the fly and modifies properties after CHGUI has created them) it must be surely an error I made (not reordering windows at the correct time or something like this).
Don't care about it. As soon as I have a stable release I'll post it here (as an external download) so you can see were and when it's happening. It will be much easier this way than trying to explain in wich conditions this is happening.
They are really little bugs so I'm sure they will be fixed in no time.
(keep in mind I don't have any documentation of your module and there is no comments in the code, so I must be doing something the wrong way simply because I'm always doing things that weren't supposed to be done in the first place. Like, you know, making a program that makes programs that makes a GUI using your module. Issues were to be expected ;) )

About the HTML5, I will check it later. (I'm too focused on the editor now and I have to make profit from inspiration)


chrisc2977(Posted 2012) [#91]
lol fair enough look forward to release :)


Xaron(Posted 2012) [#92]
Wow, this is awesome! :)


chrisc2977(Posted 2012) [#93]
Documentation done and I think I am ready for first release :)


visionastral(Posted 2012) [#94]
Ok, I have been testing HTML5 and I can say now it doesn't work on FireFox 11.0
However, works perfectly on Internet Explorer 9.0.8
Don't know what they did but Firefox is known for breaking things on new releases...
This is one of the flaws of HTML5: results depend on browser...
Also, there is a little bug with the fonts: look at the "s" character, it has a little bit of another character showing at the top.

You generated the docs with the JungleIDE pro documentation feature, isn't it?


chrisc2977(Posted 2012) [#95]
Ah of course, stuped me diddnt think to test different browsers :s I just used chrome... textbook error lol
Will checkout font issue (hopefully I just need to change font image file).

Yeah jungle docs seemed like the most productive way and also it includes 'intelli prompt' data for those using jungleide.

Thanks visionastral


visionastral(Posted 2012) [#96]
I'll have to set things up in the editor's source code for generating the docs the way you did, now that I just bought a JungleIDE license :)


chrisc2977(Posted 2012) [#97]
Ok, Ive narrowed it down to the Tabs that are not working in firefox... But WHY!!!

[Edit]
Got it, I just had to change an int to a float in one of the drawing functions :)


ziggy(Posted 2012) [#98]
Just in case, FontMachine Module is under the MIT license:

Copyright (c) 2011 Manel Ibáñez

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


In other words, anyone is free to use it, distribute it, sell it, give it away free, or do whatever. It is free and open source. Enjoy! (I'm glad to see it being part of this GUI).


chrisc2977(Posted 2012) [#99]
Cool, cheers ziggy, Ill include the free module with my download then and also include a link to the font editor purchase page :)


visionastral(Posted 2012) [#100]
hey ziggy, sorry for the 2112 mail xD


ziggy(Posted 2012) [#101]
@visionastral: It's been fun :)


visionastral(Posted 2012) [#102]
Visual Editor working. User can't move/resize widgets with the mouse for the moment, only with the keyboard (avoiding clashes between the editor and the challenger gui module for the moment).
Multiple selections working for moving and deleting widgets (still to do mass property changes). Hierarchy working. All that you could code using Challenger GUI can be made visually now with the editor. :) (except menus)
There are lots of things left to do to make it enjoyable as an everyday editor, but those are only interface features that will be implemented lately (like copy paste, mass property changes or mouse moving/resizing).
Making the monkey source code export now. This way I will use the editor for making it's own windows ;)

I was thinking about the way it will export Challenger windows and has finally concluded that, by default, the editor will output an individual monkey source for every single window in the project + individual Challenger GUI module source + individual FontMachine module source + a separate source code for the main app that will 'include' each one of those individuals sources inside it and call them to create the GUI and manage the main GUI loop + behaviour.
This means the CHGUI and FontMachine module will be included as regular code in the same folder as the main app, avoiding the need for the user to install any module in monkey and enabling him to customize the modules in a per application basis. (after all, if you want to use the true modules instead of this local sources, you only have to delete the local sources of the modules and monkey would automatically call for the shared modules instead)
Exporting a single source for each window is handy for reusing windows from a project to another and for updating a current project (making new windows sources without having to regenerate the rest), but would quickly make tons of sources, so I think I will put them all into a single folder named "GUI_SOURCES".
Any thoughts?

Going for the export now.


chrisc2977(Posted 2012) [#103]
(avoiding clashes between the editor and the challenger gui module for the moment).

Idea1: Put all the user added elements into an array then you can loop through these checking for input to move, select and drag.

Idea2: Make a copy of challengergui, rename class to CHGUI2, import both and then use one for the editor and one for the user added stuff.

(Id probably go for idea 2, separating them out completely.)


chrisc2977(Posted 2012) [#104]
Update to version 1.1
http://megaswf.com/serve/2337967

[Changes]
Now works in firefox
Updated module to be easier to read / modify


visionastral(Posted 2012) [#105]
Chris, I already done that since I needed to put things in an array in order manage the users widgets. (in fact, it's an array of objects of custom class with a field in it that is a CHGUI object. This is because I need to manage much more information than the fields provided by your class)
I'm simply avoiding to fight for the mouse with your class right now, but I'll do it once I have done all the rest of things.

And I have already made a ChallengerGUI_editor_version from the begining since I want the generated sources to be run with the default version :)


visionastral(Posted 2012) [#106]
What was the problem with firefox then?
Really curious now!


DruggedBunny(Posted 2012) [#107]
Continued here!