fix: use LOGICAL_WIDTH,HEIGHT instead of SCREEN_WIDTH,HEIGHT beucase screen is scaled
This commit is contained in:
@@ -160,7 +160,7 @@ onRender((ctx) => {
|
||||
}
|
||||
|
||||
ctx.fillStyle = `rgba(0, 0, 0, ${store.isIntro ? store.intro.fadeOpacity : store.isOutro ? store.outro.fadeOpacity : 0})`;
|
||||
ctx.fillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
ctx.fillRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
|
||||
});
|
||||
useKeyDown((key) => {
|
||||
if (
|
||||
|
||||
@@ -121,7 +121,7 @@ onRender((ctx) => {
|
||||
// frame
|
||||
ctx.strokeStyle = "#0000007f";
|
||||
ctx.lineWidth = 1;
|
||||
ctx.strokeRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
ctx.strokeRect(0, 0, LOGICAL_WIDTH, LOGICAL_HEIGHT);
|
||||
|
||||
// text
|
||||
assets.images.projects.bottomScreen.popupTextBackground.draw(ctx, 2, 146);
|
||||
|
||||
Reference in New Issue
Block a user