Special arrow color option

This commit is contained in:
DenialMC 2015-04-09 17:05:57 +03:00
parent 78ab9750d9
commit ce5d6e125a
2 changed files with 7 additions and 6 deletions

View file

@ -244,7 +244,7 @@ class Nametag2d(Nametag, Clickable2d, MarginVisible):
self.arrow = NametagGlobals.arrowModel.copyTo(self.contents) self.arrow = NametagGlobals.arrowModel.copyTo(self.contents)
self.arrow.setZ(self.ARROW_OFFSET + self.textNode.getBottom()) self.arrow.setZ(self.ARROW_OFFSET + self.textNode.getBottom())
self.arrow.setScale(self.ARROW_SCALE) self.arrow.setScale(self.ARROW_SCALE)
self.arrow.setColor(self.nametagColor[0][0]) self.arrow.setColor(self.nametagColor[4] if len(self.nametagColor) >= 5 else self.nametagColor[0][0])
def marginVisibilityChanged(self): def marginVisibilityChanged(self):
if self.cell is not None: if self.cell is not None:

View file

@ -160,7 +160,8 @@ NametagColors = {
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal (VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down (VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.2, 0.2, 0.2, 0.1875)), # Down
(VBase4(0.4, 0.4, 0.4, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover (VBase4(0.4, 0.4, 0.4, 1.0), VBase4(1.0, 1.0, 1.0, 0.5625)), # Rollover
(VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)) # Disabled (VBase4(0.2, 0.2, 0.2, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Disabled
VBase4(0.8, 0.4, 0.0, 1.0) # Arrow color
), ),
CCSuitBuilding: ( CCSuitBuilding: (
(VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal (VBase4(0.5, 0.5, 0.5, 1.0), VBase4(0.8, 0.8, 0.8, 0.375)), # Normal