Added "Cursor Size" option.

Also moved "New Cursor" option into the "Input" category.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-06-14 12:30:33 -05:00
parent 81d9421d74
commit 0112a03bd3
3 changed files with 34 additions and 10 deletions

View File

@@ -128,6 +128,17 @@ public class Cursor {
int FPSmod = (Options.getTargetFPS() / 60);
Skin skin = Options.getSkin();
// scale cursor
float cursorScale = Options.getCursorScale();
if (mousePressed && skin.isCursorExpanded())
cursorScale *= 1.25f; // increase the cursor size if pressed
if (cursorScale != 1f) {
cursor = cursor.getScaledCopy(cursorScale);
cursorTrail = cursorTrail.getScaledCopy(cursorScale);
if (hasMiddle)
cursorMiddle = cursorMiddle.getScaledCopy(cursorScale);
}
// TODO: use an image buffer
if (newStyle) {
// new style: add all points between cursor movements
@@ -174,14 +185,6 @@ public class Cursor {
}
cursorTrail.drawCentered(mouseX, mouseY);
// increase the cursor size if pressed
if (mousePressed && skin.isCursorExpanded()) {
final float scale = 1.25f;
cursor = cursor.getScaledCopy(scale);
if (hasMiddle)
cursorMiddle = cursorMiddle.getScaledCopy(scale);
}
// draw the other components
if (newStyle && skin.isCursorRotated())
cursor.setRotation(cursorAngle);