Some UI work I did today!

Miscellaneous Forums/Blitz Showcase/Some UI work I did today!

hey peeps! ive learned alot today, considering at first i didnt even know how to do 2d in 3d. I now have a functional UI working with functioning buttons, dragable windows and radio buttons. "gadgets" can be parented to other gadgets (thats how the buttons on the window works and hell, even the WINDOW works like that as its title bar is a seperate object to the display area of the window.)



What do you think so far? no downloadables yet but im just off to bed!!!!

[/babble]

It functions a bit like windows where everything has an ID including the desktop, only, its easier to draw on the "desktop" in this ;)

uses textured quads for everything and im creating functions to write to those textures, so you can pretty much put anything on them you want. Also, the buttons work by supplying a 2 frame count and then setting flags before drawing (ui_rectmode=ui_buttonrect and things like that). Of course, as the user you dont need to know this as it is all done within the code itself.

The above screen is produced with the following code (dont run it you need the source ;))

Color 0,0,128
desktop=init()
setdesktopcolour(255,255,255)  ;sets the desktop mesh colour not the texture colour!

Color ui_windowred,ui_windowgreen,ui_windowblue
bluebox=addbox(scx/2,scy/2,scx/4,scy/4,1)


Color 100,100,100 ;set colours for the following commands
box=addbox(50,10,100,130,1)
box2=addbox(10,50,100,130,1,box)
startmenu=addbox(0,scy-32,scx,32,0)


startbutton=addbutton("Menu","MENU",50,16,100,32,startmenu)
Color 255,255,255
drawrect 0,0,100,130,0,box
drawrect 0,0,100,130,0,box2

addtext 12,24,"Parented",0,0,box2
addtext 10,38,"to Box",0,0,box2

addtext 10,100,"This text is being written to the desktop area of the User Iterface",0,0,DESKTOP

Color 255,0,0
window=addwindow(100,100,320,120,desktop,"ERROR!!!")

button1=addbutton("Ok","OK",(320/3),70,100,32,window)
button1=addbutton("CANCEL","CANCEL",(320/3)*2,70,100,32,window)

For n=1 To 5
Color 100,100,255
button=addradiobUTTON("BOX"+Str$(N),"BOX"+Str$(N),n*4,(scy-(n*4))-10,20,20,desktop)
setclickmode button,1
Next



[/babble]

nice work :)

Cheers for the comment (wooo, i goT one!! :D)

nice work but be more creative

I think that's pretty creative, it looks okay. A good start on a GUI.

Note that at the moment what you see is done with the build in blitz commands. ;) that gui runs without any addins or textures or any external files (theyre all optinal) so i like how it looks. Also, that screen was taken after less than 6 hours of work :)

Cheers for the comments :D