LoginLogin

HOWTO: Basic drawing window layers

Root / Programming Questions / [.]

CoinzReturnsCreated:
Dim windows[20, 5] '0=x 1=y 2 = width 3 = height 4 = layer_number 'layer number effect draw order
DIM SYSCOLORS[10]
SYSCOLORS[0]=#BLUE
DEF DRAW_ALL_WINDOWS
 for t=0 to 10 ' all layers
for w=0 to 20 ' all windows
layer_num = windows[t, 4]
if layer_num==t then
x = windows[t, 0]
y  =windows[t, 1]
width = windows[t, 2]
height = windows[t, 3]
draw_window x, y, width, height
endif
next
next
END

DEF DRAW_WINDOW x, y, width, height
GBOX X, Y, WIDTH, HEIGHT
GFILL X+1, Y+1, X, Y, SYSCOLORS[0] ' just an array you'd have of all system colors in memory at this time for customization of UI
END

Explanation:
these numbers would be B, and A would be window number where the array is windows[A, B]
0 = x
1= y
2=width
3=height
4= layernumber

What I don't understand is what this is for exactly. I could maybe help you out with this since I kind of made a pretty stable version of this, but never made it public really

What I don't understand is what this is for exactly. I could maybe help you out with this since I kind of made a pretty stable version of this, but never made it public really
I made it to answer someone else's question.