This commit is contained in:
Renan LE CARO 2025-04-06 10:47:44 +02:00
parent ebbf482d0e
commit 8944f8ef4a
4 changed files with 15 additions and 29 deletions

2
dist/index.html vendored
View file

@ -1008,7 +1008,7 @@ async function openMainMenu() {
pause(true); pause(true);
const actions = [ const actions = [
{ {
icon: (0, _loadGameData.icons)["icon:7_levels_run"], icon: (0, _loadGameData.icons)["icon:new_run"],
text: (0, _i18N.t)("main_menu.normal"), text: (0, _i18N.t)("main_menu.normal"),
help: (0, _gameUtils.highScoreText)() || (0, _i18N.t)("main_menu.normal_help"), help: (0, _gameUtils.highScoreText)() || (0, _i18N.t)("main_menu.normal_help"),
value: ()=>{ value: ()=>{

View file

@ -1014,14 +1014,7 @@
{ {
"name": "icon:premium", "name": "icon:premium",
"size": 11, "size": 11,
"bricks": "__y____y___y____y____y_y__yby__y______y______yy_yty_yy_ybbytttybbyybbytttybby_ybytttyby___yyyyyyy____yyyyyyy_____________", "bricks": "__y____y___y____y____y_y__yby__y______y______yy_yby_yy_ybbybbbybbyybbybbbybby_ybybbbyby___yyyyyyy____yyyyyyy_____________",
"svg": null,
"color": ""
},
{
"name": "icon:7_levels_run",
"size": 7,
"bricks": "___a______at__cGCa_b_c_____ycGCa_b____at_____a___",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
@ -1032,13 +1025,6 @@
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{
"name": "icon:loop",
"size": 7,
"bricks": "bbbbbbbtttttt_aaaaa__cccc___CCC____GG_____y______",
"svg": null,
"color": ""
},
{ {
"name": "icon:addiction", "name": "icon:addiction",
"size": 9, "size": 9,
@ -1049,7 +1035,7 @@
{ {
"name": "icon:help", "name": "icon:help",
"size": 8, "size": 8,
"bricks": "___tt_____tttt___tt__tt__tt__tt_____tt_____tt______________tt___", "bricks": "___bb_____bbbb___bb__bb__bb__bb_____bb_____bb______________bb___",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
@ -1102,42 +1088,42 @@
{ {
"name": "icon:starting_perks", "name": "icon:starting_perks",
"size": 8, "size": 8,
"bricks": "_________y_y_y___________l_l_l_l_________l_l_l_l_________l_l_l_l", "bricks": "_________b_b_b___________g_g_g_g_________g_g_g_g_________g_g_g_g",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{ {
"name": "icon:download", "name": "icon:download",
"size": 8, "size": 8,
"bricks": "___yy______yy______yy______yy______yy____yyyyyy___yyyy__gggyyggg", "bricks": "___bb______bb______bb______bb______bb____bbbbbb___bbbb__gggbbggg",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{ {
"name": "icon:upload", "name": "icon:upload",
"size": 8, "size": 8,
"bricks": "gggyyggg__yyyy___yyyyyy____yy______yy______yy______yy______yy___", "bricks": "gggbbggg__bbbb___bbbbbb____bb______bb______bb______bb______bb___",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{ {
"name": "icon:coins", "name": "icon:coins",
"size": 8, "size": 8,
"bricks": "__yyyy___yyOOyy_yyOOOOyyyOOOOOOyyOOOOOOyyyOOOOyy_yyOOyy___yyyy__", "bricks": "__bbbb___bbggbb_bbggggbbbggggggbbggggggbbbggggbb_bbggbb___bbbb__",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{ {
"name": "icon:particles", "name": "icon:particles",
"size": 8, "size": 8,
"bricks": "_y_y_y__________y_yyy_y___yyy___y_yyy__y_____y___y_y__y________y", "bricks": "_b_b_b__________b_bbb_b___bbb___b_bbb__b_____b___b_b__b________b",
"svg": null, "svg": null,
"color": "" "color": ""
}, },
{ {
"name": "icon:reset", "name": "icon:reset",
"size": 8, "size": 8,
"bricks": "__rrrr___r____r_r_r__r_rr__rr__rr__rr__rr_r__r_r_r____r___rrrr__", "bricks": "bb____bbbbb__bbb_bbbbbb___bbbb____bbbb___bbbbbb_bbb__bbbbb____bb",
"svg": null, "svg": null,
"color": "" "color": ""
}, },

View file

@ -480,7 +480,7 @@ export async function openMainMenu() {
const actions: AsyncAlertAction<() => void>[] = [ const actions: AsyncAlertAction<() => void>[] = [
{ {
icon: icons["icon:7_levels_run"], icon: icons["icon:new_run"],
text: t("main_menu.normal"), text: t("main_menu.normal"),
help: highScoreText() || t("main_menu.normal_help"), help: highScoreText() || t("main_menu.normal_help"),
value: () => { value: () => {

View file

@ -1,4 +1,4 @@
import { Palette, RawLevel } from "../types"; import {Level, Palette, RawLevel} from "../types";
import _backgrounds from "../data/backgrounds.json"; import _backgrounds from "../data/backgrounds.json";
import _palette from "../data/palette.json"; import _palette from "../data/palette.json";
import _allLevels from "../data/levels.json"; import _allLevels from "../data/levels.json";
@ -26,11 +26,11 @@ function App() {
[], [],
); );
const deleteLevel = useCallback((li: number) => { const deleteLevel = useCallback((level: RawLevel) => {
if (confirm("Delete level")) { if (confirm("Delete level")) {
setLevels(levels.filter((l, i) => i !== li)); setLevels(levels.filter((l, i) => l!==level));
} }
}, []); }, [levels]);
useEffect(() => { useEffect(() => {
const timoutId = setTimeout(() => { const timoutId = setTimeout(() => {
@ -110,7 +110,7 @@ function App() {
/> />
<div className={"buttons"}> <div className={"buttons"}>
<button onClick={() => deleteLevel(li)}>Delete</button> <button onClick={() => deleteLevel(level)}>Delete</button>
<button onClick={() => updateLevel(li, resizeLevel(level, -1))}> <button onClick={() => updateLevel(li, resizeLevel(level, -1))}>
- -
</button> </button>