direct.gui.DirectFrame

from direct.gui.DirectFrame import DirectFrame

A DirectFrame is a basic DirectGUI component that acts as the base class for various other components, and can also serve as a basic container to hold other DirectGUI components.

A DirectFrame can have:

  • A background texture (pass in path to image, or Texture Card)

  • A midground geometry item (pass in geometry)

  • A foreground text Node (pass in text string or OnscreenText)

Each of these has 1 or more states. The same object can be used for all states or each state can have a different text/geom/image (for radio button and check button indicators, for example).

See the DirectFrame page in the programming manual for a more in-depth explanation and an example of how to use this class.

Inheritance diagram

Inheritance diagram of direct.gui.DirectFrame

class DirectFrame(parent=None, **kw)[source]

Bases: DirectGuiWidget

DefDynGroups = ('text', 'geom', 'image')
__init__(self, parent=None, **kw)[source]
clearGeom(self)[source]
clearImage(self)[source]
clearText(self)[source]
setGeom(self, geom=None)[source]
setImage(self, image=None)[source]
setText(self, text=None)[source]