Monkey GUI:some info

I have added 3 new gadget to my GUI: a progress bar, a listbox (wip) and an icon.

The IconGadget is – simple – a gadget without background and only with an image to click on.

Moreover I’ve added the ‘SetIcon()’ method to display (for Labels and Button) an icon (on the left). So I can personalize a little more the gadgets for a better user experience.

I’m testing to transform the different files in a ‘module’ for Monkey: at the moment the ‘gui system’ is a group of three different file/library: lib_gui (the GUI itself), lib_colorfont (to manage – in a simple form – color font) and lib_atlas (to manage ‘atlas’ image in a easy way.
Of course lib_colorfont and lib_atlas can be used outside/indipendentely from lib_gui.

The GUI system has a ‘event handler’ (a list with the events generated by the gui… nothing exotic, but works). In the Update method of the application the user ‘needs’ to explore if there are events and act as want.

It is very similar to the BlitzMax one (so you can look an event for ID (EVENT_GADGETACTION, EVENT_GADGETSELECT) or by source (button, textfield and so on).

I added a new ‘way’ to manage GUI-Events: I call it ‘EventMessage’.

Basically you can set (for every gadget) a SetEventMessage(). This message will be interpreted (as for ID or source): the main difference is that you can set the same ‘message’ for different gadgets (an icon or a button) and use only one check to have the same behaviour (ie: close window). I find this way very handy.

At the moment I’ve tested the GUI on these targets: HTML5, FLASH, GLFW and Android: on this platform I had to rewrite my lib_atlas (for reasons I dont’ know…).

But now it works!

More to come.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close