diff options
Diffstat (limited to 'html/rogue')
-rw-r--r-- | html/rogue/js/debug.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/html/rogue/js/debug.js b/html/rogue/js/debug.js index 751af4c..6477a83 100644 --- a/html/rogue/js/debug.js +++ b/html/rogue/js/debug.js @@ -85,7 +85,7 @@ const Debug = { ); // Draw camera deadzone - ctx.strokeStyle = 'rgba(255, 255, 0, 0.5)'; + ctx.strokeStyle = 'rgba(255, 162, 0, 1)'; ctx.lineWidth = 2; ctx.strokeRect( state.canvas.width/2 - deadzoneX, @@ -93,6 +93,18 @@ const Debug = { deadzoneX * 2, deadzoneY * 2 ); + + // Draw a small cross at the center of the camera deadzone + const centerX = state.canvas.width / 2; + const centerY = state.canvas.height / 2; + const crossSize = 10; // Size of the cross arms + + ctx.beginPath(); + ctx.moveTo(centerX - crossSize, centerY); + ctx.lineTo(centerX + crossSize, centerY); + ctx.moveTo(centerX, centerY - crossSize); + ctx.lineTo(centerX, centerY + crossSize); + ctx.stroke(); } // Restore context state |