Skip to content

Commit

Permalink
shadowOpacity support added to FontLayers
Browse files Browse the repository at this point in the history
  • Loading branch information
erodozer committed Jul 17, 2011
1 parent ec34d53 commit a7dc1cf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Rockmeter.py
Expand Up @@ -280,6 +280,8 @@ def __init__(self, stage, section, font):
self.shadow = self.get("shadow", bool, False) #show a shadow on the text
self.outline = self.get("outline", bool, False) #give the text an outline

self.shadowOpacity = self.get("shadowOpacity", float, 1.0) #the opacity of the shadow on the text

def updateLayer(self, playerNum):
w, h, = self.engine.view.geometry[2:4]

Expand Down Expand Up @@ -330,7 +332,7 @@ def render(self, visibility, playerNum):
if bool(eval(self.condition)):
glColor4f(*color)
self.font.render(self.text, position, align = alignment,
shadow = self.shadow, outline = self.outline)
shadow = self.shadow, outline = self.outline, shadowOpacity = self.shadowOpacity)


#creates a layer that is shaped like a pie-slice/circle instead of a rectangle
Expand Down

0 comments on commit a7dc1cf

Please sign in to comment.