GUI going freakin psycho..... -.-

Blitz3D Forums/Blitz3D Beginners Area/GUI going freakin psycho..... -.-

Guy Fawkes(Posted 2009) [#1]
Hi all. Ok, why is my gui going crazy not showing itself?

How can I display my gui in graphics3d?

Graphics3D 800,600,0,2

Global btn001

Global WinX
Global WinY
Global WinWidth
Global WinHeight

WinX = 0
WinY = 0
WinWidth = GraphicsWidth()/2
WinHeight = GraphicsHeight()

Include "blitzui.bb"

Initialise(  )
LoadColourScheme( "slate.cs" )

win001 = Window( WinX, WinY, WinWidth, WinHeight, "Particle Editor", "0", 1, 0, 0, 0 )
btn001 = Button( WinX+WinWidth/16, WinHeight-60, WinWidth-30, WinHeight/(WinWidth/8), "Change Particle", "0", 1, 0, 0 )
lbl001 = Label( WinX, WinWidth/4, "Image", 0 )

spx1 = WinX+StringWidth("Image")+Len("Image")
spy1 = WinX+WinWidth/4-Len("Image")
spwidth1 = WinWidth/2+StringWidth("Image")+Len("Image")*4+10
spheight1 = 21
val1 = 1
min1 = 0
max1 = 9999
inc1 = 1
mode1$ = "Integer"
btnsonly1 = False

sp1 = Spinner(spx1, spy1, spwidth1, spheight1, val1, min1, max1, inc1, mode1$, btnsonly1)

Global camera = CreateCamera()
PositionEntity camera,0,1,0

Global land = CreatePlane()
Global tex = LoadTexture("GRASS.jpg")
EntityTexture land,tex

While Not KeyHit(1)

UpdateGUI()

UpdateWorld()
RenderWorld()

;Reset all GUI events
ResetEvents()

Flip
Wend


And don't worry about includes or textures, just tell me how I can get my gui to show in 3d mode.


Yasha(Posted 2009) [#2]
Judging by the BlitzUI examples (I don't use it myself), the GUI is drawn by the UpdateGUI() command. Since you've got RenderWorld coming after this, the 3D scene is being drawn straight over the top and erasing it. Try moving UpdateGUI to after RenderWorld.


Guy Fawkes(Posted 2009) [#3]
THANK you! =D