Draw cursor after keypress
This commit is contained in:
parent
33f6db24ae
commit
a4edf5d0c2
@ -231,40 +231,50 @@ export class Drawer {
|
||||
frame.position.y
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if(OsuRenderer.settings.showKeyPress) {
|
||||
if (cursor.position) {
|
||||
Drawer.p.image(
|
||||
cursorImage,
|
||||
cursor.position.x,
|
||||
cursor.position.y,
|
||||
55,
|
||||
55
|
||||
);
|
||||
|
||||
if(!OsuRenderer.settings.showFutureCursorPath && lastFrame.time > OsuRenderer.time) {
|
||||
for (let i = 1; i < path.length; i++) {
|
||||
const lastFrame = path[i - 1];
|
||||
const frame = path[i];
|
||||
|
||||
if(!OsuRenderer.settings.showFutureCursorPath && frame.time > OsuRenderer.time) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let size = 4;
|
||||
if (lastFrame.button.mouseLeft1 || lastFrame.button.mouseLeft2) {
|
||||
Drawer.p.stroke("#BB6BD9");
|
||||
// TODO: Draw an X instead
|
||||
Drawer.p.line(lastFrame.position.x - size, lastFrame.position.y - size, lastFrame.position.x + size, lastFrame.position.y + size);
|
||||
Drawer.p.line(lastFrame.position.x + size, lastFrame.position.y - size, lastFrame.position.x - size, lastFrame.position.y + size);
|
||||
}
|
||||
if(OsuRenderer.settings.showKeyPress) {
|
||||
|
||||
if (lastFrame.button.mouseRight1 || lastFrame.button.mouseRight2) {
|
||||
Drawer.p.stroke("#F2994A");
|
||||
// TODO: Draw an X instead
|
||||
Drawer.p.line(lastFrame.position.x - size, lastFrame.position.y - size, lastFrame.position.x + size, lastFrame.position.y + size);
|
||||
Drawer.p.line(lastFrame.position.x + size, lastFrame.position.y - size, lastFrame.position.x - size, lastFrame.position.y + size);
|
||||
}
|
||||
if(!OsuRenderer.settings.showFutureCursorPath && lastFrame.time > OsuRenderer.time) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let size = 4;
|
||||
if (lastFrame.button.mouseLeft1 || lastFrame.button.mouseLeft2) {
|
||||
Drawer.p.stroke("#BB6BD9");
|
||||
// TODO: Draw an X instead
|
||||
Drawer.p.line(lastFrame.position.x - size, lastFrame.position.y - size, lastFrame.position.x + size, lastFrame.position.y + size);
|
||||
Drawer.p.line(lastFrame.position.x + size, lastFrame.position.y - size, lastFrame.position.x - size, lastFrame.position.y + size);
|
||||
}
|
||||
|
||||
if (lastFrame.button.mouseRight1 || lastFrame.button.mouseRight2) {
|
||||
Drawer.p.stroke("#F2994A");
|
||||
// TODO: Draw an X instead
|
||||
Drawer.p.line(lastFrame.position.x - size, lastFrame.position.y - size, lastFrame.position.x + size, lastFrame.position.y + size);
|
||||
Drawer.p.line(lastFrame.position.x + size, lastFrame.position.y - size, lastFrame.position.x - size, lastFrame.position.y + size);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor.position)
|
||||
Drawer.p.image(
|
||||
cursorImage,
|
||||
cursor.position.x,
|
||||
cursor.position.y,
|
||||
55,
|
||||
55
|
||||
);
|
||||
|
||||
Drawer.p.pop();
|
||||
}
|
||||
static drawNumberWithSprites(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user