feat(assets): use single texture atlas instead of loading all images individually
This commit is contained in:
@@ -6,12 +6,12 @@ const { assets } = useAssets();
|
||||
|
||||
const renderNotification = (
|
||||
ctx: CanvasRenderingContext2D,
|
||||
image: HTMLImageElement,
|
||||
image: AtlasImage,
|
||||
title: string,
|
||||
description: string,
|
||||
) => {
|
||||
ctx.drawImage(assets.settings.topScreen.notification, 0, 0);
|
||||
ctx.drawImage(image, 2, 2);
|
||||
assets.images.settings.topScreen.notification.draw(ctx, 0, 0);
|
||||
image.draw(ctx, 2, 2);
|
||||
|
||||
ctx.font = "10px NDS10";
|
||||
ctx.fillStyle = "#282828";
|
||||
@@ -26,29 +26,29 @@ const renderNotification = (
|
||||
};
|
||||
|
||||
const mainNotification = computed(() => ({
|
||||
image: assets.settings.topScreen.settings,
|
||||
image: assets.images.settings.topScreen.settings,
|
||||
title: $t("settings.title"),
|
||||
description: $t("settings.description"),
|
||||
}));
|
||||
|
||||
const IMAGES_MAP: Record<string, HTMLImageElement> = {
|
||||
options: assets.settings.topScreen.options.options,
|
||||
optionsStartUp: assets.settings.topScreen.options.startUp,
|
||||
optionsLanguage: assets.settings.topScreen.options.language,
|
||||
optionsGbaMode: assets.settings.topScreen.options.gbaMode,
|
||||
const IMAGES_MAP: Record<string, AtlasImage> = {
|
||||
options: assets.images.settings.topScreen.options.options,
|
||||
optionsStartUp: assets.images.settings.topScreen.options.startUp,
|
||||
optionsLanguage: assets.images.settings.topScreen.options.language,
|
||||
optionsGbaMode: assets.images.settings.topScreen.options.gbaMode,
|
||||
|
||||
clock: assets.settings.topScreen.clock.clock,
|
||||
clockTime: assets.settings.topScreen.clock.time,
|
||||
clockDate: assets.settings.topScreen.clock.date,
|
||||
clockAlarm: assets.settings.topScreen.clock.alarm,
|
||||
clock: assets.images.settings.topScreen.clock.clock,
|
||||
clockTime: assets.images.settings.topScreen.clock.time,
|
||||
clockDate: assets.images.settings.topScreen.clock.date,
|
||||
clockAlarm: assets.images.settings.topScreen.clock.alarm,
|
||||
|
||||
user: assets.settings.topScreen.user.user,
|
||||
userUserName: assets.settings.topScreen.user.userName,
|
||||
userBirthday: assets.settings.topScreen.user.birthday,
|
||||
userMessage: assets.settings.topScreen.user.message,
|
||||
userColor: assets.settings.topScreen.user.color,
|
||||
user: assets.images.settings.topScreen.user.user,
|
||||
userUserName: assets.images.settings.topScreen.user.userName,
|
||||
userBirthday: assets.images.settings.topScreen.user.birthday,
|
||||
userMessage: assets.images.settings.topScreen.user.message,
|
||||
userColor: assets.images.settings.topScreen.user.color,
|
||||
|
||||
touchScreen: assets.settings.topScreen.touchScreen.touchScreen,
|
||||
touchScreen: assets.images.settings.topScreen.touchScreen.touchScreen,
|
||||
};
|
||||
|
||||
const menuNotification = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user