Newbie Help - DirectGUI

Hi. I am new to Panda3D and need some direction. I’ve read the tutorials and documentation I could find.

What I need to do is build a scrolling text window, where new text appears at the bottom and scrolls “old” text off the top. I’m looking at DirectGUI, but really do not want the buttons displayed by DirectScrollFrame. Are there any resources with code snippets or such that show a nice way of doing this in 2D on a Panda3D app?

I would like to use DirectGUI for this since it allows for parenting, but if it is simpler to use another text rendering solution I’m all ears. Any guidance would be appreciated.



some snippset ripped out of an old application of mine.
shows how to set up basic directScrolledList. if thats what you are looking for.

from direct.gui.DirectGui import *
import direct.directbase.DirectStart

chatList = DirectScrolledList(
incButton_pos= (-4,0,-2.4),
incButton_scale= (4,1,9),
decButton_pos= (-4,0,-0.8),
decButton_scale= (4,1,9),
frameColor= (0,1,1,1),
numItemsVisible = 4)


chatList.addItem( "yourNewText", True)
chatList.addItem( "yourNewText2", True)
chatList.addItem( "yourNewText3", True)
chatList.addItem( "yourNewText4", True)
chatList.addItem( "yourNewText5", True)
chatList.addItem( "yourNewText6", True)

if you want custom buttons you can replace them with your model of choice like that:

chatList.incButton['geom'] = loader.loadModel("./textures/gui/chatdown.egg")
chatList.decButton['geom'] = loader.loadModel("./textures/gui/chatup.egg")

hope it helps

Thanks much! That is exactly what I am looking for.