From 989c4282d14047ee870312918c772caec42881d1 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 30 Mar 2001 23:41:18 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/gui/Label.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/direct/src/gui/Label.py b/direct/src/gui/Label.py index 0fcf0a6096..ecef31881b 100644 --- a/direct/src/gui/Label.py +++ b/direct/src/gui/Label.py @@ -64,7 +64,13 @@ def textLabelAndText(string, style, text.setCardAsMargin(0.1, 0.1, 0.0, 0.0) text.setTransform(Mat4.scaleMat(scale)) - if style == ButtonUp: + # The style might *itself* be a four-component color. + if (isinstance(style, types.TupleType) or + isinstance(style, VBase4)): + # If the style is a tuple, it means black on the specified color. + text.setCardColor(style[0], style[1], style[2], style[3]) + + elif style == ButtonUp: # This is the default: black on white. pass