add cursor color overrides

This commit is contained in:
yugecin
2016-10-01 11:53:33 +02:00
parent f313a1639f
commit 652bb4f2d0
6 changed files with 176 additions and 36 deletions

View File

@@ -190,7 +190,12 @@ public class Cursor {
for (int i = 0; i < removeCount && !trail.isEmpty(); i++)
trail.remove();
Color filter = getColorFilter();
Color filter;
if (isMirrored) {
filter = Dancer.cursorColorMirrorOverride.getMirrorColor();
} else {
filter = Dancer.cursorColorOverride.getColor();
}
// draw a fading trail
float alpha = 0f;
@@ -218,16 +223,6 @@ public class Cursor {
cursorMiddle.drawCentered(mouseX, mouseY, filter);
}
private Color getColorFilter() {
if (!Dancer.cursoruselastobjectcolor) {
return Color.white;
}
if (isMirrored) {
return lastMirroredObjColor;
}
return lastObjColor;
}
/**
* Adds all points between (x1, y1) and (x2, y2) to the cursor point lists.
* @author http://rosettacode.org/wiki/Bitmap/Bresenham's_line_algorithm#Java