a simple windows and type maker?

Blitz3D Forums/Blitz3D Programming/a simple windows and type maker?

RiverRatt(Posted 2004) [#1]
I would like to make some kind of window system that I could use for making windows that I could use in games.
Also I would like it to generate code specificly Types, like in visual basic but without so many unnessesary "fields". (This may be out of my leage but I will learn a lot about types)
So
Has this already bin done?
If anyone has any avice for me on I am open verry open to suggestions.
So far I have only seen one windows example but it only brought up some nonfunctioning windows. I would realy like some advice on how to intall functionality to the window
using the form window witch will hold all of the object data and just prints out code in text that can be cut and pasted into the blitz editer.
Thanks for any advice!





RiverRatt(Posted 2004) [#2]
P.S. If you run this code you will see that the text prompt
is in the wrong location. I need it to print the output into
the window that is being created (the one on the left).
I don't understand why this works at the top and the code in the fuction does not?
SetBuffer ImageBuffer(interface)
Color 215,215,220

Rect 0,0,250,300,1
Color 10,10,150
Rect 3,3,207,20
;darkedge
Color 170,170,170
;lightedge
Rect 2,2,208,296,0
Color 170,170,170

For i = 1 To 3
	Color 215-(10*i),215-(10*i),215-(10*i)
	Line 3,21+i,208,21+i
Next
;DrawImage button_1,10,200 

;Color 200,200,210
Text 4,4,"form editer"



and
Function newform(form_name$,window)

SetBuffer ImageBuffer(window)
Color 215,215,220

Rect 0,0,250,300,1
;darkedge
Color 170,170,170
;Line 0,0,1,0
;lightedge
Rect 2,2,208,296,0
Color 90,90,90 
;Line 0,301,209,297
;Line 210,299,210,1
; graphical interface
;SetBuffer FrontBuffer()
Input form_name$="form 1"
Text 4,4,form_mame$
SetBuffer BackBuffer()



End Function





ZombieWoof(Posted 2004) [#3]
AlphaGUI has a nice form editor, and spits out BB code you can easily paste into your app... including a main loop for accessing the form elements.


reading over the alphagui code also gave me a good grounding in the blitz type system, which is a little weird when compared to other OO languages


GW(Posted 2004) [#4]
I think you mean BBgui. AlphaGui does no spitting.


ZombieWoof(Posted 2004) [#5]
better check again -- has a nice bb export :)

my only complaint with it is that it always spits the main loop, no option to leave it off, which means you have to chop that out before you can use the exported code as an include. (viva le modular code !!!)

of course, if I really had my way, it'd spit a type just for that form and a function that builds the form and returns an object of that type :) But I end up doing that by hand :)


RiverRatt(Posted 2004) [#6]
"of course, if I really had my way, it'd spit a type just for that form and a function that builds the form and returns an object of that type :) But I end up doing that by hand :)"
Yes, this is exaxtly all I want the code up there to do.
Just build types for a form and of course the buttons.
I think I will start over using alphaGUI for the properties
window. And rewrite it using types.I think this will be a good learning program.

Wish me luck!