Anyone here still familiar with WB3D... ?

Blitz3D Forums/Blitz3D Programming/Anyone here still familiar with WB3D... ?

Adam Novagen(Posted 2011) [#1]
So I've been working with WinBlitz3D, the ol' GUI plugin for B3D. Version 1.0 is what I have. I'm looking for a bit of help, though, if anyone here still knows about it; I'm using the "WB3DStyles" Include file, but it's not exactly working out... Specifically, any time I apply a style flag OTHER than zero to a gadget, it works, but makes the gadget "pop out" into its own window. Extremely frustrating to say the least, because using plain zero for the style flag brings ugly results sometimes, like an annoying single-pixel rectangle border around trackbar gadgets, and indeed a border around plain text labels.

Anyone know why using any and all style flags causes the gadget to disconnect from its parent?


Guy Fawkes(Posted 2011) [#2]
Use DevilGUI. its MUCH better. and VERY simple. and FREEEEEEEEEEEEEEEE :D


John Blackledge(Posted 2011) [#3]
Horses for courses, Rez.

Adam:

You need to kick off with a line like this:-
Gui\hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),0,0,width,height) ; initialises gui NOT window - already done.

then add your panels to the Gui\hWnd (or whatever you have used):-
Gui\hPanel = WB3D_CreatePanel(Gui\panelx,Gui\panely,Gui\panelw,Gui\panelh,Gui\hWnd,0)

then add controls to Gui\hPanel, using that as the parent.

This is standard Windows gui programming (in any language), but you must try to understand the demos, then make copies and modify them to understand further.

I never intended to use WB3D in a product, but it's invaluable in my in-house editor for keeping my code, structures, and variables tidy..


Adam Novagen(Posted 2011) [#4]
Yeah, done that actually; something I didn't clarify is that I've already copy-pasted a fair amount FROM the demos, and understand it well. I'm actually parenting the gadgets to a window made with WB3D_CreateWindow(), while the Blitz window itself is hidden.
Here, have a snippet:


This is slightly modified from my code because of coordinates and a bunch of other stuff, but the issue with "styles" remains the same; using anything other than zero to style the BGMSlider results in it popping out into its own window, which I find odd since the GUI is correctly initialized, and the slider itself is parented to a proper window.

Upon reflection, is the issue perhaps that the gadgets exhibit this behaviour only if they're parented to a window OTHER than the Blitz one? I honestly haven't tried anything where the gadgets are attached to the AppHwnd. Whatever the case, if this is just an bug/issue with WB3D itself, then no big deal, it's not a huge issue anyway; I was just wondering IF there was something I was missing.

Last edited 2011


John Blackledge(Posted 2011) [#5]
This is what I use:-

group = WB3D_CreateGroupBox("Elevation",5,160,70,170,parent,WS_CHILD Or BS_GROUPBOX) : WB3D_Usefont(group,Gui\hFntSmall)

style = WS_CHILD Or TBS_VERT ;Or TBS_REVERSED - doesnt work

Terr\idElevtracker= WB3D_CreateTrackBar(25,20,20,120,group,0,style)
WB3D_SetTrackBarRange(Terr\idElevtracker,0,200)

As you can see TBS_REVERSED (reversed values) doesnt work.
Basically the key point to cure your problem is WS_CHILD.


Adam Novagen(Posted 2011) [#6]
WHOOOOOOOOOAAAAAAAAAA, that's brilliant; PRECISELY what I was looking for! A thousand thanks! XD

Alright, two more questions which I believe will be my last on this matter. Firstly, should I use WS_CHILD on the main window (the window I'm using from CreateWindow(), not the Hwnd)? Secondly, I notice that there are now two familiar "notches" on the trackbar, one at either end. Is there any way to add more along its length, control their position, etc?


John Blackledge(Posted 2011) [#7]
Actually I appear to use this:
Gui\hWnd = WB3D_InitializeGUI(SystemProperty("AppHwnd"),0,0,width,height)
-rather than CreateWindow.
Then my panels etc hang off Gui\hWnd using WS_CHILD.

The two slider notches are very visibly the start and the end.
Check out WB3Dstyles.bb ; standard trackbar winapi styles
- there might be a setting there.
What I've tended to do is use a text box next to mine which shows the actual value of the slider, and also allows manual input for fine value setting - the slider being only for crude value settings.

You can probably Google any of the TBS_ settings to find out what they actually do.

By the way, I don't believe the TreeView was properly finished before the author gave up, and now he doesn't appear to be visible on the web or answering emails.
-Understandable if you do 12 months breakthrough work, then only 4 people use it. <sigh>


John Blackledge(Posted 2011) [#8]
BTW, if you want to take this discussion off the forum you can get me through my email address in the profile.


Adam Novagen(Posted 2011) [#9]
Ah, will probably do that if I have any further questions, then. Thanks once more, John!


Kev(Posted 2011) [#10]
im aways available but have little free time with work, i check blitz forums very rare now but can be found here kev@...

i try to keep my profile email upto date as possable.

kev


Adam Novagen(Posted 2011) [#11]
Well if it isn't Kev! Thanks to you too, mate! :D


Danny(Posted 2011) [#12]
Also here you can download SCHNOK! - A gui editor for WB3D and play with the styles in real time..

http://www.blitzbasic.com/Community/posts.php?topic=62516


John Blackledge(Posted 2011) [#13]
Yay! Kev and Danny are available! Thanks, guys.

I admit that most people don't want a 'windowsey' interface,
but WB3D has been brilliant for me when creating my in-house editor....
it's helped me keep all my code (3D and non-3D) really neat, and very often I can work from the interface inwards; e.g. place the controls, make sure they behave and handle values properly, then feed the values to the normal Blitz code.




Adam Novagen(Posted 2011) [#14]
Wow, thanks Danny! Kinda wish I'd had that about a week ago, actually. XD

John, I haven't found anything in the v1.0 documentation, but does WinBlitz3D's final version (whatever that was) contain anything for text AREAS, i.e. multi-line word-wrapped affairs? Seeing what you've done with WB3D for your editor, it makes me realize that it could be a HUGE help to me in my own map editor for Midnight Hacker. Also it'd be a nice excuse for me not to have to package the damn editor in the source code for the main game. XD

EDIT:

Derp, guess that answers my question. Text areas are a resounding YEEEEEEES so it's all good! :D

Last edited 2011


John Blackledge(Posted 2011) [#15]
Text areas are in FastExt's FastText_Unicode.bb.

Yes, as you say, the actual editor does not figure in the final product, by simply commenting out the Include lines and a couple of 'interact' calls.

Oh yeah, all editor-set values are stored in an Ini file -
[Terrain]
Bla = bla
[Sky]
Bla = bla
- then loaded in when run.
If the editor is active (read by global variable) then the values are also sent to the WB3D controls.


Danny(Posted 2011) [#16]
Hi John! I've always been available ;) That editor of yours looks pretty good btw, very neat but functional design!

And good luck Adam.
WB3D should work fine for you. Once you get yourself a workflow going,
it's really fast to extend your app with new functions. I still use it myself; check: www.RedBoard.tv for example..

I personally 'Include' the code that Schnok! exports, so that I can always update/tweak/redesign my interface at any time and simply re-export the updated form or gui - without having to touch any b3d code myself (except dealing with new events & values ofcourse).
Depending on your GUI design and requirements, you can stick everything in a single file - or design & export separate files for floating windows or panels for example - that's all up to you ;)

Have fun,
Danny


Kev(Posted 2011) [#17]
its been a long time danny and john hope your both well, adam johns screen shot shows how flexable wb3d can be with danny SCHNOK develpment time on the interface is greatly reduced. theres a version 1.1 floating about if your unable to find it give me a nuge and i will get it available for you.

its been around 6 years since i last fired c++ for wb3d but if i recall in either 1.0 or 1.1 it was possable to stream textfiles directly into edit gadgets.

it realy is nice to know its still out there and being used so beta guys all that hard work we done never went to waste :P

kev