can MAXgui be used for a game???

BlitzMax Forums/MaxGUI Module/can MAXgui be used for a game???

slenkar(Posted 2008) [#1]
Can icons and color changes be used to change the appearance of MaxGUI so it can be used in a game without it looking too 'system-ish'
e.g. grey

and

how does it handle having a game running on the canvas?

thanks


CS_TBL(Posted 2008) [#2]
Would you want those controls in your game screen (some kinda OSD), or next to the game screen?

For OSD, MaxGUI's gadgets are pointless anyway, and for stuff outside the game screen, why not use a custom-built gadget that could look like whatever?


jsp(Posted 2008) [#3]
I would say yes you can – to a certain extend- , but it all depends on what you want to achieve.
When changing the color and the font of a label (best the same used in your game), it would just look nicely and not like a system label anymore.
Even buttons can carry images (again take images which represent your game content of course) and they are not really identified as system buttons.
Panels can be set with pixmaps as background, so that will look quite good. Other gadgets can may sit on top with transparent background or with one of your 'game colors'.
It will be difficult when it comes to things like textfields, comboboxes or sliders. The appearance cannot be change in MaxGui, so there is a limit here. Nevertheless if you put those in the right context it is may still ok.
Have a look at my SmartButton demo, it is done with and for MaxGui and shows a bit you could do with MaxGui panels only and may points in the direction you are looking for.
http://jsp.logiczone.de/downloads/SmartButtonDemo1.2.zip

I personally like to run games in windowed mode in a canvas and it works fine for me, but if the MaxGui gadgets will 'fit' into your game, only you can decide. I am always happy when i could use the event mode wherever possible (also possible without MaxGui), because it means my cpu doesn't stay at 100% waiting for a simple user input.


slenkar(Posted 2008) [#4]
thanks,
i wanted to use it for an RPG. I am using a free custom GUI at the moment but it has limitations like textfields for example,

that smartbuttons demo was pretty good


Dreamora(Posted 2008) [#5]
well you just need to remember that you can not use OS GUI element with fullscreen graphics or above the graphic canvas which makes it pretty limited.

Unless your free costum GUI you are using is already HighGUI 3 from Diablo, I would suggest having a look at that one.


CS_TBL(Posted 2008) [#6]
How practical is it -btw- to use a canvas for fullscreen? So, a window with flags to 0 and a full-size canvas onto it?


jsp(Posted 2008) [#7]
It all depends how it could / should look like and react...

I would not say it doesn't work, it is just not everything possible.
I put an example together please downlod here:
http://jsp.logiczone.de/downloads/SimpleStarfield.zip

What you can see are some MaxGui gadgets on top of a canvas.
When you type some text into the textfield i draw it above in the canvas again to show it working while the canvas is updated. Actually the textfield with a XP theme doesn't look too bad while before the classic mode had a sunken frame ( it's now only a small line).
Push the Start/Stop button while the Starfield is drawn, and observe your cpu usage, all events are still working.
Change the combobox to another entry to change the amount of stars.
Move the slider to speed up the starfield.
When you hit the checkbox for fullscreen it will do ...
The button on the bottom left is a SmartButton, which acts on hoover (yellow letters, sound) and left click to end the program.
This is not really a serious program, just an example, but plain MaxGui (even the SmartButton). And it may shows what i meant when saying things like sliders and comboboxes are limited to customize. Nevertheless a lot can be done.


CS_TBL(Posted 2008) [#8]
I never meant to put native OS gadgets on top of a canvas btw, if there must be native gadgets then put 'm next to a canvas (which is then fullscreen minus a column or row for gadgets). If no native gadgets are required then a gamescreen could be fullscreen with soft-gadgets everywhere.


jsp(Posted 2008) [#9]
It was more related to:
well you just need to remember that you can not use OS GUI element with fullscreen graphics or above the graphic canvas which makes it pretty limited.

Above the canvas, yes. Attached, hmm.. better not directly.

If it makes sense is another story. For a game probably different things are important. I agree as you said to put them aside in a row or so, that's useful for a level editor and such.
For sure it will be ok to have soft-gadgets in a gamescreen (probably the standard), but the initial question was what can we do with the MaxGui gadgets:
Can icons and color changes be used to change the appearance of MaxGUI so it can be used in a game without it looking too 'system-ish'


So, i hope the program gives some idea about where are the limits.


Mr. Write Errors Man(Posted 2008) [#10]
Can't you place textarea inside a smaller panel to get rid of borders? Can't you use the HTML gadget and use javascript to create the exact kind of textarea component you really want?

Sorry for wrong terms and/or names - I haven't played with the GUI for a while now.

-AF


jsp(Posted 2008) [#11]
Yep, that should work as well, forgot about that one. And as the new MaxGuiEx supports also fore- and background colors for TextFields (old MaxGui only TextArea) you could fit it again better in the game environment.
Another possibility is maybe to create a hidden TextField to do the 'hard' work (cut,copy,paste,insert) and show the content just with drawtext on the canvas.