mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
shadow offset
This commit is contained in:
parent
0ae2103afd
commit
44cccfffd0
@ -23,6 +23,7 @@ class OnscreenText(PandaObject, NodePath):
|
|||||||
fg = None,
|
fg = None,
|
||||||
bg = None,
|
bg = None,
|
||||||
shadow = None,
|
shadow = None,
|
||||||
|
shadowOffset = (0.04,0.04),
|
||||||
frame = None,
|
frame = None,
|
||||||
align = None,
|
align = None,
|
||||||
wordwrap = None,
|
wordwrap = None,
|
||||||
@ -175,8 +176,8 @@ class OnscreenText(PandaObject, NodePath):
|
|||||||
|
|
||||||
if shadow[3] != 0:
|
if shadow[3] != 0:
|
||||||
# If we have a shadow color, create a shadow.
|
# If we have a shadow color, create a shadow.
|
||||||
textNode.setShadowColor(shadow[0], shadow[1], shadow[2], shadow[3])
|
textNode.setShadowColor(*shadow)
|
||||||
textNode.setShadow(0.03, 0.03)
|
textNode.setShadow(*shadowOffset)
|
||||||
|
|
||||||
if frame[3] != 0:
|
if frame[3] != 0:
|
||||||
# If we have a frame color, create a frame.
|
# If we have a frame color, create a frame.
|
||||||
@ -323,8 +324,8 @@ class OnscreenText(PandaObject, NodePath):
|
|||||||
self.textNode.freeze()
|
self.textNode.freeze()
|
||||||
if shadow[3] != 0:
|
if shadow[3] != 0:
|
||||||
# If we have a shadow color, create a shadow.
|
# If we have a shadow color, create a shadow.
|
||||||
self.textNode.setShadowColor(shadow[0], shadow[1], shadow[2], shadow[3])
|
self.textNode.setShadowColor(*shadow)
|
||||||
self.textNode.setShadow(0.03, 0.03)
|
self.textNode.setShadow(*shadowOffset)
|
||||||
else:
|
else:
|
||||||
# Otherwise, remove the shadow.
|
# Otherwise, remove the shadow.
|
||||||
self.textNode.clearShadow()
|
self.textNode.clearShadow()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user