diff --git a/direct/src/gui/Button.py b/direct/src/gui/Button.py index 683eb23287..ae063d248c 100644 --- a/direct/src/gui/Button.py +++ b/direct/src/gui/Button.py @@ -14,7 +14,8 @@ class Button(DirectObject): drawOrder = getDefaultDrawOrder(), font = getDefaultFont(), pos = (0, 0), - geomRect = None): + geomRect = None, + style = Label.ButtonUp): self.name = name self.width = width # if no label given, use the button name @@ -26,7 +27,7 @@ class Button(DirectObject): # text label, make text button self.label = label - self.l1 = Label.textLabel(self.label, Label.ButtonUp, + self.l1 = Label.textLabel(self.label, style, scale, width, drawOrder, font) if width == None: diff --git a/direct/src/gui/Label.py b/direct/src/gui/Label.py index dbc8294588..5ba1848951 100644 --- a/direct/src/gui/Label.py +++ b/direct/src/gui/Label.py @@ -11,7 +11,7 @@ ButtonDown = 3 Sign = 4 ScrollTitle = 5 ScrollItem = 6 - +ButtonUpGui = 7 def textLabel(string, style, scale = 0.1, @@ -64,6 +64,10 @@ def textLabelAndText(string, style, if style == ButtonUp: # This is the default: black on white. pass + + elif style == ButtonUpGui: + # special GUI button with our lovely gui color + text.setCardColor(0.25, 0.7, 0.85, 1.0) elif style == ButtonLit: # When the mouse is over the button, the background turns