feat(assets): use single texture atlas instead of loading all images individually
This commit is contained in:
@@ -124,7 +124,7 @@ onRender((ctx) => {
|
||||
ctx.strokeRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||
|
||||
// text
|
||||
ctx.drawImage(assets.projects.bottomScreen.popupTextBackground, 2, 146);
|
||||
assets.images.projects.bottomScreen.popupTextBackground.draw(ctx, 2, 146);
|
||||
ctx.font = "16px Pokemon DP Pro";
|
||||
ctx.textBaseline = "top";
|
||||
const displayedText = text.value.slice(
|
||||
@@ -135,10 +135,14 @@ onRender((ctx) => {
|
||||
|
||||
// choice box
|
||||
if (textProgress.value >= 1) {
|
||||
ctx.drawImage(assets.projects.bottomScreen.popupChoiceBackground, 194, 98);
|
||||
assets.images.projects.bottomScreen.popupChoiceBackground.draw(
|
||||
ctx,
|
||||
194,
|
||||
98,
|
||||
);
|
||||
|
||||
const y = selectedOption === "yes" ? YES_Y : NO_Y;
|
||||
ctx.drawImage(assets.projects.bottomScreen.popupSelector, 200, y);
|
||||
assets.images.projects.bottomScreen.popupSelector.draw(ctx, 200, y);
|
||||
|
||||
drawTextWithShadow(
|
||||
ctx,
|
||||
|
||||
Reference in New Issue
Block a user