Title screen: start button across the top, the other three the same size
This commit is contained in:
parent
51ba71567d
commit
3ead04b34d
3 changed files with 6 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ All notable changes to this project are documented here. The project follows
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
- Start anywhere: the new game screen lists the five suggested home cities as a compact stack, and the last entry lets you pick any city on the map that sells transit, grouped by continent.
|
||||
- Start anywhere: the new game screen lists the five suggested home cities as a compact stack, and the last entry lets you pick any city on the map that sells transit, grouped by continent. Below the big start button, How to play, Import a save and Settings are now the same size.
|
||||
- Language is now a dropdown on the title screen and in Settings, with each language named in itself. On phones it opens the system picker.
|
||||
- Every new network starts at ½ speed, so you can find your feet before the bills arrive (#186). Saved games still continue at the speed you left them.
|
||||
- You can put a link on standby, so one of two links between the same cities sits idle as a backup (#122). It carries traffic only when the other links are full or down, so its capacity is never wasted, and the map draws it dashed while it waits. The routing metric still applies to every link between the two cities.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ function showTitle(){
|
|||
<label class="f">${tr('title.pick_your_home_city')}</label><div class="starts homes">${starts.map(([c,d])=>`<button class="start ${UI.startCity===c?'on':''}" data-city="${c}" data-act="pickStart" data-args='{"city":"${c}"}'><b>${CITY[c].name}</b><span>${d}</span></button>`).join('')}<label class="start own ${START5.includes(UI.startCity)?'':'on'}" for="homeSel"><b>${tr('title.anywhere_else')}</b><span id="homeWhat">${homeWhat()}</span>${homePick()}</label></div>
|
||||
<label class="f">${tr('common.mode')}</label><div class="btns">${[['normal',tr('common.normal')],['sandbox',tr('common.sandbox')]].map(([m,l])=>`<button class="b sm modeb ${(UI.mode||'normal')===m?'pink':'ghost'}" data-m="${m}" data-act="modeSet" data-args='{"m":"${m}"}'>${l}</button>`).join('')}${btn(tr('title.scenarios_amp_weekly_challenge'),'scenarios',{},'sm')}</div>
|
||||
<label class="f" for="langTitle">${tr('common.language')}</label>${langPick('langTitle')}
|
||||
<div class="btns cta" style="margin-top:16px;justify-content:space-between;align-items:center">${btn(sv?tr('common.start_a_new_network'):tr('common.start_building'),'start',{},'big')}${btn(tr('common.how_to_play'),'help',{},'ghost')}${btn(tr('common.import_a_save'),'importPick',{},'ghost sm')}${btn(tr('common.settings'),'settings',{},'ghost sm')}</div><p class="ver">v${APP_VERSION} · <a href="https://github.com/fjaeckel/seriesoftubes" target="_blank" rel="noopener">${tr('title.source_on_github')}</a> · <a href="${SIGNAL}" target="_blank" rel="noopener">${tr('title.chat_on_signal')}</a> · ${tr('title.cookieless_stats_no_tracking')}</p>`);
|
||||
<div class="btns cta tcta" style="margin-top:16px">${btn(sv?tr('common.start_a_new_network'):tr('common.start_building'),'start',{},'big')}${btn(tr('common.how_to_play'),'help',{},'ghost')}${btn(tr('common.import_a_save'),'importPick',{},'ghost')}${btn(tr('common.settings'),'settings',{},'ghost')}</div><p class="ver">v${APP_VERSION} · <a href="https://github.com/fjaeckel/seriesoftubes" target="_blank" rel="noopener">${tr('title.source_on_github')}</a> · <a href="${SIGNAL}" target="_blank" rel="noopener">${tr('title.chat_on_signal')}</a> · ${tr('title.cookieless_stats_no_tracking')}</p>`);
|
||||
$('nmIn').addEventListener('input',e=>{UI.nm=e.target.value;});
|
||||
if(sv){S=migrate(sv);compute();}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,10 @@
|
|||
:root.no-anim .coach-glow{outline:3px solid #FF4F9A}
|
||||
.setline{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0}
|
||||
.setline>span,.setline>label{font-weight:800}
|
||||
/* Title screen: the big start button across the top, the three others below it, all the same size. */
|
||||
.btns.tcta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
|
||||
.btns.tcta .b{margin:0;display:flex;align-items:center;justify-content:center;text-align:center;line-height:1.15;white-space:normal;hyphens:auto;-webkit-hyphens:auto;min-height:40px;padding:4px 6px;font-size:14px}
|
||||
.btns.tcta .b.big{grid-column:1/-1;font-size:18px;padding:7px 18px 5px}
|
||||
/* Dropdowns that look like the game's buttons. 16px text: iOS zooms into anything smaller when it is tapped. */
|
||||
select.pick{-webkit-appearance:none;appearance:none;font:800 16px var(--display);color:var(--ink);background:var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231E2640' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;border:3px solid var(--ink);border-radius:12px;padding:6px 36px 6px 12px;min-height:44px;cursor:pointer;box-shadow:0 3px 0 var(--ink)}
|
||||
select.pick:focus-visible{outline:3px solid #FF4F9A;outline-offset:2px}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue