-
Notifications
You must be signed in to change notification settings - Fork 3
1.4 DirectSplitFrame
A two pane frame with an optional line between them to change the panes size.
from direct.gui import DirectGuiGlobals as DGG
from DirectGuiExtension.DirectSplitFrame import DirectSplitFrame
split = DirectSplitFrame(orientation=DGG.HORIZONTAL)
# access the left frame
split.firstFrame
# access the right frame
split.secondFrameNote: The firstFrame and secondFrame will return the DirectFrame that is either on the left/right or upper and lower side of the splitter respectively.
orientation: Horizontal will place the frames left and right and Vertical will split the frame vertical hence placing the panes above each other.
showSplitter: Boolean
Show or hide the draggable split bar, defaults to true
splitterPos: Float
Sets the position of the splitter whereby 0 means centered
splitterWidth: Float
Size of the splitter
splitterColor: Tuple of 4 or LVecBase4f
The color of the split bar
splitterHighlightColor: Tuple of 4 or LVecBase4f
Color of the split bar when hovered with the mouse
firstFrameUpdateSizeFunc
secondFrameUpdateSizeFunc: Function POinter
Function that should be called when the respective frame is changed in size
firstFrameMinSize
secondFrameMinSize:Float
The minimum size that the respective frame should preserve