ifsoGUI - BlitzMax GUI

Community Forums/Showcase/ifsoGUI - BlitzMax GUI

TaskMaster(Posted 2009) [#1]
UPDATE v1.09 - Latest features include: Cut/Copy/Paste for textbox and multi-line textbox, now there is an image button gadget, and a few minor fixes and improvements.

UPDATE: v1.06 - Different skins can be loaded for individual instances of gadgets now. Skins can be based on stretching and/or tiling now. And a few minor updates. Cut/Copy/Paste is in the works, not in yet.

UPDATE: v1.05 available. Gadget events now can now be assigned sounds, panels have background images which can be centered, scaled, etc..., gadgets can have custom properties, and more.

UPDATE: Latest features include a Multi-Column Listbox (shown in example 4), the ability to use custom font systems (bitmap fonts), and the ability to zip/incbin the Skin files.

Details of how to use custom fonts can be found here:


A demo is available on the ifsoGUI website as well, now.

The rar versions of the examples have been removed. I am now using 7zip to create the zip files, which hopefully will solve the problems people have had with my zip files.

Original Post:

I am finishing up the touches on my new GUI for BlitzMax.

Here are four sample apps I whipped up to show off the functionality and some of the gadgets:





I put together a website for it, with some simple documentation, which I will expand upon later.


I would appreciate if some of you could run the sample apps and make sure everything works.

Pete Rigz(Posted 2009) [#2]
Looks nice. All work fine here, average fps about 430 in all three -AMD X2 2.7ghz geforce 8800gts.

Chroma(Posted 2009) [#3]
Yep this is great. FPS is in the 400s. Goes down in the 300s at times but climbs back up after everthing quiets down.

You make a Form Designer for this and it's gonna be the bomb.

GaryV(Posted 2009) [#4]
TaskMaster - I Love You!

And idea of the price?

TaskMaster(Posted 2009) [#5]
Not much, just thinking like $25 or something.

Biggest problem was that I was using SetViewPort to control my graphics from writing out of bounds. So, I adapted that function that was posted here last week, so I do not rely on SetViewPort anymore.

I have plans for a bunch more gadgets and possibly using some sort of block font system instead of drawfont. What is the most popular block font library?

Hadn't even thought to make a form designer. Would not be difficult. Hmmm...

Thanks for testing it out guys. I will probably make it available on Sunday or Monday to give me the weekend to clean it up a bit. Also, the documentation on the website is slightly outdated. I need to add the functions I created to replace the SetViewPort stuff.

plash(Posted 2009) [#6]
I can't seem to download any of the examples, sometimes it fails or doesn't download the entire file (or so it seems).

TaskMaster(Posted 2009) [#7]
Hmmm, no idea what the problem might be.

Works fine for me from home to the server, and these others seem to have been able to download them. I host quite a few files from that server and never have had any issues with it. If you ping or trace www.ifsogui.com, are there lost packets?

plash(Posted 2009) [#8]
Nope. No lost packets, and the download still isn't working.

I'll try again tomorrow probably.

Chroma(Posted 2009) [#9]
format_code('Hadn't even thought to make a form designer. Would not be difficult. Hmmm...')
You make a form designer and you have yourself a sale right here pal.

Matty(Posted 2009) [#10]
Example 1: (only tested this one) - 250-280 fps on an Intel Dual Core 2GHZ with Onboard graphics card.

Seems nice enough, except that I don't use blitzmax. Form designers are always useful - who really wants to code where all their gadgets go.

skn3(Posted 2009) [#11]
Looks cool! A good start!

After trying all three demos, here eare my suggestions:

- text selection with mouse for textfield, spinner

- copy/paste for textfield, spinner, list

- reorder tabs by mouse dragging

- when tabbing through gadgets focus should loop around to start of parent gadget instead of global.

- on dropdown make it so selection occurs on mouseup instead of mouse click

TaskMaster(Posted 2009) [#12]
I'll keep those suggestions in mind. Thanks.

Some, like text selection and cut/copy/paste have already been on my list. But they are things that can be added later and do not preclude a lot of people from being able to use the GUI. That sort of thing is rarely included in game interfaces.

Look at WoW, you can't do any cut/paste in their chat box. At least you couldn't when last I played. And I don't think many game GUIs allow it. It is something I want to have in their eventually.

Also, the Tabbing of gadgets will be something you can manually control eventually, with a TabIndex property. Right now it just tabs through in the order the gadgets were added as children.

Dragging/reordering tabs, not something I had though of... will give that one some thought.

MouseUp instead of MouseClick on drop downs, will look at that. It might be a limitation of the listbox control. As a drop down has a panel with listbox slave as the dropdown box. Could possibly be down on mouseup, will have to check. Which means, it may take some changing to the listbox gadget...

Thanks for the feedback guys, appreciate it.

TaskMaster(Posted 2009) [#13]
ifsoGUI is now available.

Please check out the website at: http://www.ifsogui.com

Also, I have set up a couple forums for it on my website at: http://www.ifso.net

I am going to be developing a form builder for it. No idea when it will be ready.

I am also trying to figure out a way to have a demo module. Maybe a simple version with just a couple gadgets and possibly a popup panel, reminding that it is a demo, that appears after your app has been running for a few minutes. This way it isn't intrusive while you are testing your app, but will disuade you from publishing it to the public. ;)

GaryV(Posted 2009) [#14]
Is this straught code or a module?

TaskMaster(Posted 2009) [#15]
It is a mod. The source is not included.

GaryV(Posted 2009) [#16]
After what happened with the other mod based GUI, I won't buy it. But, this does look very good.

TaskMaster(Posted 2009) [#17]
What happened?

Mr. Write Errors Man(Posted 2009) [#18]
Not bad for a start. Will be interesting to see where it is 6-12 months from now. :)

What comes to strings, textfield doesn't accept characters like åäö.

TaskMaster(Posted 2009) [#19]
Yep, sorry, I am not sure how to accept characters like that. If you could give me some pointers, I would add in that support.

As for where it will be in 6-12months, we will see. One of the users just added some animated buttons to it last night. :)

Mr. Write Errors Man(Posted 2009) [#20]
My guess is that you either use DrawText or some other incomplete bitmap font set. Use one that contains at least standard ASCII characters (the 255 one, not the 128 one). That way you can cover at least most European languages.

For example "DrawText Chr(246),0,0" draws nothing. "Print Chr(246)" shows that it should draw "ö".

If you are using Windows, you can easily add non-English locales. Then you can cycle between locales by for example pressing ALT+SHIFT. That way you can check how things work in non-English locales.

Also, use GetChar() if you already aren't.

TaskMaster(Posted 2009) [#21]
The font being used is Windows base arial.ttf. So, if that font isn't capable of doing it, then the sample isn't going to be capable.

I will look into this when I get a chance. I have not really ever thought in multi language terms before. :)

Mr. Write Errors Man(Posted 2009) [#22]
Just don't use DrawText, if that's what you are doing at the moment (it doesn't matter what font you use). Instead use some bitmap font system. That's all you need. GetChar() works automatically.

TaskMaster(Posted 2009) [#23]
I do plan to support font systems. I plan to just make it so my GUI calls TextWidth, TextHeight, and DrawText functions, but the user will be able to override them, so my GUI calls your version of those functions. Then you can use any font system you want.

Then, if you do not override those functions, it will just use the BlitzMax standard versions.

DavidDC(Posted 2009) [#24]
Looks very interesting but I'm having trouble opening the samples. 7zip doesn't seem to like the archives?

TaskMaster(Posted 2009) [#25]
I don't know why that would be. Nobody else has had that complaint. One guy did have trouble downloading them, though.

I will put them on a second server sometime today.

matibee(Posted 2009) [#26]
DavidDC is right TM. 7-zip doesn't like the zip archive format. I simply got round it by using Windows extract wizard.

I didn't think it was worth mentioning at the time ;)

TaskMaster(Posted 2009) [#27]
OK, I will look into it. I have been zipping them using the zip capability built into SpeedCommander. I wonder why the zip format can be slightly different, kind of dumb actually. Funny that one app can unzip them but another can't. I wonder which app is truly the less compatible one, I would guess 7zip, since other zip programs can handle it.

Maybe I will just switch them to .rar. :)

TaskMaster(Posted 2009) [#28]
I rezipped the examples and also made rar versions available.

Also, ifsoGUI now supports Custom Font Systems (bitmap fonts). I have tested it with ziggy's Font Machine and it worked perfectly. It is done in a way that should allow you to use ANY font system.

A detailed instruction on how to do it is on the ifsogui.com website at:


If you can't get your favorite font system to work, let me know and we will try to figure it out together. if more features are needed in ifsoGUI, we can work it out.

DavidDC(Posted 2009) [#29]
This looks very nice - well done!

Having a brief look around, I can't see mention if this is cross platform or not? Does it do modal dialogs? Transparency?

TaskMaster(Posted 2009) [#30]
Yes, it can do transparency.

It is 100% BlitzMax code, so it should be cross platform.

It can do modal dialogs, the FileSelect gadget is modal.

My next work will be a demo version, it will only include some basic gadgets though, like panel/window, button, textbox, and label (and scrollbars, since windows/panels require them).

Also, if you do purchase it and you need a feature, I am happy to do it. (As long as it isn't some crazy thing that nobody else would ever want :) ).

MGE(Posted 2009) [#31]
Can the gui graphically scale so I can make it smaller or larger if desired?

TaskMaster(Posted 2009) [#32]
You cannot use SetScale.

But, most of the gadgets can be given a width and height and they draw to that size. The only gadget that does not do that is the checkbox, and the only reason I did that was because I didn't like the way the check mark looked when I stretched it. This can easily be changed to work the way the other gadgets do though. It was one of the first gadgets I did (4th one I think). So, I probably need to go back and change it so it is the same as all of the other gadgets.

If you want the gadgets to appear smaller, like shrunk, it would be pretty easy to just make a smaller version of your skin, and just switch to it and a smaller font.

MGE(Posted 2009) [#33]
I suggest you add 2 public properties to your gui:

GuiScaleX, GuiScaleY

And then scale everything by those values. A pro gui needs to have the ability to scale to any size, etc, etc. What about running in different resolutions? That would be a nightmare if we had to supply different gui settings for each resolution. Now, if we could just scale the gui accordingly, it would be much simpler.

DavidDC(Posted 2009) [#34]
Thanks for your answers TaskMaster. I think you've done a great job thus far.

TaskMaster(Posted 2009) [#35]
Scaling everything is a nightmare.

It may be useful, but it would be a huge change to the GUI. And I am not so sure it would look good, because of the way the gadgets are drawn.

I think if you want to have larger buttons with a larger font because the user is using a higher res, you would be much better off having a larger skin and larger fonts (or vice versa). Then you could just create a new set of gadgets with the correct coordinates.

Scaling would be a much simpler thing if the gadgets were just one graphic that was drawn to size, but they are not.

I will add this on the list of requested features, and may take a look at the possibility of doing, but it won't be very soon.

TaskMaster(Posted 2009) [#36]
Another update.

v1.04 now includes the ability to incbin/zip the skins. They can even be zipped AND incbin'd. You may have noticed my other thread, I am not able to use an incbin'd password protected zip file for some reason. So, that can't be done, you can use a password protected zip, you just can't incbin it.

If anyone has any hints as to how to make it work, please let me know.

Other improvements include:

User assignable filters for textboxes that allow you to decide whether a keypress should be passed to the textbox or not, this way you can only allow numbers or something like that.

The limitation on button text not drawing on the edges of buttons has been removed.

There is a demo available on the http://www.ifsogui.com website now, so you can try out ifsoGUI for yourself.

I am working hard on adding requested features. If you have a feature request, feel free to shoot it my way.

MGE(Posted 2009) [#37]
"It may be useful, but it would be a huge change to the GUI."

Agreed, but you should consider adding it. It would solve alot of potential problems for commercial users. For fonts, are you using coded bitmap fonts or built in font handling? Coded bitmap fonts would be better for scaling and render much faster.

TaskMaster(Posted 2009) [#38]
It uses either. Standard BlitzMax DrawText, or ANY bitmap font system you want to use.

As far as the scaling thing goes, I have added it to the list of requested features, but I haven't really seen any indication that it would be favorable for me to spend the time trying to do it. So, it will be pushed back to a lazy, bored Sunday. :)

TaskMaster(Posted 2009) [#39]
v1.05 is available.

Gadget events now can now be assigned sounds
Panels have background images which can be centered, scaled, etc...
Gadgets can have custom properties
and more

Mr. Write Errors Man(Posted 2009) [#40]
Are you planning to add ability to set skin on gadget instance level?

It's not just a handy way to have different looking buttons, panels etc without having to clone gadget types. It also allows things like handy way to show application states. For example things like disabled buttons or panels that require user's attention.

EDIT: Just bought it, if it matters. :)

TaskMaster(Posted 2009) [#41]
Yes, instance skins is on the todo list. After putting some thought to it, it will actually be kinda easy to do.

So, expect it in the next update or so. I almost have the wiki done, after which I will get some improvements out like tiled skins.

TaskMaster(Posted 2009) [#42]
v1.06 is available.

Loading Skins at a gadget instance level is now possible, as requested.

Also, skins can be based on stretching and/or tiling now.

There are a few other minor changes and fixes.

Cut/Copy/Paste is the next feature to be added that has been requested.

Tachyon(Posted 2009) [#43]
I think this looks very interesting, TaskMaster and it might fit a future need of mine. I would really like to see this GUI working within a real game- maybe something using minB3D, or a 2D game using TimeLineFX particles. You know, how well does this GUI work when really pushed?

I'd also like to see an example of a custom skin- how radically different can we get from the default skin?

And of course, a form editor would be icing.

TaskMaster(Posted 2009) [#44]
I am currently working on a form editor, slow going though. I am making it using ifsoGUI for its GUI though. So when it is finally done, it will be a good example. There are a few games being made with it. I believe Dabz is using it in his darts game.

As for custom skins, the wiki has a page that explains how the skins work. It can be found here: http://wiki.ifsogui.com/index.php/Skins . Basically you draw small versions of the gadget, and tell the GUI how to cut it up into the pieces that it is going to use to draw your gadgets at any size. I hope to make that page better here soon with some examples and images.

Adding new gadgets is very easy, as I whipped an image button gadget up in about a half hour yesterday (for the toolbar in the GUI) and made it available.

I have been so busy working on the GUI, wiki, and form editor that I haven't had any time to make any proper apps/games with it.

TaskMaster(Posted 2009) [#45]
v1.08 is now available.

Included in this update is the requested Cut/Copy/Paste for textbox and multi-line textbox gadgets and some improvements to the word wrap feature of the multi-line textbox.

plash(Posted 2009) [#46]
I see this is based on FryGUI - is it a branch (looks like one)?
How long did it take to get it this far?

JoshK(Posted 2009) [#47]
In example 4, double-clicking on column 5 items 19-25 will produce a crash.

TaskMaster(Posted 2009) [#48]
Based on FryGUI?

Kinda, I used FryGUI for a while and had added a whole crapload of features to it, but the base of the whole thing had so many flaws, I had to scrap it and start over.

Many of the function names remained the same so I could plug it into the program I was using it with.

TaskMaster(Posted 2009) [#49]
Thanks Leadwerks. Debuged and fixed.

Preparing to upload the fix to my web site.

TaskMaster(Posted 2009) [#50]
The fix to the mod has been posted.

The example has also been fixed.

GaryV(Posted 2009) [#51]
n/m wrong thread

Dabhand(Posted 2009) [#52]

I believe Dabz is using it in his darts game.

Yep! ;)

maybe something using minB3D, or a 2D game using TimeLineFX particles.

Works a charm alongside TimelineFX! :)

how radically different can we get from the default skin?

Skin2 Buttons(Provided with ifsoGUI examples)

My own solid chalk ones:-

Looking at the setup, you can be radically as different as you want!

One of the best purchases I've made I think! :)

And of course, a form editor would be icing.

While Tasky is sorting his out, heres a quick one I made:-

http://www.blitzmonkeys.com/adminfiles/dabz/ifsoGUI EditorV1_0.zip

You might have to copy the link and paste it in the address bar, as I never realised at the time when I uploaded it theres a sodding space in the URL! :D

Nothing major fancy, it does the job for the time being... theres no save/load, but it exports the code required.


TaskMaster(Posted 2009) [#53]
I am still working on mine, I have had a couple set backs that are keeping me from getting it done.

First, I had a tooth decide that the world is a terrible place and I spent the weekend drugged up waiting for a dental appointment yesterday.

Then, this morning, a woman decided to pull in front of me while driving 40 mph (that's about 65kph for you metric users). My car has got a nice bit of damage, but I am fine. So, with any luck, I will get some time to get the first version of my form editor done within the next week.

Htbaa(Posted 2009) [#54]
Some people shouldn't be allowed on the road...

The ifsoguidemo.mod. Is this the full featured module, only with a window popping up telling you it's the demo?

The examples and documentation are very clear and am thinking on purchasing it. But first I'll play a bit with the demo module.

One thing though. Because of your default skin and your screenshots I first got the impression that it was a bit like MaxGUI like gadgets only rendered in-game. If you create a more general game GUI and create some screenshots and show those as well then someone who sees it for the first time directly sees it's skinnable. Just my 2 cents.

TaskMaster(Posted 2009) [#55]
Thank Htbaa.

The demo only includes 3 or 4 controls and is a fairly basic version of ifsoGUI from about 7 or 8 fix cycles ago. I need to look at doing it again, there are just so many things to get done and so little time. And then when outside forces take away a lot of that time... Anyway, the demo is pretty lame in comparison to the real thing.

All of the examples do have a checkbox that changes the skin, which is there to show that it is skinnable and can be changed. You can change the whole skin, or change the skin of just one gadget on the fly.

Another thing on my todo list is to do another skin. I am going to do one in a chalk style for Dabz, but will be made public. I was hoping to get some of it done this weekend as well.

Oh well, setbacks like these happen... Hopefully the aches and pains that come the next day won't be too bad tomorrow morning. :)

GaryV(Posted 2009) [#56]
TaskMaster: I am glad to hear you are okay after the accident. Your car may be messed up, but it did its job and protected you in the crash.

TaskMaster(Posted 2009) [#57]
Thanks GaryV.

Personally, I am not so worked up about the whole thing. My wife, on the other hand, is a worrier. And it really pissed her off. She is very upset about her new car (was only 2 years old) getting destroyed.

Anyway, thanks for the good words. My health is the important thing, I agree.

Mr. Write Errors Man(Posted 2009) [#58]
Ouch. Happy that you didn't get hurt.

What comes to ifsoGUI, it's more than worth the small price. Very good library. Very skinnable. Better than all the other BMax2D GUIs I have tried.

Now I only need to find time to use it. :)

Htbaa(Posted 2009) [#59]
I couldn't resist. I just purchased it :-).

Blueapples(Posted 2010) [#60]
Anyone used this on Mac OS? The demo is only built for Windows so I can't try it out. Looking for a GUI toolkit for a Max2D game...

Htbaa(Posted 2010) [#61]
I believe it's a 100% BlitzMax code which just uses Max2D. I think it should work but I can't compile you a example. I don't have a Mac.

Naughty Alien(Posted 2010) [#62]
..is it possible to use already prepared textures for buttons or any other gadget in IFSO Gui?

Dabhand(Posted 2010) [#63]

Anyone used this on Mac OS? The demo is only built for Windows so I can't try it out. Looking for a GUI toolkit for a Max2D game...

Seems to build and work fine on Linux, straight from the download repository at the ifsoGUI forums (Which doesnt mention seperate OS's)... So, 99.9% positive that if it built first time on Linux, you'll have no problem on Mac!


TaskMaster(Posted 2010) [#64]
I have built the mod on Windows, Mac, and Linux. But I have never done any serious work with it on Mac.

A user named Corum is using it on Mac and has not complained of any problems with ifsoGUI. (Though, ifsoGUI does use Koriolis' ZipStream mod which has some problem with the Multi-Threaded GC. If you do not use Multi-Threading it works, or you can use multi-threading as long as you don't zip your skin files).

Naughty Alien, you can skin ifsoGUI with any skin you want. You provide the images and there is a text file with the dimensions that ifsoGUI needs to use the images. Fairly straight forward and easy to do.

I have been very busy recently with getting new responsibilities at work (along with a healthy raise), working out of town for 2 weeks, etc. But things have finally settled down, so I will be getting back to this. I have a couple new gadgets finished and am putting the finishing touches on them and implementing them in the ifsoGUI Form Editor.

Also, I plan to get the example programs and the editor compiled on Mac and Linux and make them available on the website.

As for the Demo, it was kinda a hack, so updating it is more of a pain in the butt. It isn't even compatible with the most recent version of BlitzMax. I don't know when I will get around to updating it.

Naughty Alien(Posted 2010) [#65]
..ahh...thats great :) i have sent you an email :)

TaskMaster(Posted 2010) [#66]
The ifsoGUI form editor and the 4 examples are now available compiled for Linux and Mac.

They can be found in the Public ifsoGUI Files download section of my website ( http://www.ifso.net ).

Thanks to Corum for compiling the Mac versions for me.