Man, I can't find that tutorial anywhere, I guess I'll have to rewrite it. The old tutorial was pretty basic, it's was more of a log report really. It had a step by step approach to creating two windows with buttons and text on them and the best method for linking buttons to there functions.
This was the style for the tutorial but I guess can be updated with better descriptions, needs alot of work:
function
create_window(handle$,x,y,width,height,caption$,style,parent$)
`get a free window for use
i = free_window( handle$ )
`if the free window handle is already used, the free_window function will return 0.
if i = 0 then exitfunction
`the ID of the window and is used to link other stuff like menus, buttton etc to it.
window(i).handle = handle$
`sets the position of the window
window(i).xpos = x
window(i).ypos = y
`size of the window and sprite
window(i).width = width
window(i).height = height
`the name of the window which appears in the title bar
window(i).caption = caption
`if the style is set to 0 it is use as the main window, 1 a free window
`if 2, it’s a window that has no title bar and can’t be moved
`if you make two window with the style 0, the newest window style will be set to 1
window(i).style = style
`if the style is greater than 0, then you can attach your window to another window
`parent$ = the handle of the window you want to attach too
window(i).parent = parent$
`all new window are active, meaning they are visible and can be used
window(i).active = 1
`set the priority of the window and sprite
window(i).priority = i + base_priority + 1
`this will get the current class which is the format of the window, like color etc…
window(i).class = get_active_window_class()
`will reserve an image and sprite for use
window(i).image = free_image()
window(i).sprite = free_ sprite()
`if the user set width and height are too small it will set them to a smallest size posible
`because you need to be able to see and read the title bar only if a style is less than 2
if width < get_window_class_dimensions(di.window.width.min) and style < 2
width = get_window_class_dimensions(di.window.width.min) + text width(caption$)
endif
if height < get_window_class_dimensions(di.window. height.min) and style < 2
height = get_window_class_dimensions(di.window. height.min)
endif
`this section is for building the window image
`gets and sets ink the current window class body RGB color.
`this will look into a txt file for the window body color of the current skin for the window body.
ink get_window_class_color(“window.body”) , 0
`creates a box the size of the window in the choosen color
box 0,0,width,height
`another box for the title bar of the window
ink get_window_class_color(“window.titlebar”) , 0
`will create a small box along the to of the window for the title bar
box 0,0 width,get_window_class_dimensions(di.window.titlebar.height)
`text the caption for the title bar
ink get_window_class_color(“window.titlebar.txt”) , 0
`will get the postion for the caption.
x = get_window_class_dimensions(di.window.titlebar.txt.x)
y = get_window_class_dimensions(di.window.titlebar.txt.y)
text , 0+x , 0+y , caption$
`now we get that image and store it
get image window(i).image,0,0,width,height,1
`clear the screen for furture images
Cls
`set the image to a sprite, the priority and hide it
sprite window(i).sprite,0,0,window(i).image
set sprite window(i).sprite,0,1
set sprite priority window(i).sprite,window(i).priority
hide sprite window(i).sprite
endfunction
And thats a function to create a window, simple as that.