EasyGUI

Monkey Archive Forums/Monkey Projects/EasyGUI

tOmzone(Posted 2012) [#1]
Hey guys,

its my first post here :) and I would like to show my little Monkey project.
Its a GUI module for easily adding windows, buttons, etc. to your game.

Test it here:
http://81.20.132.136:8080/htdocs/egui/MonkeyGame.html

Download 0.9d:
http://81.20.132.136:8080/htdocs/EasyGUI%200.9d.rar




Currently the following UI-Controls are supported:

Windows
Buttons
Checkboxes
Radiobuttons
Sliders
Listboxes
Labels
GUIKeyboards
NativeKeyboard
Imagebuttons
Comboboxes
ControlManager

Coming controls:
Textboxes

greetz

edit: hmm, how does the img-code work? :S


slenkar(Posted 2012) [#2]
remove all of the img tags and the images will show


tOmzone(Posted 2012) [#3]
hmm are you sure? i dont see any images :(

edit: Ok, changed the uploader and its working now. thx


DrT(Posted 2012) [#4]
Looks great. Looking forward to downloading the module and trying it out.


benmc(Posted 2012) [#5]
Wow. I've been working on something very similar in a Game Core system I've been putting together, but you're a ways ahead of me. If you don't mind, I would love to see it in action in a demo even before the code is released. Oh, and what license are you considering for the code?


frank(Posted 2012) [#6]
Cool, any source ?


tOmzone(Posted 2012) [#7]
Here is a small demo of the gui:

http://81.20.132.136:8080/htdocs/egui/MonkeyGame.html

I still have several things to improve but after that I will release
a first testversion of the module under the MIT-License... maybe tomorrow.

See ya


frank(Posted 2012) [#8]
Great!

Under Chrome it's taking up a ton of CPU. I know it's WIP, but just wanted to say.


Raz(Posted 2012) [#9]
Fantastic t0mzone :) looking good.


tOmzone(Posted 2012) [#10]
Hey people, thank you for the feedback!

here is a first release v0.9b of the module

http://81.20.132.136:8080/htdocs/EasyGUI%200.9b.rar

Documentation and a little code example are included. Have fun!

@frank:
yes, you're right. i think html5 seems to be pretty slow with SetColor and DrawLine, etc. but maybe i should just update Monkey to current version lol.
Ive tested it on my android phone and it ran fine there.


frank(Posted 2012) [#11]
Btw; why didn't you build on the Diddy one? Just a question, but is seems if all would be hacking on the same stuff it would go a lot faster?

Also do you plan to add a textbox / textarea and maybe (pleeeasseee :) hack on native keyboard support for android/iphone ? :)


tOmzone(Posted 2012) [#12]
When I started this project I didnt know diddy, so I didnt build on it :)
I just wanted to have my own simple GUI lib, which is easy to use and does not need any external graphics but the fonts (dont know, whether diddys gui needs external gfx).

And yes, textboxes/areas are planned. I will think about using the native keyboard functions too...


frank(Posted 2012) [#13]
Sounds great; if you read around here, you'll see a lot of requests for doing native keyboard; on iOS/Android (and WP7(.5)) it's kind of a no-no to not have that; it'll feel alien to users...


frank(Posted 2012) [#14]
I guess if someone could explain how to get the native keyboard activated I wouldn't mind integrating and testing that, but I just don't have time to figure that out myself at the moment.


NoOdle(Posted 2012) [#15]
@frank - Check the banana's folder, mark (mak folder) has written a native keyboard example, it is easy to use and works well.

@tOmzone

Nice, good job so far. If you did decide to switch to using images you can use the command Include to add image files from folders other than the .data default one. That means you can bundle a default skin in the gui module folder and load it directly from there.


Paul - Taiphoz(Posted 2012) [#16]
I'ts very slow on my machine, running chrome. not sure if its the same on firefox cant test it at the moment.


DrT(Posted 2012) [#17]
Nice work. Thanks for sharing.

"I just wanted to have my own simple GUI lib, which is easy to use and does not need any external graphics but the fonts..."

I am very much in favor of the KISS philosophy.

Looking forward to future updates.


frank(Posted 2012) [#18]
Thanks @NoOdle,

That looks a lot easier than I thought :) Going to do some testing. @tOmzone seems when the text* controls are done, keyboards are easy :)


frank(Posted 2012) [#19]
tOmzone, did you manage to progress with this ?


tOmzone(Posted 2012) [#20]
Hey,

I was pretty lazy last days but yes, I had some progress with it :)

here is the new version 0.9c:
http://81.20.132.136:8080/htdocs/EasyGUI%200.9c.rar
(Contains documentation and a code example)

Added:
- NativeKeyboard class (allows you to use your Android/iOS native keyboard or the keyboard on your pc)
- ImageButton class

Coming features:
- textfields
- comboboxes


frank(Posted 2012) [#21]
Fantastic! Keep up the good work!


tOmzone(Posted 2012) [#22]
thanks frank :)

finally here is the new version 0.9d!

Added classes:
- combobox class
- controlmanager class

A controlmanager is a collection class, where you just throw in your controls. The manager will automatically integrate a layer system for your windows (windows that are clicked get on foreground etc.) and it generally improves the behaviour of all controls. An updated code example is included in the download.

Download:
http://81.20.132.136:8080/htdocs/EasyGUI%200.9d.rar

Test new version here:
http://81.20.132.136:8080/htdocs/egui/MonkeyGame.html

have fun


chrisc2977(Posted 2012) [#23]
Looking good, I have done something similar myself, with textfields and textboxes. Textboxes are good, but they are a nightmare to code though (getting cursor position from mouse etc).
Im just about to add a slider to my textboxes for when there are too many lines... Methinks will take most of this evening!
Would be interesting to see how you coded compared top me (I am a reletivly complete noob :)
I chose to avoid different windows, thou I can see the benifit.
Good job :)