direct.gui.DirectOptionMenu

from direct.gui.DirectOptionMenu import DirectOptionMenu

Implements a pop-up menu containing multiple clickable options.

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

Inheritance diagram

digraph inheritanceca6195434c { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "DirectButton" [URL="direct.gui.DirectButton.html#direct.gui.DirectButton.DirectButton",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="DirectButton(parent) - Create a DirectGuiWidget which responds"]; "DirectFrame" -> "DirectButton" [arrowsize=0.75,style=""]; "DirectFrame" [URL="direct.gui.DirectFrame.html#direct.gui.DirectFrame.DirectFrame",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "DirectGuiWidget" -> "DirectFrame" [arrowsize=0.75,style=""]; "DirectGuiBase" [URL="direct.gui.DirectGuiBase.html#direct.gui.DirectGuiBase.DirectGuiBase",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="Base class of all DirectGUI widgets."]; "DirectObject" -> "DirectGuiBase" [arrowsize=0.75,style=""]; "DirectGuiWidget" [URL="direct.gui.DirectGuiBase.html#direct.gui.DirectGuiBase.DirectGuiWidget",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "DirectGuiBase" -> "DirectGuiWidget" [arrowsize=0.75,style=""]; "NodePath" -> "DirectGuiWidget" [arrowsize=0.75,style=""]; "DirectObject" [URL="direct.showbase.DirectObject.html#direct.showbase.DirectObject.DirectObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="This is the class that all Direct/SAL classes should inherit from"]; "DirectOptionMenu" [URL="direct.gui.DirectOptionMenu.html#direct.gui.DirectOptionMenu.DirectOptionMenu",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="DirectOptionMenu(parent) - Create a DirectButton which pops up a"]; "DirectButton" -> "DirectOptionMenu" [arrowsize=0.75,style=""]; "NodePath" [URL="acron.core.NodePath.html#acron.core.NodePath",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "NodePath" [arrowsize=0.75,style=""]; }
class DirectOptionMenu(parent=None, **kw)[source]

Bases: DirectButton

DirectOptionMenu(parent) - Create a DirectButton which pops up a menu which can be used to select from a list of items. Execute button command (passing the selected item through) if defined To cancel the popup menu click anywhere on the screen outside of the popup menu. No command is executed in this case.