diff --git a/src/game/90-actions/89-game-and-settings.js b/src/game/90-actions/89-game-and-settings.js index bbd6d2c..bff8c7e 100644 --- a/src/game/90-actions/89-game-and-settings.js +++ b/src/game/90-actions/89-game-and-settings.js @@ -25,20 +25,12 @@ Object.assign(ACT,{ // An import is a new network next to the others: the one playing here is saved and kept. try{if(!nx)throw 0;S=nx;compute();checkGoals();}catch(e){S=was;if(S)compute();renderAll();toast(tr('game_and_settings.import_failed_that_save_is_damaged'),'bad');sfx('err');return;}UI.confirm=null;$('bankBox').hidden=true;$('dash').hidden=true;UI.started=true;UI.sel=null;UI.speed=S.uiSpeed===undefined?1:S.uiSpeed;if(S.cam&&isFinite(S.cam.x))Object.assign(cam,S.cam);else{const h=CITY[S.home];if(h){cam.x=h.x;cam.y=h.y;}}closeModal();$('modal').hidden=true;{const im=S;S=was;slotLeave();S=im;}slotNew();delete S.sv;compute();renderAll();save(true);toast(tr('game_and_settings.welcome_back_name_imported_and_saved',{name:esc(S.name)}),'good');sfx('coin');track('game_import');}, menu:()=>{if(!S||!UI.started){showTitle();return;}if(pzOn()){pzMenu();return;}openModal(`
${saveFailMsg()}
`:`${tr('game_and_settings.your_game_saves_itself_every_few')}
`}${isPhone()?installRow():''} + ${saveFailing()?`${saveFailMsg()}
`:`${tr('game_and_settings.your_game_saves_itself_every_few')}
`} + + ${chatHtml()}${issueHtml()}`);}, settings:()=>{UI.setOpen=true;openModal(settingsHtml());}, settingsClose:()=>{UI.setOpen=false;if(!S||!UI.started)showTitle();else closeModal();}, diff --git a/src/styles/40-modal.css b/src/styles/40-modal.css index 0f3265d..3603f80 100644 --- a/src/styles/40-modal.css +++ b/src/styles/40-modal.css @@ -186,3 +186,8 @@ h2 .rn{font-size:18px;vertical-align:middle;padding:2px 4px} .homepick{width:100%} .tcont .b{white-space:normal;max-width:100%;overflow-wrap:anywhere;line-height:1.15} #modalCard{overflow-x:hidden} +.menu-tiles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:10px} +.mtile{border:3px solid var(--ink);border-radius:14px;background:var(--paper);box-shadow:0 3px 0 var(--ink);padding:8px 4px 7px;display:flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer;font:800 13px/1.15 var(--display);color:var(--ink);text-align:center;min-height:68px;justify-content:center} +.mtile i{font-style:normal;font-size:22px;line-height:1}.mtile:active{transform:translateY(2px);box-shadow:0 1px 0 var(--ink)} +.menu-links{margin:12px 0 0;text-align:center;line-height:2;color:var(--ink2)} +.menu-links .lnk{background:none;border:0;padding:4px 2px;font-weight:700;font-size:14px;font-family:inherit;color:var(--ink2);text-decoration:underline;text-underline-offset:3px;cursor:pointer}