Function CreateW3DButton(bn,x,y,t$,midx=False,midy=False)
	Button_Height=23
	Button_Width=StringWidth(t$)+8
	If midx=True Then
		lx=x-(Button_width/2)
	Else
		lx=x
	EndIf		
	rx=lx+Button_Width
	If midy=True Then
		oy=y-(Button_Height/2)
	Else
		oy=y
	EndIf
	uy=oy+Button_Height
	If BankSize(W3DButton_Bank)<(bn*4) Then ResizeBank(W3DButton_Bank,bn*4)
	b=CreateBank(26+Len(t$))
	PokeInt W3DButton_Bank,(bn-1)*4,b
	PokeInt b,0,lx
	PokeInt b,4,rx
	PokeInt b,8,oy
	PokeInt b,12,uy
	PokeInt b,16,lx+Button_Width/2
	PokeInt b,20,oy+Button_Height/2
	PokeShortString(b,24,t$)
End Function
;+ PokeShortString