feat(assets): use single texture atlas instead of loading all images individually
This commit is contained in:
@@ -33,27 +33,27 @@ onRender((ctx) => {
|
||||
ctx.translate(props.x, props.y);
|
||||
|
||||
if (isOpen.value || animation.playing) {
|
||||
ctx.drawImage(
|
||||
assets.settings.topScreen.options.language,
|
||||
assets.images.settings.topScreen.options.language.draw(
|
||||
ctx,
|
||||
0,
|
||||
-48 + animation.stage1Offset,
|
||||
);
|
||||
ctx.drawImage(
|
||||
assets.settings.topScreen.options.gbaMode,
|
||||
assets.images.settings.topScreen.options.gbaMode.draw(
|
||||
ctx,
|
||||
48 - animation.stage2Offset,
|
||||
-48 + animation.stage1Offset,
|
||||
);
|
||||
ctx.drawImage(
|
||||
assets.settings.topScreen.options.startUp,
|
||||
assets.images.settings.topScreen.options.startUp.draw(
|
||||
ctx,
|
||||
0,
|
||||
-96 + animation.stage2Offset + animation.stage1Offset,
|
||||
);
|
||||
|
||||
ctx.drawImage(assets.settings.topScreen.options.optionsActive, 0, 0);
|
||||
assets.images.settings.topScreen.options.optionsActive.draw(ctx, 0, 0);
|
||||
} else if (isAnyOtherMenuOpen.value) {
|
||||
ctx.drawImage(assets.settings.topScreen.options.optionsDisabled, 0, 0);
|
||||
assets.images.settings.topScreen.options.optionsDisabled.draw(ctx, 0, 0);
|
||||
} else {
|
||||
ctx.drawImage(assets.settings.topScreen.options.options, 0, 0);
|
||||
assets.images.settings.topScreen.options.options.draw(ctx, 0, 0);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user