Changing background color of a DirectDialog? (SOLVED)

Is it possible to change the background color of a DirectDialog?

I create the DirectDialog here:

self.dialog = DirectDialog(dialogName="CustomDialog",
                        buttonTextList = ("End Turn", "Cancel"), 
                        buttonValueList = (1,0),
                        text="End your turn?",
                        command=self.itemSel)

I have been trying to set the keyword ‘frameColor’ but that seems to have no effect on a DirectDialog object.

I would like to create a dialog with a black background. Also I would like to be able to set the framesize of the dialog if possible?

I want to use the black dialog to serve as a container for 9 imagebuttons with black backgrounds.

Problem is solved by creating a new model for the dialog box and using following code:

defdialoggeom = loader.loadModelOnce('models/newdialog_box_gui')
DGG.setDefaultDialogGeom(defdialoggeom)

It seems that there is no other way, but this is also easy enough :slight_smile:

You can also just set the color by setting image_color = (0, 0, 0, 1) on the DirectDialog constructor. If you want to load a custom background image anyway (it does give a better look), you can specify this background image on a per-dialog basis by specifying image = myImage.

Of course, if you want the same custom background image for all of your DirectDialogs, it’s a fine idea to use DGG.setDefaultDialogGeom().

David