Browse Source

*** empty log message ***

David Rose 25 years ago
parent
commit
989c4282d1
1 changed files with 7 additions and 1 deletions
  1. 7 1
      direct/src/gui/Label.py

+ 7 - 1
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