Stre GUI

Community Forums/Showcase/Stre GUI

N(Posted 2004) [#1]
Edit: Picture:


I have no idea why I called it Stre. Just to make sure nobody starts trying to figure out what it stands for, it stands for nothing. It's not an acronym or abbreviation. I just picked a couple combinations of letters and stuck them together in the most pronounceable way.

Anyhow, Stre is a 3D (not single-surface though) GUI. Not really a GUI yet, even. Just something that draws cute 3D windows on-screen.

Anyhow, I plan to make it entirely skinnable and eventually I'll add a skin definition thing (probably via XML) that lets you specify what certain regions of a skin are (e.g., the part that you click and drag to resize the window, where the titlebar goes, etc.).

Anyhow, doing a 3D GUI is a heck of a lot easier than doing 2D GUIs aside from the surface-order thing. That one had me stumped for a bit when I did attempt to make it somewhat single-surface. I failed, of course.

All the code is actually written using my own syntax and then parsed by my preprocessor (which can be found in the code archives). The file you can run without a hitch is GUI.bb_p, the file you can send to the preprocessor is GUI.bc. I just want to make this clear: GUI.bb_p is not intended for actual use, it's the translated version of the more useable GUI.bc (which isn't a pain in the arse to use in comparison to typing "ApplicationMouseXY(app\MX,app\MY):AddVertex(this\Surface,app\SelX,app\SelY,app\SelZ,0,0,.25,.25)".

Anyhow, DOWNLOAD

You will need Blitz3D to run this.


xmlspy(Posted 2004) [#2]
Very Nice, I like the transparency.


N(Posted 2004) [#3]
I just added group box and button widgets. Next up I think I'll add check boxes, since those're easy as heck.


ckob(Posted 2004) [#4]
I really like this..hope you continue it


N(Posted 2004) [#5]
Added checkboxes.


aCiD2(Posted 2004) [#6]
Hey noel, can i help with this? I'm pretty good with GUI's, I wouldn't mind working on something complicated such as a dataview control, or column based list view maybe? :)


Odds On(Posted 2004) [#7]
Hi Noel, looking good.. a lot of the code looks very similar to F-UI 3D though.


N(Posted 2004) [#8]
Hi Noel, looking good.. a lot of the code looks very similar to F-UI 3D though.


Probably- I do own it, after all-, but I can ensure you that I have not copied any code from F-UI 3D. A lot of the theory behind it comes from my experiences with it and BlitzUI though (though I never did like the SendMessage bit).


Dreamora(Posted 2004) [#9]
although the message handling way is the best and easiest especially thinking of user defined expansion to the GUI? :)


N(Posted 2004) [#10]
Dreamora: In the case of Stre, if you want to expand upon a widget or any other class/type, you can either extend it via type inheritance (thanks to my preprocessor) or you can add a new method to it. It's not hard, all you do is go to the type and add the method. For example, if you want to add a method that returns the width of a window:

Type Widget
     Field X#,Y#,Z%,Width#,Height#,Disabled%,Hidden%,Etc% // ;)
End Type

Type Window Extends Widget
     ...
     Other code
     ...

     Method GetWidth#()
          Return \Width
     End Method
End Type


Ta-da! It's a simple process made easy by the preprocessor.


podperson(Posted 2004) [#11]
Much as I like the philosophy behind your preprocessor, I'm not sure I want to use a GUI library that depends on it. Aside from that this looks great. Since it should convert very neatly to BlitzMax, maybe I'll use it then :)


N(Posted 2004) [#12]
podperson: Yeah, I honestly don't expect people to use this when its dependent upon the preprocessor's parsing abilities, but I'm writing this mostly for the experience and maybe even personal use (but I've got F-UI, and that's a hell of a lot faster as-is and has everything I need).

I figure the actual syntax my preprocessor uses is very similar to BlitzMax's, so I agree, it should convert nicely.


AntonyWells(Posted 2004) [#13]
You oughta consider re-designing it using a base class type(That doesn't require a pre-processor, I and many others already use one)

Otherwise you're going to need a move/resize/etc func pair for every unique type. (i.e practically unsable without a mind of steel)


Nice use of entityAlpha though. ;)


gameproducer(Posted 2004) [#14]
Hey, looks good.

Small bug found: when clicking minimize/open button of some group it works, but after that when clicking other group's minimize/open button several times it doesn't work right away... anyway - looks good :)


N(Posted 2004) [#15]
Morphecy: Yeah, that was an odd bug. I fixed it, but only after spending a bit of time rewriting my methods.

Otacon: Actually, I just use straight-out vertex alpha, but it's the same thing, just different scope.


N(Posted 2004) [#16]
Took a while, but I added spinners (most of the day was spent trying to add text centering... -_-). Also reworked a lot of the graphics.

New screenshot:



N(Posted 2004) [#17]
New Demo




koekjesbaby(Posted 2004) [#18]
the sliders are pretty cool, but hard to see if they are on their maximum or minimum...


xmlspy(Posted 2004) [#19]
keep on it, and make it free or I'll beat you up!


xmlspy(Posted 2004) [#20]
keep on it, and make it free or I'll beat you up! :)


N(Posted 2004) [#21]
It will be free, don't worry.

I have no intentions of attempting to sell it since it isn't exactly the best thing I've ever written.


N(Posted 2004) [#22]
Haha



Inner(Posted 2004) [#23]
oo neat ! ;) you did my lil' gadget :)


N(Posted 2004) [#24]
Yeah, it's a good idea, Inner. If you have any other ideas let me know. :)


aCiD2(Posted 2004) [#25]
Make it so that max is around 5°, its hard to tell if its at max or min :P


jfk EO-11110(Posted 2004) [#26]
Pretty cool stuff!


LT(Posted 2004) [#27]
Nice work! There is a bug with window titles, though. They are not changing to bold text consistently.


Rook Zimbabwe(Posted 2004) [#28]
S (imple) T (opend) R (ealtime) E (nviroment) Oh... we wern't supposed to guess??? OK!

That little gadget is cool too... first time I have seen it... Could one of those spinners be recolored RED...etc?

Seriously looks very good. I can see a lot of good programming. Keep up the good work!


N(Posted 2004) [#29]
Rook: Care if I use that as what Stre stands for? It was just supposed to be pronounced "stray", actually. :P

Anyhow, I'm working on making gadgets colorable, it's just a matter of changing a few bits and pieces of the skins (they'll have to be grey-scale from now on for coloring to work somewhat properly). Simple process- you all can have a go at it if you like, since I'm not going to be doing anything in Blitz (or Windows for that matter) for a couple days (I'm on a break).


Defoc8(Posted 2004) [#30]
tis lookin good m8y :]
- are you going to add texture scrolling + animating
icons / backdrops + blending opps +...... :p

your doing quite a lot for the community - keep it up ;)


N(Posted 2004) [#31]
Gotta love me ;)

I'm not sure about all that yet, anyway.

My recent switch to Linux is sortof postponing development of most of my Blitz-related projects (I haven't used Windows in quite a while), and C++ has been very comfortable lately.

By the way: I don't know how many people were looking forward to Lotus R2, but it may be released for free- this is good news and bad news if it happens. If it is released for free, it'll be released in an incomplete stage (it's fast as hell and works fine, but LPS still isn't implemented at the moment) with a license similar to zlib. Also, documentation would be postponed indefinitely while I'm out of commission as far as Blitz goes.

Anyhow, felt like mentioning that.


Uber Lieutenant(Posted 2004) [#32]
Noel -

I love StreGUI so far. Here are some notes on things I see that can be improved/changed.

1. The GUI functions should all be put into one Blitz document and examples should include that. Else, others will have to manually delete the example source for anything they code to work.

2. A good idea is to comment the StreGUI functions to describe their function, parametes, and usage. This is obvious, but it helps tremendously.

3. Obviously this is in its early stages, but just for the record, some new gadgets you should implement are:

- Progress bars
- Taskbar
- Start Menu

I'm starting a small project to make a hacking sim, not unlike Uplink. I need to use a GUI library (as having windows and "open applications" are the biggest part of it) and I already experimented with Ngui, but it's not easy to use as it's documented in French. A number of other GUI libraries are either lacking in features I need or just don't have any kind of style (BBGad would work, but where's the class in the interface? There's no fashion!).

I like how StreGUI is coming along, and even though it's not yet the easiest to code for (not because of lack of documentation, it's the commands), it's the one I like the most so far. Keep working on it!