I need to display a fullscreen GUI (using CEGUI gadgets and windows) over a background image.
I know you can display sprites over CEGUI gadgets and windows, but how can you display gadgets and windows over an existing sprite?Is it possible to obtain a partial "transparency" effect as it seems implied by the ShowGUI command?
To explain further, take this little program:
Code: Select all
; GUI over background attempt
InitEngine3D()
InitSprite()
InitSprite3D()
InitKeyboard()
InitMouse()
Add3DArchive("Data\" , #PB_3DArchive_FileSystem)
Add3DArchive("Textures\" , #PB_3DArchive_FileSystem)
Add3DArchive("GUI\", #PB_3DArchive_FileSystem)
Add3DArchive("GUI\schemes", #PB_3DArchive_FileSystem)
Add3DArchive("GUI\imagesets", #PB_3DArchive_FileSystem)
Add3DArchive("GUI\fonts", #PB_3DArchive_FileSystem)
Add3DArchive("GUI\looknfeel", #PB_3DArchive_FileSystem)
Add3DArchive("GUI\layouts", #PB_3DArchive_FileSystem)
OpenScreen(1024, 768, 32, "Test")
background = LoadSprite(#PB_Any,"background.bmp",#PB_Sprite_Texture)
background3D = CreateSprite3D(#PB_Any,background)
CreateCamera(0,0,0,100,100)
OpenWindow3D(0, 50, 50, 500, 400, "CEGUI over background")
ButtonGadget3D(1, 60, 60, 100, 25, "Push me")
ShowGUI(200,1)
Repeat
ExamineKeyboard()
If ExamineMouse()
InputEvent3D(MouseX(),MouseY(),MouseButton(#PB_MouseButton_Left),KeyboardInkey())
EndIf
; (a)
; displaysprite(background,0,0)
RenderWorld()
; (b)
; displaysprite(background,0,0)
FlipBuffers()
Until KeyboardReleased(#PB_Key_Escape) Or WindowEvent3D()=#PB_Event3D_CloseWindow
Anybody willing to help?
Thanks!