Skip to content

Commit

Permalink
make tails not change color when whammied unless the themer sets them…
Browse files Browse the repository at this point in the history
… to do so.
  • Loading branch information
mdsitton committed Jul 27, 2011
1 parent 1543f72 commit 85fab89
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/Instrument.py
Expand Up @@ -105,9 +105,14 @@ def __init__(self, engine, playerObj, player = 0):
self.beatsPerUnit = self.beatsPerBoard / self.boardLength
self.fretColors = self.engine.theme.noteColors
self.spColor = self.engine.theme.spNoteColor
self.killColor = self.engine.theme.killNoteColor
self.useFretColors = self.engine.theme.use_fret_colors

if not self.engine.theme.killNoteColor == "frets":
kC = self.engine.theme.killNoteColor
self.killColor = [kC, kC, kC, kC, kC]
else:
self.killColor = self.fretColors

self.playedNotes = []
self.missedNotes = []

Expand Down Expand Up @@ -1629,8 +1634,7 @@ def project(beat):
if kill and big == True:
kEffect = ( math.sin( pos / 50 ) + 1 ) /2
size = ((0.02 + (kEffect * 0.182) * 2), s)

c = [self.killColor[0],self.killColor[1],self.killColor[2]]
c = [self.killColor[fret][0],self.killColor[fret][1],self.killColor[fret][2]]
if c != [0,0,0]:
for i in range(0,3):
c[i]=c[i]*kEffect+color[i]*(1-kEffect)
Expand Down
6 changes: 5 additions & 1 deletion src/Theme.py
Expand Up @@ -174,7 +174,11 @@ def get(value, type = str, default = None):
default_color = ["#22FF22", "#FF2222", "#FFFF22", "#3333FF", "#FF9933", "#CC22CC"]
self.noteColors = [get("fret%d_color" % i, "color", default_color[i]) for i in range(6)]
self.spNoteColor = get("fretS_color", "color", "#4CB2E5")
self.killNoteColor = get("fretK_color", "color", "#FFFFFF")

#Color of the tails when whammied, default is set to the colors of the frets
self.killNoteColor = get("fretK_color", str, "frets")
if not self.killNoteColor == "frets":
self.killNoteColor = self.hexToColor(self.killNoteColor)

#just like glow_color, this allows you to have tails use either the color of the note
#or the actual color of the tail
Expand Down

0 comments on commit 85fab89

Please sign in to comment.