Windows similar, and very userfriendly GUI function.bb for blitz3d halffinished!!!

Community Forums/Showcase/Windows similar, and very userfriendly GUI function.bb for blitz3d halffinished!!!

ChrML(Posted 2003) [#1]
This is a little project I have, to make GUI for editors, and stuff easy, and easy configurable. The windows are created with CreateWindow(title$,screenx,screeny,width,height,closebutton), and you simply use DrawWindows() in the gameloop to update the window drawings (not cpu consuming). These graphics are written with FastPixelWrite, and does not use any external graphics. It's also possible to do DrawBackground, to draw stuff like the gradiented blue (or any other color) background if you don't have any other rendering in the back, which is very good for 2d editors, or programs like chat programs. A 2D gradiented background is VERY cpu consuming though, since it writes each pixel at the screen in loops. Currently it supports creating buttons, notify when it's pressed (with an if), and it can create labels, and modify stuff like positions, and caption. I'm working on an input field now, memo, viewport-in-windows, and possibility to have pictures created inside a window now. Wish me good luck :).And, ofcourse all the windows can be moved by dragging the titlebar :). Here are the screenshots:

Windows with blue gradiented color:


Windows with 3d rendered background:


Hope you enjoy the screens, and wish me good luck :)!


PS: The color theme for everything can also be changed with a command :).


darklordz(Posted 2003) [#2]
They look ugly....Are other colors possible?


ChrML(Posted 2003) [#3]
All colors are possible...thanks for the comment btw <:(.


Odds On(Posted 2003) [#4]
Is WritePixelFast faster than using Rect? Especially since you have to lock the buffer you're writing to.


jfk EO-11110(Posted 2003) [#5]
Of course they look ugly :), but who cares, we real programmers know how easy it is to use another Font and Color Set. Looks useful.

Please make one for me in Tahoma 17pt and use a nice Gradient BMP as the Background, ok? And the Buttons need some FX, but simple Pseudo 3D is a bit boring. How about some real World HiFi Buttons as the Background of Buttons? I mean, using 3 Parts, left side, stretched Middle Part and right side, like this: [_________]


ChrML(Posted 2003) [#6]
Yeah, but as said, it's halffinished :). I'm going to make it possible to use background images instead of the default button graphic, and as form background...etc...so don't worry :). Working on having 3d viewports inside windows now, won't take me long :). Going to do some possibilites for loading images to use as backgrounds after that :D.


ChrML(Posted 2003) [#7]


Just the in-window rendering. Windows can be moved ofcourse, with the render correctly aligned inside. Btw, any ideas on how to render one camera before an another one :)?


gosse(Posted 2003) [#8]
It's in the order they are created I think. You might have to delete and recreate them.


Koriolis(Posted 2003) [#9]
I think added in one of the last updates the ability to use EntityOrder on cameras to define the drawing order.
You should check that.


darklordz(Posted 2003) [#10]
@jfk : OOo I didn't know i was fictional....
@hyperblitzer : I didn't mean it in a bad way. I usualy say the truth may hurt but it needs to be said...


jfk EO-11110(Posted 2003) [#11]
The "we" didn't exclude you, of course.

Hyperblitzer - I don't get it comlpetely - do you render both viewports with a single Renerworld()? Is that possibe at all?
Well, if you use a renderworld for each camera, then you can also use cameraProjMode to Hide/Show the cameras in the Order you want them to be on screen. This way the only camera that is rendered is the one that isn't "hidden" or inactive. Of course, you have to sort it this somehow.


ChrML(Posted 2003) [#12]
You're forgiven darklordz :), I understood myself that the colors were bad, but it was the function I was going to show, not the colors that I knew myself was bad, but they can be changed to whatever though :).

Yes, I do render both viewports with a single RenderWorld. What I really want to do, is that if I overlap an another window over one of the windows that does render something, then the rendered image will overlap all windows over, because it is executed after all menu graphics are drawn. What these viewports are, are two cameraes, with the screen area calculated from window position, and viewport in window position. So, what I need to know, is if I disable camera1 for example, can I then render, without camera2 (or 3, or 4. etc...) being rendered, and then continue on next window, and then just render next camera...I have the window overlapping system working right, but the problem is that all rendering is done once, and the rendered images will therefore overlap all other windows, no matter if they are behind, or infront other windows :(. That's my problem, but do you think it would be solved by disabling the cameraes that are not being rendered, and then do each camera at different time? Would it slow down if I call renderworld twice, or more?


Odds On(Posted 2003) [#13]
In BlitzUI 2 the code looks something like this:

for each view
showentity gad\camera
renderworld app\tween
hideentity gad\camera
next

This lets other windows overlap the camera views with no problems.


Bot Builder(Posted 2003) [#14]
yeah sure. Just use hideentity/showeentity on the cameras to stop them from rendering. It looks pretty good other than the colors.


jfk EO-11110(Posted 2003) [#15]
Use Hideentity/Showentity or CameraProjMode for that.


ChrML(Posted 2003) [#16]
Ok, camera overlapping works perfectly now. I can post a screen of it later, but here is my newest invention. The filebrowsing dialog is halffinished. Here is a screen, where I browse C: :



jfk EO-11110(Posted 2003) [#17]
While you are working on a all purpose Fileselector like Thousands of Coders before I would suggest to get the Max out of Blitz, how about a Preview(/Prehear) function for all kinds of Media Blitz can handle? Cause then it's better than the Standard Windows Fileselector. (If a File is to big then you still can skip the Preview automaticly) And you never know, maybe Billy Gates' gonna steal tihs Idea and you can bring MS to a court etc. :)


ChrML(Posted 2003) [#18]
Good Idea, but first I'm gonna have to get the scrolling bar working :). Won't take me long though.