mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-19 16:20:01 -04:00
Triforce v0.5.2
The new launcher (Windows and Linux: the game's own look, music and settings, saves and mods pages, smaller updates in parts), benchmark mode (Find my best settings: the game tours four places by itself and writes its results), Quit and Restart in the pause menu under Mods, Squadala! in the Mods menu, battle music above 60 fps, menu text, the controller in the menus with the game in the background, the whole GameBanana list, RX 580 and RX 5000/6000 shader fixes, the pipeline cache kept through an update, async present black flashes, and faster builds.
This commit is contained in:
129
launcher/ui/app.css
Normal file
129
launcher/ui/app.css
Normal file
@@ -0,0 +1,129 @@
|
||||
/* The launcher's own additions on top of the approved look (v3.css) and the prototype's interaction styles (proto.css). */
|
||||
|
||||
/* no game read yet: no game art anywhere (the crest stands in on the working screens) */
|
||||
.noart .gamelogo, .noart .rlogo .aura, .noart .rlogo .glowl, .noart .mini .aura, .noart .logo .aura { display: none; }
|
||||
.noart .mini { background: url(img/crest.png) center / 92px no-repeat; }
|
||||
.gamelogo[src=""] { visibility: hidden; }
|
||||
|
||||
/* the bar with nothing to show (benchmark run) */
|
||||
.bar.bare { display: none; }
|
||||
|
||||
/* off buttons: visible, quiet, and they say why when pressed (the launcher sends a toast) */
|
||||
.play.off { filter: grayscale(.85) brightness(.6); cursor: not-allowed; }
|
||||
.row-set.off { opacity: .5; }
|
||||
.row-set.danger b, .row-set.danger em { color: #ff8a92; }
|
||||
|
||||
/* the reveal's choice rows can be 2 or 3 (NVIDIA: DLSS) */
|
||||
.choices { display: grid; gap: 0 40px; }
|
||||
.choices > div.bad b, .choices > div.bad small { color: #ff8a92; }
|
||||
|
||||
/* the working screen */
|
||||
.workfoot { position: absolute; left: 64px; bottom: 26px; font-size: 13.5px; color: var(--text3); }
|
||||
.workfoot .lnk { color: var(--gold); }
|
||||
.workerr { position: absolute; left: 230px; width: 820px; top: 470px; text-align: center; }
|
||||
.workerr p { margin-top: 18px; font-size: 14px; color: var(--text3); } .workerr .lnk { color: var(--gold); }
|
||||
#s-work.failed .center h1 { color: #ffd6d9; }
|
||||
#s-work.failed .nowmusic, #s-work.failed .workfoot { display: none; }
|
||||
.drawer { position: absolute; left: 0; right: 0; bottom: 0; height: 0; overflow: hidden; z-index: 12; background: rgba(8, 7, 6, .97);
|
||||
border-top: 1px solid rgba(224, 178, 62, .4); transition: height .25s ease; }
|
||||
.drawer.open { height: 330px; }
|
||||
.drawer .dhead { display: flex; gap: 22px; align-items: baseline; padding: 14px 64px 8px; font-size: 14px; }
|
||||
.drawer .dhead b { flex: 1; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 19px; color: var(--gold-hi); }
|
||||
.drawer .dhead .lnk { color: var(--gold); cursor: pointer; }
|
||||
.drawer pre { margin: 0 64px; height: 270px; overflow: auto; font: 12.5px/1.45 'Cascadia Mono', Consolas, 'DejaVu Sans Mono', monospace; color: var(--text2); white-space: pre-wrap; }
|
||||
|
||||
/* sheets: lists to choose from and questions */
|
||||
.opts.many { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; max-height: 420px; overflow: auto; }
|
||||
.opts.many .opt:first-of-type, .opts.many .opt:nth-of-type(2) { margin-top: 18px; }
|
||||
.opt.sel > span:last-child::before { content: '\25C6'; color: var(--gold-hi); }
|
||||
.asktext { margin-top: 12px; max-height: 360px; overflow: auto; font-size: 14px; color: var(--text2); line-height: 1.5; }
|
||||
.asktext p + p { margin-top: 8px; }
|
||||
.sheet { width: 600px; }
|
||||
|
||||
/* saves */
|
||||
.sc.empty .p { display: grid; place-items: center; background: rgba(10, 9, 8, .45); }
|
||||
.sc.empty .p span { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 18px; color: var(--text3); }
|
||||
|
||||
/* mods */
|
||||
.modtabs { position: absolute; left: 64px; top: 170px; display: flex; gap: 26px; font-size: 15px; color: var(--text3); }
|
||||
.modtabs span { padding-bottom: 6px; cursor: pointer; } .modtabs span.on { color: var(--gold-hi); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); }
|
||||
.search { left: auto !important; right: 64px; top: 160px !important; width: 360px !important; padding: 0 !important; }
|
||||
.search input { width: 100%; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; }
|
||||
.search input::placeholder { color: var(--text3); }
|
||||
.mods { top: 222px !important; max-height: 500px; overflow-y: auto; align-content: start; }
|
||||
.mods::-webkit-scrollbar { width: 6px; } .mods::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
|
||||
.mod { grid-template-columns: 64px 1fr auto !important; gap: 14px; }
|
||||
.mod .mi { width: 64px; height: 40px; background-size: cover; background-position: center; outline: 1px solid rgba(224, 178, 62, .3); }
|
||||
.mod .mi.none { background: rgba(255, 255, 255, .04); }
|
||||
.mod em.offm { color: var(--text3); }
|
||||
.mod.more b { color: var(--gold); }
|
||||
.modnote { position: absolute; left: 64px; right: 64px; bottom: 26px; font-size: 13.5px; color: var(--text2); }
|
||||
.modnote b { color: var(--gold-hi); }
|
||||
|
||||
/* home with no save yet: no picture, the title alone */
|
||||
#s-home.nopic .frame, #s-home.nopic .glow { display: none; }
|
||||
|
||||
/* in the real window: the bar is the title bar */
|
||||
.bar { app-region: drag; -webkit-app-region: drag; }
|
||||
.bar .nav a, .bar .state, .bar .spk, .bar .wc span { app-region: no-drag; -webkit-app-region: no-drag; }
|
||||
.nochrome .wc { display: none; }
|
||||
.hosted #protonote, .hosted #jump { display: none; }
|
||||
.choices > div > div { min-width: 0; flex: 1; }
|
||||
.choices b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.choices small { display: block; margin: 2px 0 0 !important; }
|
||||
.choices .ch { flex: none; margin-left: 18px; }
|
||||
.found4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 1100px; left: 90px; right: 90px; }
|
||||
.choices label { white-space: nowrap; }
|
||||
.choices > div { padding: 16px 22px; }
|
||||
|
||||
/* settings: a long value (a folder) keeps to its column */
|
||||
.row-set > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
/* mods: a description keeps its paragraphs */
|
||||
.asktext.modesc { white-space: pre-line; }
|
||||
.whatsnew h4 .lnk { font-family: Commissioner, sans-serif; font-style: normal; font-size: 13px; color: var(--gold); margin-left: 4px; }
|
||||
.sheet:has(.opts.many) { width: 720px; }
|
||||
.opts.many .opt { padding: 12px 14px; }
|
||||
.opt > div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
/* a long text in a sheet scrolls with the launcher's own thin bar, not the system's */
|
||||
.asktext::-webkit-scrollbar { width: 6px; } .asktext::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
|
||||
.asktext::-webkit-scrollbar-button { display: none; } .asktext { padding-right: 10px; }
|
||||
/* settings: the list scrolls inside the page (it is longer than the window) */
|
||||
.set { max-height: 572px; overflow-y: auto; padding-right: 14px; }
|
||||
.set::-webkit-scrollbar { width: 6px; } .set::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
|
||||
.opts.grid::-webkit-scrollbar { width: 6px; } .opts.grid::-webkit-scrollbar-thumb { background: rgba(224, 178, 62, .35); }
|
||||
/* (Cormorant's old-style figures read "1" as "ı": lining figures everywhere) */
|
||||
body { font-variant-numeric: lining-nums; }
|
||||
/* Mods: the tabs under the title, not over it */
|
||||
.modtabs { top: 216px !important; }
|
||||
.search { top: 206px !important; }
|
||||
.mods { top: 268px !important; max-height: 470px !important; }
|
||||
.whatsnew p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 440px; }
|
||||
/* benchmark places without a picture of their own: the hall's warm dark, the name carries it */
|
||||
.place.noimg { background: radial-gradient(120% 140% at 30% 0%, #2a2112 0%, #15110b 60%, #0a0908 100%); }
|
||||
.place.noimg::after { background: none; }
|
||||
/* Settings: Launcher and the game's own tabs */
|
||||
.settabs { position: absolute; left: 64px; top: 196px; display: flex; gap: 26px; font-size: 15px; color: var(--text3); }
|
||||
.settabs span { padding-bottom: 6px; cursor: pointer; } .settabs span.on { color: var(--gold-hi); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); }
|
||||
#s-settings .set { top: 246px !important; max-height: 520px !important; overflow-y: auto; padding-right: 12px; }
|
||||
.gnote { font-size: 13px; color: var(--text3); margin: 0 0 4px; }
|
||||
.row-set.gs .slider { width: 260px; }
|
||||
.row-set .gval { min-width: 110px; display: inline-block; }
|
||||
#s-settings .benchcard { top: 246px; }
|
||||
.dot.grey { background: #8a8578; box-shadow: none; }
|
||||
/* benchmark: running, and the results' frame-time lines */
|
||||
.brun .bline { margin-top: 10px; font-size: 18px; color: var(--text); }
|
||||
.brun .bhint { margin-top: 8px; font-size: 14px; color: var(--text2); max-width: 720px; }
|
||||
.place .pg { position: absolute; left: 14px; right: 14px; top: 12px; height: 46px; z-index: 1; }
|
||||
.spark { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
|
||||
.spark polyline { fill: none; stroke: var(--gold); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
|
||||
.spark.b polyline { stroke: var(--emerald); }
|
||||
.spark .l60 { stroke: rgba(243, 234, 213, .25); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
|
||||
.place .vs { font-style: normal; color: var(--emerald); } .place .vs strong { color: var(--emerald); }
|
||||
.place.two { height: 150px; }
|
||||
.place > div.two { display: grid; grid-template-columns: 1fr; gap: 2px; align-items: end; }
|
||||
.place > div.two b { margin-bottom: 4px; }
|
||||
.place > div.two span { display: flex; align-items: baseline; gap: 6px; }
|
||||
.place > div.two span i { font-style: normal; font-size: 12.5px; color: var(--text3); min-width: 96px; }
|
||||
.place.two .pg { height: 40px; }
|
||||
.recs .compare { margin-top: 14px; width: 100%; }
|
||||
.recs .act .qlink { white-space: nowrap; }
|
||||
562
launcher/ui/app.js
Normal file
562
launcher/ui/app.js
Normal file
@@ -0,0 +1,562 @@
|
||||
/* Triforce launcher: the page. It draws, plays the sounds and takes the mouse, keyboard and controller; everything real
|
||||
(reading the game, building, updating, saves, mods, settings) is the launcher's, behind messages:
|
||||
|
||||
page -> launcher {t:'ready'} {t:'win', a:'min'|'max'|'close'} {t:'pick', kind:'file'|'folder'} {t:'drop', files:[file:// on Linux]}
|
||||
{t:'cmd', c:<name>, ...args} (build, stop, retry, play, update, playold, showgame, open, lang, folder, setting,
|
||||
saves.import, saves.export, saves.open, mods.*, bench, benchstop, benchapply,
|
||||
report, sound, workback, ...)
|
||||
launcher -> page {t:'hello', chrome, os} {t:'state', ...parts} {t:'go', s} {t:'check', st, name, msg}
|
||||
{t:'work', ...} {t:'log', lines} {t:'toast', html} {t:'sfx', id} {t:'bench', ...} {t:'max', on}
|
||||
|
||||
Without a launcher (a plain browser) demo.js answers instead, so the design can be looked at anywhere. */
|
||||
'use strict';
|
||||
const $ = (s, r = document) => r.querySelector(s), $$ = (s, r = document) => [...r.querySelectorAll(s)];
|
||||
const esc = s => String(s ?? '').replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c]));
|
||||
|
||||
/* ---------------- the window this page lives in ---------------- */
|
||||
const HOST = window.chrome && window.chrome.webview ? 'win' : (window.external && typeof window.external.sendMessage === 'function' ? 'linux' : null);
|
||||
const hostHandlers = [];
|
||||
function onHost(fn) { hostHandlers.push(fn); }
|
||||
function fromHost(s) { let m; try { m = typeof s === 'string' ? JSON.parse(s) : s; } catch { return; } hostHandlers.forEach(f => { try { f(m); } catch (e) { console.error(e); } }); }
|
||||
function send(o) {
|
||||
const s = JSON.stringify(o);
|
||||
if (HOST === 'win') window.chrome.webview.postMessage(s);
|
||||
else if (HOST === 'linux') window.external.sendMessage(s);
|
||||
else if (window.DEMO) window.DEMO.receive(o, fromHost);
|
||||
}
|
||||
function cmd(c, args) { send(Object.assign({ t: 'cmd', c }, args || {})); }
|
||||
if (HOST === 'win') window.chrome.webview.addEventListener('message', e => fromHost(e.data));
|
||||
else if (HOST === 'linux') window.external.receiveMessage(fromHost);
|
||||
document.documentElement.classList.add(HOST ? 'hosted' : 'browser', 'noart'); // (no game art until the launcher says there is)
|
||||
if (HOST) document.documentElement.classList.add('host-' + HOST);
|
||||
window.addEventListener('error', e => send({ t: 'log', s: 'page error: ' + e.message + ' @' + e.lineno }));
|
||||
|
||||
/* ---------------- fit the 1280x800 design into the window ---------------- */
|
||||
function fit() { const k = Math.min(innerWidth / 1280, innerHeight / 800); $('#fit').style.transform = `translate(-50%,-50%) scale(${k})`; }
|
||||
addEventListener('resize', fit); fit();
|
||||
|
||||
/* ---------------- the launcher's state, as last sent ---------------- */
|
||||
const S = { media: { art: false, music: false, sfx: false }, sound: { music: .4, sfx: .7, muted: false }, files: [], settings: [], mods: { tab: 'browse', items: [] } };
|
||||
|
||||
/* ---------------- sound: the game's own music and menu sounds (only once a game is known) ---------------- */
|
||||
const TRACKS = { saria: "Saria's Song", fairy: 'Fairy Fountain', temple: 'Temple of Time', itemget: 'Item get' };
|
||||
const live = []; // music being played: { el, k, target, rate, name }
|
||||
let curTrack = null, unlocked = !!HOST;
|
||||
addEventListener('pointerdown', () => unlocked = true, true); addEventListener('keydown', () => unlocked = true, true);
|
||||
function music(name, loop = true, fade = 1.4) {
|
||||
if (name && !S.media.music) name = null;
|
||||
if (curTrack === name) return;
|
||||
curTrack = name;
|
||||
for (const m of live) { m.target = 0; m.rate = 1 / fade; }
|
||||
if (name) {
|
||||
const el = new Audio('audio/' + name + '.wav'); el.loop = loop; el.volume = 0;
|
||||
const m = { el, k: 0, target: 1, rate: 1 / fade, name };
|
||||
el.play().catch(() => { m.blocked = true; });
|
||||
if (!loop) el.onended = () => { m.target = 0; m.k = 0; if (curTrack === name) { curTrack = null; afterOneShot(name); } };
|
||||
live.push(m);
|
||||
}
|
||||
nowPlaying();
|
||||
}
|
||||
let lastT = performance.now();
|
||||
function audioTick(t) {
|
||||
const dt = Math.min(.1, (t - lastT) / 1000); lastT = t;
|
||||
const mv = S.sound.muted ? 0 : S.sound.music;
|
||||
for (let i = live.length - 1; i >= 0; i--) {
|
||||
const m = live[i];
|
||||
m.k += Math.sign(m.target - m.k) * Math.min(Math.abs(m.target - m.k), m.rate * dt);
|
||||
m.el.volume = Math.max(0, Math.min(1, m.k * m.k * mv));
|
||||
if (m.k <= 0 && m.target === 0) { m.el.pause(); m.el.removeAttribute('src'); live.splice(i, 1); }
|
||||
else if (m.blocked && unlocked) { m.blocked = false; m.el.play().catch(() => { m.blocked = true; }); }
|
||||
}
|
||||
}
|
||||
const SFX_IDS = ['cursor', 'tab_l', 'tab_r', 'decide', 'decide_l', 'cancel', 'open', 'close', 'success', 'error'];
|
||||
let sfxPool = null, lastCursor = 0;
|
||||
function loadSfx() {
|
||||
if (sfxPool || !S.media.sfx) return;
|
||||
sfxPool = {};
|
||||
SFX_IDS.forEach(n => { sfxPool[n] = { i: 0, a: [0, 1, 2].map(() => { const a = new Audio('audio/' + n + '.wav'); a.preload = 'auto'; return a; }) }; });
|
||||
}
|
||||
function sfx(n) {
|
||||
if (!sfxPool || S.sound.muted || !S.sound.sfx) return;
|
||||
if (n === 'cursor') { const t = performance.now(); if (t - lastCursor < 55) return; lastCursor = t; }
|
||||
const p = sfxPool[n]; if (!p) return;
|
||||
const a = p.a[p.i++ % 3]; a.currentTime = 0; a.volume = S.sound.sfx * (n === 'cursor' ? .8 : 1); a.play().catch(() => {});
|
||||
}
|
||||
function nowPlaying() {
|
||||
$('#nowT').textContent = curTrack ? TRACKS[curTrack] : S.media.music ? 'Nothing playing' : 'Music comes from your game once it is added';
|
||||
$('#nowp').classList.toggle('paused', !curTrack || S.sound.muted);
|
||||
$('#spk').classList.toggle('muted', S.sound.muted);
|
||||
$('#muteB').textContent = S.sound.muted ? 'Unmute (M)' : 'Mute (M)';
|
||||
}
|
||||
let soundSave = 0;
|
||||
function setVol(which, v, quiet) {
|
||||
S.sound[which] = Math.round(Math.max(0, Math.min(1, v)) * 100) / 100;
|
||||
$$(`[data-vol="${which}"]`).forEach(s => { s.querySelector('i').style.width = S.sound[which] * 100 + '%'; s.querySelector('u').style.left = S.sound[which] * 100 + '%'; });
|
||||
$$(`[data-volv="${which}"]`).forEach(s => s.textContent = Math.round(S.sound[which] * 100) + '%');
|
||||
if (!quiet) { clearTimeout(soundSave); soundSave = setTimeout(() => cmd('sound', S.sound), 400); }
|
||||
}
|
||||
function toggleMute() { S.sound.muted = !S.sound.muted; nowPlaying(); if (!S.sound.muted) sfx('decide'); cmd('sound', S.sound); }
|
||||
document.addEventListener('pointerdown', e => {
|
||||
const s = e.target.closest('.slider[data-vol]'); if (!s) return;
|
||||
e.preventDefault(); setFocus(s, true);
|
||||
const which = s.dataset.vol;
|
||||
const move = ev => { const b = s.getBoundingClientRect(); setVol(which, (ev.clientX - b.left) / b.width); };
|
||||
move(e);
|
||||
const up = () => { removeEventListener('pointermove', move); removeEventListener('pointerup', up); if (which === 'sfx') sfx('cursor'); };
|
||||
addEventListener('pointermove', move); addEventListener('pointerup', up);
|
||||
});
|
||||
|
||||
/* ---------------- screens ---------------- */
|
||||
const MAIN = ['home', 'mods', 'saves', 'settings'];
|
||||
const FIRST_RUN = ['welcome', 'reveal', 'done'];
|
||||
const MUSIC = { welcome: null, reveal: 'saria', work: 'temple', done: 'itemget', home: 'fairy', saves: 'fairy', mods: 'fairy', settings: 'fairy', bench: 'fairy', brun: null, playing: null };
|
||||
let screen = null;
|
||||
function go(name) {
|
||||
if (name === screen || !$('#s-' + name)) return;
|
||||
closeSheet(true); closeVol(true);
|
||||
screen = name;
|
||||
$$('.screen').forEach(s => s.classList.toggle('on', s.id === 's-' + name));
|
||||
const busy = FIRST_RUN.includes(name) || name === 'work' || name === 'brun' || name === 'playing';
|
||||
$('#win').classList.toggle('hidebits', busy);
|
||||
$('#bar').classList.toggle('bare', name === 'brun');
|
||||
const tab = $('#s-' + name).dataset.tab;
|
||||
$$('#nav a').forEach((a, i) => a.classList.toggle('on', String(i) === tab));
|
||||
const m = MUSIC[name];
|
||||
if (name === 'done') music('itemget', false, .3);
|
||||
else if (!(m === 'fairy' && curTrack === 'itemget')) music(m, true, name === 'playing' || name === 'brun' ? 2.2 : 1.4);
|
||||
setFocus($('#' + $('#s-' + name).dataset.first) || focusables()[0], false);
|
||||
if (name === 'mods' && !S.mods.loaded) cmd('mods.list', { tab: S.mods.tab, q: '' });
|
||||
if (name === 'saves') cmd('saves.list');
|
||||
cmd('screen', { s: name });
|
||||
}
|
||||
function afterOneShot(name) { if (name === 'itemget' && (MUSIC[screen] === 'fairy' || screen === 'done')) music('fairy'); }
|
||||
|
||||
/* ---------------- focus: mouse, keyboard and controller share one focus ---------------- */
|
||||
let focused = null;
|
||||
function visible(el) { return !!(el.offsetParent || el.getClientRects().length) && getComputedStyle(el).visibility !== 'hidden'; }
|
||||
function focusables() {
|
||||
if ($('#sheetBg').classList.contains('open')) return $$('[data-f]', $('#sheet')).filter(visible);
|
||||
if ($('#vol').classList.contains('open')) return $$('[data-f]', $('#vol')).concat($('#spk'));
|
||||
const out = $$('[data-f]', $('#s-' + screen)).filter(visible);
|
||||
if (!$('#bar').classList.contains('bare')) out.push(...$$('[data-f]', $('#bar')).filter(visible));
|
||||
return out;
|
||||
}
|
||||
function setFocus(el, sound) {
|
||||
if (!el || el === focused) return;
|
||||
if (focused) focused.classList.remove('kf');
|
||||
focused = el; el.classList.add('kf');
|
||||
if (el.tagName === 'INPUT') el.focus(); else if (document.activeElement && document.activeElement.tagName === 'INPUT') document.activeElement.blur();
|
||||
if (document.body.classList.contains('kb')) el.scrollIntoView({ block: 'nearest' });
|
||||
if (sound) sfx('cursor');
|
||||
}
|
||||
function move(dx, dy) {
|
||||
const list = focusables(); if (!list.length) return;
|
||||
if (!focused || !list.includes(focused)) return setFocus(list[0], true);
|
||||
const a = focused.getBoundingClientRect(), ax = a.left + a.width / 2, ay = a.top + a.height / 2;
|
||||
let best = null, bs = 1e9;
|
||||
for (const el of list) {
|
||||
if (el === focused) continue;
|
||||
const b = el.getBoundingClientRect(), bx = b.left + b.width / 2, by = b.top + b.height / 2;
|
||||
const p = dx ? (bx - ax) * dx : (by - ay) * dy;
|
||||
const edge = dx ? (dx > 0 ? b.left - a.right : a.left - b.right) : (dy > 0 ? b.top - a.bottom : a.top - b.bottom);
|
||||
if (p <= 4 && edge < -2) continue;
|
||||
const s = Math.max(0, edge) + Math.abs(dx ? by - ay : bx - ax) * 2.2 + (p <= 4 ? 1e5 : 0);
|
||||
if (s < bs) { bs = s; best = el; }
|
||||
}
|
||||
if (best) setFocus(best, true);
|
||||
}
|
||||
document.addEventListener('mouseover', e => { const el = e.target.closest('[data-f]'); if (el && focusables().includes(el)) setFocus(el, true); });
|
||||
document.addEventListener('mousemove', () => document.body.classList.remove('kb'));
|
||||
|
||||
/* ---------------- actions ---------------- */
|
||||
function activate(el) {
|
||||
if (!el) return;
|
||||
if (el.tagName === 'INPUT') { el.focus(); return; }
|
||||
if (el.dataset.go) { if (el.dataset.go !== screen) { sfx('decide'); go(el.dataset.go); } return; }
|
||||
const act = el.dataset.act; if (!act) return;
|
||||
const i = act.indexOf(':'), verb = i < 0 ? act : act.slice(0, i), arg = i < 0 ? '' : act.slice(i + 1);
|
||||
if (el.classList.contains('off')) { sfx('error'); return; }
|
||||
if (!['vol', 'mute', 'win'].includes(verb)) sfx(el.dataset.big !== undefined ? 'decide_l' : el.hasAttribute('data-back-sound') ? 'cancel' : 'decide');
|
||||
const A = ACTIONS[verb];
|
||||
if (A) A(arg, el); else cmd(verb, arg ? { arg } : undefined); // anything the page does not know itself is the launcher's
|
||||
}
|
||||
document.addEventListener('click', e => {
|
||||
const j = e.target.closest('[data-j]'); if (j) return jump(j.dataset.j);
|
||||
if (e.target.closest('#jumpBtn')) return toggleJump();
|
||||
if (e.target === $('#sheetBg')) return closeSheet();
|
||||
if (!e.target.closest('#vol') && !e.target.closest('#spk') && $('#vol').classList.contains('open')) closeVol();
|
||||
const el = e.target.closest('[data-act],[data-go]'); if (el) activate(el);
|
||||
});
|
||||
function back() {
|
||||
if ($('#jump').classList.contains('open')) return toggleJump();
|
||||
if ($('#drawer').classList.contains('open')) return ACTIONS.details();
|
||||
if ($('#sheetBg').classList.contains('open')) return closeSheet();
|
||||
if ($('#vol').classList.contains('open')) return closeVol();
|
||||
const b = $('#s-' + screen).dataset.back; if (!b) return;
|
||||
sfx('cancel');
|
||||
if (ACTIONS[b]) return ACTIONS[b]();
|
||||
if (b === 'welcome') cmd('forget'); // back from the reveal: choose another file
|
||||
go(b);
|
||||
}
|
||||
function tab(d) {
|
||||
if (!MAIN.includes(screen) && screen !== 'bench') return;
|
||||
const i = MAIN.indexOf(screen === 'bench' ? 'settings' : screen);
|
||||
sfx(d < 0 ? 'tab_l' : 'tab_r'); go(MAIN[(i + d + 4) % 4]);
|
||||
}
|
||||
let toastT = 0;
|
||||
function toast(html) {
|
||||
const h = $('#toastHost'); h.innerHTML = `<div class="toast">${html}</div>`;
|
||||
clearTimeout(toastT); toastT = setTimeout(() => h.innerHTML = '', 3600);
|
||||
}
|
||||
|
||||
const ACTIONS = {
|
||||
go: s => go(s),
|
||||
win: a => send({ t: 'win', a }),
|
||||
pick: kind => send({ t: 'pick', kind }),
|
||||
vol: () => $('#vol').classList.contains('open') ? closeVol() : openVol(),
|
||||
mute: () => toggleMute(),
|
||||
closesheet: () => closeSheet(),
|
||||
details: () => { const d = $('#drawer'); d.classList.toggle('open'); if (d.classList.contains('open')) { const p = $('#drawerLog'); p.scrollTop = p.scrollHeight; } },
|
||||
stop: () => openSheet(`<h3>${esc(S.work && S.work.stopTitle || 'Stop?')}</h3><p>${esc(S.work && S.work.stopText || '')}</p>` +
|
||||
'<div class="acts"><span class="qlink" data-f data-act="closesheet" id="sh1">Keep going</span><div class="play sm" style="width:200px" data-f data-act="dostop">Stop</div></div>', 'sh1'),
|
||||
dostop: () => { closeSheet(true); cmd('stop'); },
|
||||
workback: () => { cmd('workback'); },
|
||||
modtab: t => { S.mods.tab = t; drawModTabs(); cmd('mods.list', { tab: t, q: $('#modQ').value }); },
|
||||
mod: (id) => openModSheet(id),
|
||||
sc: (i) => openSaveSheet(+i),
|
||||
file: (i) => { S.cur = +i; drawHome(); },
|
||||
bringin: () => openSaveFlow('import'),
|
||||
copyout: () => openSaveFlow('export'),
|
||||
opt: (a, el) => { $$('.opt', el.parentElement).forEach(o => o.classList.toggle('sel', o === el)); },
|
||||
row: (id) => settingRow(id),
|
||||
choose: (id) => cmd('choose', { id }),
|
||||
};
|
||||
|
||||
/* ---------------- sheets and the sound panel ---------------- */
|
||||
let sheetReturn = null;
|
||||
function openSheet(html, first) {
|
||||
sheetReturn = focused; $('#sheet').innerHTML = html; $('#sheetBg').classList.add('open'); sfx('open');
|
||||
focused = null; setFocus($('#' + first) || $('[data-f]', $('#sheet')));
|
||||
}
|
||||
function closeSheet(quiet) {
|
||||
if (!$('#sheetBg').classList.contains('open')) return;
|
||||
$('#sheetBg').classList.remove('open'); if (!quiet) sfx('close');
|
||||
if (sheetReturn && document.contains(sheetReturn) && visible(sheetReturn)) { focused = null; setFocus(sheetReturn); }
|
||||
}
|
||||
function openVol() { $('#vol').classList.add('open'); sfx('open'); setFocus($('[data-vol="music"]')); }
|
||||
function closeVol(quiet) { if (!$('#vol').classList.contains('open')) return; $('#vol').classList.remove('open'); if (!quiet) sfx('close'); setFocus($('#spk')); }
|
||||
/* A list to choose one from (languages, folders, emulators): the launcher sends it, the choice goes back with its id. */
|
||||
function openChoice(m) {
|
||||
const opts = (m.options || []).map((o, i) => `<div class="opt${o.sel ? ' sel' : ''}" data-f data-act="opt" data-id="${esc(o.id)}" id="op${i}"><div><b>${esc(o.name)}</b>${o.sub ? `<span> · ${esc(o.sub)}</span>` : ''}</div><span></span></div>`).join('');
|
||||
openSheet(`<h3>${esc(m.title)}</h3>${m.text ? `<p>${m.text}</p>` : ''}<div class="opts${m.options && m.options.length > 6 ? ' many' : ''}">${opts}</div>` +
|
||||
`<div class="acts"><span class="qlink" data-f data-act="closesheet" data-back-sound>Cancel</span><div class="play sm" style="width:220px" data-f id="choiceOk">${esc(m.ok || 'Choose')}</div></div>`,
|
||||
'op' + Math.max(0, (m.options || []).findIndex(o => o.sel)));
|
||||
$('#choiceOk').onclick = () => { const s = $('.opt.sel', $('#sheet')); closeSheet(true); if (s) cmd(m.reply, { id: s.dataset.id, ctx: m.ctx }); };
|
||||
$('#choiceOk').dataset.act = 'noop';
|
||||
}
|
||||
ACTIONS.noop = () => {};
|
||||
/* A question with buttons (the DLSS licence, uninstall, a replace warning): each button's id goes back. */
|
||||
function openAsk(m) {
|
||||
const btns = (m.buttons || []).map((b, i) => b.main ? `<div class="play sm" style="width:${b.w || 220}px" data-f data-act="answer:${esc(b.id)}" id="ab${i}">${esc(b.label)}</div>`
|
||||
: `<span class="qlink" data-f data-act="answer:${esc(b.id)}" id="ab${i}">${esc(b.label)}</span>`).join('');
|
||||
openSheet(`<h3>${esc(m.title)}</h3><div class="asktext">${m.html || ''}</div><div class="acts">${btns}</div>`, 'ab0');
|
||||
S.ask = m;
|
||||
}
|
||||
ACTIONS.answer = (id) => { closeSheet(true); cmd(S.ask.reply, { id, ctx: S.ask.ctx }); };
|
||||
|
||||
/* ---------------- first run ---------------- */
|
||||
const portal = $('#portal');
|
||||
['dragenter', 'dragover'].forEach(t => document.addEventListener(t, e => { e.preventDefault(); if (screen === 'welcome') portal.classList.add('hot'); }));
|
||||
document.addEventListener('dragleave', e => { if (!e.relatedTarget) portal.classList.remove('hot'); });
|
||||
document.addEventListener('drop', e => {
|
||||
e.preventDefault(); portal.classList.remove('hot'); unlocked = true;
|
||||
const dt = e.dataTransfer, files = [...dt.files];
|
||||
if (!files.length && !dt.getData('text/uri-list')) return;
|
||||
const uris = (dt.getData('text/uri-list') || '').split(/\r?\n/).filter(u => u.startsWith('file://'));
|
||||
const msg = { t: 'drop', screen, names: files.map(f => f.name), files: uris };
|
||||
if (HOST === 'win' && window.chrome.webview.postMessageWithAdditionalObjects) window.chrome.webview.postMessageWithAdditionalObjects(JSON.stringify(msg), dt.files);
|
||||
else send(msg);
|
||||
});
|
||||
function onCheck(m) {
|
||||
portal.classList.toggle('checking', m.st === 'checking'); portal.classList.toggle('bad', m.st === 'bad');
|
||||
$('#portalH').textContent = m.st === 'checking' ? 'Checking your game' : m.st === 'bad' ? (m.title || "That isn't your game") : 'Drop your game here';
|
||||
$('#portalP').textContent = m.st === 'idle' ? 'Your .nup file, or the folder with romfs and exefs in it' : (m.msg || m.name || '');
|
||||
if (m.st === 'bad') sfx('error');
|
||||
}
|
||||
function drawReveal() {
|
||||
const r = S.reveal; if (!r) return;
|
||||
$('#found').innerHTML = r.found || '';
|
||||
$('#choices').innerHTML = (r.rows || []).map(x => `<div class="${x.bad ? 'bad' : ''}"><div><label>${esc(x.label)}</label><b>${esc(x.value)}</b>${x.small ? `<small>${esc(x.small)}</small>` : ''}</div>` +
|
||||
(x.act ? `<span class="ch" data-f data-act="choose:${esc(x.act)}">${esc(x.actLabel || 'Change')}</span>` : '') + '</div>').join('');
|
||||
$('#choices').style.gridTemplateColumns = ({ 1: '1fr', 2: '1fr 1.6fr', 3: '0.9fr 2fr 1fr' })[(r.rows || []).length] || 'repeat(4, 1fr)';
|
||||
$('#under').innerHTML = (r.under ? esc(r.under) + ' · ' : '') + '<span class="lnk" style="color:var(--gold)" data-f data-act="go:welcome" data-back-sound>Choose another file</span>';
|
||||
$('#buildBtn').classList.toggle('off', !r.canBuild);
|
||||
$('#buildBtn').textContent = r.button || 'Build the game';
|
||||
}
|
||||
|
||||
/* ---------------- the working screen: build, update, tools ---------------- */
|
||||
function drawWork(w) {
|
||||
S.work = w = Object.assign(S.work || {}, w);
|
||||
$('#workEb').textContent = w.eb || ''; $('#workTitle').textContent = w.title || ''; $('#workLead').textContent = w.lead || '';
|
||||
$('#workPath').innerHTML = (w.path || []).map(p => `<span class="${p.st || ''}"><i></i>${esc(p.name)}</span>`).join('');
|
||||
$('#workPath').style.display = w.path && w.path.length ? '' : 'none';
|
||||
const f = Math.max(0, Math.min(1, w.frac || 0));
|
||||
$('#workBar').style.width = f * 100 + '%'; $('#workKnob').style.left = f * 100 + '%';
|
||||
const prev = S.workStepsDone || 0, done = (w.steps || []).filter(s => s.st === 'd').length;
|
||||
$('#workSteps').innerHTML = (w.steps || []).map(s => `<div class="${s.st || ''}"><em></em><b>${esc(s.name)}</b><span>${esc(s.right || '')}</span></div>`).join('');
|
||||
if (done > prev && screen === 'work') sfx('success');
|
||||
S.workStepsDone = done;
|
||||
const err = !!w.error;
|
||||
$('#s-work').classList.toggle('failed', err);
|
||||
$('#workErr').style.display = err ? '' : 'none';
|
||||
$('#workBody').style.display = err ? 'none' : '';
|
||||
$('#workRetry').textContent = w.retry || 'Try again';
|
||||
$('#workNote').textContent = w.note || '';
|
||||
$('#workStopWrap').style.display = w.canStop && !err ? '' : 'none';
|
||||
if (err && !S.workErrShown) { sfx('error'); S.workErrShown = true; setFocus($('#workRetry')); }
|
||||
if (!err) S.workErrShown = false;
|
||||
}
|
||||
function addLog(lines) {
|
||||
const p = $('#drawerLog'); const at = p.scrollTop + p.clientHeight >= p.scrollHeight - 4;
|
||||
p.textContent += lines.join('\n') + '\n';
|
||||
if (p.textContent.length > 200000) p.textContent = p.textContent.slice(-150000);
|
||||
if (at) p.scrollTop = p.scrollHeight;
|
||||
}
|
||||
|
||||
/* ---------------- home ---------------- */
|
||||
function picUrl(f) { return f && f.pic ? `url("${f.pic}")` : 'none'; }
|
||||
function drawHome() {
|
||||
const h = S.home; if (!h) return;
|
||||
const files = S.files || [];
|
||||
if (S.cur == null || S.cur >= files.length) S.cur = Math.max(0, files.findIndex(f => f.last));
|
||||
const f = files[S.cur];
|
||||
const showFile = f && h.mode === 'ready';
|
||||
$('#hEb').textContent = showFile ? 'Continue · ' + f.label : h.eb;
|
||||
$('#hH1').textContent = showFile ? (f.place || h.title) : h.title;
|
||||
$('#hMeta').textContent = showFile ? f.meta : h.meta;
|
||||
$('#playBtn').textContent = h.button || 'Play';
|
||||
$('#playBtn').dataset.act = h.act || 'play';
|
||||
$('#playBtn').classList.toggle('off', !!h.off);
|
||||
$('#hLinks').innerHTML = (h.links || []).map(l => l.act ? `<span class="lnk" data-f data-act="${esc(l.act)}">${l.html}</span>` : `<span>${l.html}</span>`).join('');
|
||||
const url = picUrl(f);
|
||||
['#homeImg', '#homePic', '#savesImg', '#modsImg', '#setImg', '#playImg', '#benchImg'].forEach(s => $(s).style.backgroundImage = url);
|
||||
$('#s-home').classList.toggle('nopic', !f);
|
||||
$('#hCap').textContent = f ? `${f.label} · ${f.last ? 'your last save · ' : ''}picture from the game` : '';
|
||||
$('#strip').innerHTML = files.map((x, i) => `<div class="f${i === S.cur ? ' on' : ''}" data-f data-act="file:${i}" id="f${i}"><img src="${esc(x.pic)}" alt=""><small>${esc(x.label)}</small></div>`).join('');
|
||||
$('.files').style.display = files.length ? '' : 'none';
|
||||
const n = h.news;
|
||||
$('#whatsnew').innerHTML = n ? `<h4>${esc(n.title)}${n.more && h.mode !== 'update' ? ' · <span class="lnk" data-f data-act="open:changes">All changes</span>' : ''}</h4>` + n.items.map(i => `<p><b>${esc(i.b)}</b> ${esc(i.p)}</p>`).join('') : '';
|
||||
}
|
||||
function drawPill() {
|
||||
const p = S.pill || {};
|
||||
$('#pill').innerHTML = p.text ? `<i class="dot ${esc(p.dot || '')}"></i><span>${esc(p.text)}</span>` : '';
|
||||
$('#pill').style.display = p.text ? '' : 'none';
|
||||
if (p.act) { $('#pill').dataset.act = p.act; $('#pill').setAttribute('data-f', ''); } else { delete $('#pill').dataset.act; $('#pill').removeAttribute('data-f'); }
|
||||
}
|
||||
|
||||
/* ---------------- saves ---------------- */
|
||||
function drawSaves() {
|
||||
const s = S.saves || { items: [] };
|
||||
$('#savesEb').textContent = s.eb || '';
|
||||
$('#foundSaves').textContent = s.found || 'From an emulator on this PC, or a folder.';
|
||||
$('#sgrid').innerHTML = s.items.map((f, i) => f.empty
|
||||
? `<div class="sc empty" data-f data-act="sc:${i}" id="sc${i}"><div class="p"><span>Empty</span></div><div class="t"><b>${esc(f.label)}</b></div></div>`
|
||||
: `<div class="sc${f.last ? ' on' : ''}" data-f data-act="sc:${i}" id="sc${i}">${f.place ? `<div class="n">${esc(f.label)}</div>` : ''}<div class="p" style="background-image:url('${esc(f.pic)}')"></div>` +
|
||||
`<div class="t"><b>${esc(f.place || f.label)}</b><span>${esc(f.when)}</span></div><div class="m">${esc(f.time || '')}</div></div>`).join('');
|
||||
}
|
||||
function openSaveSheet(i) {
|
||||
const f = (S.saves || {}).items[i]; if (!f || f.empty) return;
|
||||
openSheet(`<h3>${esc(f.label)}${f.place ? ' · ' + esc(f.place) : ''}</h3><p>${esc(f.meta || '')}</p>` +
|
||||
`<div class="acts"><span class="qlink" data-f data-act="closesheet">Close</span><span class="qlink" data-f data-act="saves.open">Open the folder</span>` +
|
||||
`<div class="play sm" style="width:240px" data-f data-act="playslot:${f.slot}" id="sh1">Play</div></div>`, 'sh1');
|
||||
}
|
||||
ACTIONS.playslot = (slot) => { closeSheet(true); cmd('play', { slot: +slot }); };
|
||||
function openSaveFlow(kind) { cmd(kind === 'import' ? 'saves.import' : 'saves.export'); }
|
||||
$$('[data-act="open:backups"]').forEach(e => e.dataset.act = 'saves.backups'); // (the backups folder is the Saves page's own command)
|
||||
|
||||
/* ---------------- mods ---------------- */
|
||||
function drawModTabs() { $$('#modTabs span').forEach(s => s.classList.toggle('on', s.dataset.act === 'modtab:' + S.mods.tab)); $('#modSearch').style.display = S.mods.tab === 'browse' ? '' : 'none'; }
|
||||
function drawMods() {
|
||||
drawModTabs();
|
||||
const m = S.mods;
|
||||
const L = { get: '<em>Install</em>', busy: '<em>Working…</em>', on: '<em class="inst">◆ On</em>', off: '<em class="offm">Off</em>', update: '<em>Update</em>', kit: '<em>Install and start</em>', start: '<em class="inst">Start</em>' };
|
||||
$('#mods').innerHTML = m.items.map((x, i) => `<div class="mod" data-f data-act="mod:${i}" id="mod${i}">${x.img ? `<div class="mi" style="background-image:url('${esc(x.img)}')"></div>` : '<div class="mi none"></div>'}` +
|
||||
`<div><b>${esc(x.name)}</b><span>${esc(x.sub || '')}</span></div>${L[x.state] || ''}</div>`).join('') +
|
||||
(m.more ? `<div class="mod more" data-f data-act="mods.more" id="modMore"><div></div><div><b>More</b><span>Load the next page</span></div></div>` : '');
|
||||
$('#modNote').innerHTML = m.note || '';
|
||||
}
|
||||
function openModSheet(i) {
|
||||
const x = S.mods.items[i]; if (!x) return;
|
||||
const main = { get: 'Install', update: 'Update', kit: 'Install and start', start: 'Start', on: 'Turn off', off: 'Turn on' }[x.state];
|
||||
openSheet(`<h3>${esc(x.name)}</h3><p>${esc(x.sub || '')}</p>${x.desc ? `<div class="asktext modesc">${esc(x.desc)}</div>` : ''}` +
|
||||
`<div class="acts"><span class="qlink" data-f data-act="closesheet">Close</span>` + (x.page ? `<span class="qlink" data-f data-act="modgo:page:${i}">Its page</span>` : '') +
|
||||
(x.removable ? `<span class="qlink" data-f data-act="modgo:remove:${i}">Remove</span>` : '') +
|
||||
(main ? `<div class="play sm" style="width:240px" data-f data-act="modgo:main:${i}" id="sh1">${main}</div>` : '') + '</div>', 'sh1');
|
||||
}
|
||||
ACTIONS.modgo = (a) => { const [what, i] = a.split(':'); const x = S.mods.items[+i]; closeSheet(true); cmd('mods.' + what, { id: x.id, tab: S.mods.tab }); };
|
||||
let qT = 0;
|
||||
$('#modQ').addEventListener('input', () => { clearTimeout(qT); qT = setTimeout(() => cmd('mods.list', { tab: 'browse', q: $('#modQ').value }), 350); });
|
||||
$('#modQ').addEventListener('keydown', e => { if (e.key === 'Enter' || e.key === 'ArrowDown' || e.key === 'Escape') { e.preventDefault(); $('#modQ').blur(); move(0, 1); } e.stopPropagation(); });
|
||||
|
||||
/* ---------------- settings: a list the launcher sends, and the game's own Options menu in tabs ---------------- */
|
||||
S.settab = 'launcher';
|
||||
function launcherRows() {
|
||||
return (S.settings || []).map(r => r.h ? `<h4>${esc(r.h)}</h4>` : r.kind === 'slider' ?
|
||||
`<div class="row-set" style="cursor:default"><b>${esc(r.label)}</b><div class="rng"><div class="slider" data-f data-vol="${esc(r.id)}" id="row-${esc(r.id)}"><i></i><u></u></div><span data-volv="${esc(r.id)}"></span></div><em></em></div>` :
|
||||
`<div class="row-set${r.danger ? ' danger' : ''}${r.off ? ' off' : ''}" data-f data-act="row:${esc(r.id)}" id="row-${esc(r.id)}"><b>${esc(r.label)}</b><span>${esc(r.value || '')}</span><em>${esc(r.actLabel || 'Change')}</em></div>`).join('');
|
||||
}
|
||||
function gameRows(tab) {
|
||||
const g = S.gameopts; if (!g || !g.data || !g.data[tab]) return '';
|
||||
const lock = g.locked ? ' off' : '';
|
||||
return `<p class="gnote">${esc(g.note || '')}</p>` + g.data[tab].map(sec => `<h4>${esc(sec.h)}</h4>` + sec.rows.map(r => r.kind === 'slider'
|
||||
? `<div class="row-set gs${lock}" style="cursor:default" title="${esc(r.help || '')}"><b>${esc(r.label)}</b><div class="rng"><div class="slider" data-f data-gkey="${esc(r.key)}" data-lo="${r.lo}" data-hi="${r.hi}" data-step="${r.step}" data-v="${r.v}" id="g-${esc(r.key)}"><i style="width:${pct(r)}%"></i><u style="left:${pct(r)}%"></u></div><span class="gval">${esc(r.value)}</span></div><em></em></div>`
|
||||
: `<div class="row-set${lock}" data-f data-act="gopt:${esc(r.key)}" id="g-${esc(r.key)}" title="${esc(r.help || '')}"><b>${esc(r.label)}</b><span>${esc(r.value)}</span><em>Change</em></div>`).join('')).join('');
|
||||
}
|
||||
function pct(r) { return r.hi > r.lo ? Math.round((r.v - r.lo) / (r.hi - r.lo) * 1000) / 10 : 0; }
|
||||
function drawSettings() {
|
||||
const tabs = [{ id: 'launcher', name: 'Launcher' }].concat(S.gameopts && S.gameopts.tabs || []);
|
||||
if (!tabs.some(t => t.id === S.settab)) S.settab = 'launcher';
|
||||
const keep = focused && focused.id;
|
||||
$('#setTabs').innerHTML = tabs.map(t => `<span data-f data-act="settab:${t.id}" id="st-${t.id}" class="${t.id === S.settab ? 'on' : ''}">${esc(t.name)}</span>`).join('');
|
||||
$('#set').innerHTML = S.settab === 'launcher' ? launcherRows() : gameRows(S.settab);
|
||||
$('#s-settings').dataset.first = 'st-' + S.settab;
|
||||
setVol('music', S.sound.music, true); setVol('sfx', S.sound.sfx, true);
|
||||
$('#benchCard').style.display = S.bench && S.bench.available && (S.settab === 'launcher' || S.settab === 'graphics') ? '' : 'none';
|
||||
$('#benchGo').classList.toggle('off', !(S.bench && S.bench.ready));
|
||||
$('#benchLast').textContent = S.bench && S.bench.last || '';
|
||||
if (keep && $('#' + keep) && screen === 'settings') { focused = null; setFocus($('#' + keep)); }
|
||||
}
|
||||
ACTIONS.settab = (t) => { S.settab = t; drawSettings(); $('#set').scrollTop = 0; setFocus($('#st-' + t)); };
|
||||
ACTIONS.gopt = (key) => cmd('gopt.choose', { key });
|
||||
/* the game's sliders: drag, or left / right while focused; the value goes to the launcher when let go */
|
||||
function gStep(el, v) {
|
||||
const lo = +el.dataset.lo, hi = +el.dataset.hi, st = +el.dataset.step || 1;
|
||||
v = Math.max(lo, Math.min(hi, lo + Math.round((v - lo) / st) * st));
|
||||
el.dataset.v = v; const p = hi > lo ? (v - lo) / (hi - lo) * 100 : 0;
|
||||
el.querySelector('i').style.width = p + '%'; el.querySelector('u').style.left = p + '%';
|
||||
const lab = el.parentElement.querySelector('.gval'); if (lab) lab.textContent = String(v);
|
||||
return v;
|
||||
}
|
||||
let gSendT = 0;
|
||||
function gSend(el) { clearTimeout(gSendT); gSendT = setTimeout(() => cmd('gopt.value', { key: el.dataset.gkey, value: +el.dataset.v }), 350); }
|
||||
document.addEventListener('pointerdown', e => {
|
||||
const s = e.target.closest('.slider[data-gkey]'); if (!s || s.closest('.off')) return;
|
||||
e.preventDefault(); setFocus(s, true);
|
||||
const mv = ev => { const b = s.getBoundingClientRect(); gStep(s, +s.dataset.lo + (ev.clientX - b.left) / b.width * (+s.dataset.hi - +s.dataset.lo)); };
|
||||
mv(e);
|
||||
const up = () => { removeEventListener('pointermove', mv); removeEventListener('pointerup', up); sfx('cursor'); gSend(s); };
|
||||
addEventListener('pointermove', mv); addEventListener('pointerup', up);
|
||||
});
|
||||
function gNudge(d) { if (!focused || !focused.dataset.gkey || focused.closest('.off')) return false; gStep(focused, +focused.dataset.v + d * (+focused.dataset.step || 1)); sfx('cursor'); gSend(focused); return true; }
|
||||
function settingRow(id) { cmd('setting', { id }); }
|
||||
// (the list is asked for each time the page opens, so it shows what is true now: Steam, shortcuts, the game folder)
|
||||
new MutationObserver(() => { if ($('#s-settings').classList.contains('on')) cmd('settings.list'); }).observe($('#s-settings'), { attributes: true, attributeFilter: ['class'] });
|
||||
|
||||
/* ---------------- benchmark ---------------- */
|
||||
/* a scene's frame times (ms) as a small line: higher = slower, the 16.7 ms line (60 fps) dashed */
|
||||
function sparkline(pts, cls) {
|
||||
if (!pts || pts.length < 2) return '';
|
||||
const max = Math.max(20, ...pts) * 1.1, w = 300, h = 46;
|
||||
const d = pts.map((v, i) => `${(i / (pts.length - 1) * w).toFixed(1)},${(h - v / max * h).toFixed(1)}`).join(' ');
|
||||
const y60 = (h - 16.7 / max * h).toFixed(1);
|
||||
return `<svg class="spark ${cls || ''}" viewBox="0 0 ${w} ${h}" preserveAspectRatio="none"><line x1="0" x2="${w}" y1="${y60}" y2="${y60}" class="l60"/><polyline points="${d}"/></svg>`;
|
||||
}
|
||||
function onBench(b) {
|
||||
if (b.phase === 'run') {
|
||||
if (screen !== 'brun') go('brun');
|
||||
if (b.place) { $('#bPlace').style.backgroundImage = b.place.img ? `url("${b.place.img}")` : 'none'; $('#bName').textContent = b.place.name; }
|
||||
$('#bPass').textContent = b.pass || ''; $('#bLine').textContent = b.line || '';
|
||||
$('#bProg').style.width = Math.min(100, (b.frac || 0) * 100) + '%';
|
||||
} else if (b.phase === 'done') {
|
||||
$('#benchEb').textContent = b.eb || '';
|
||||
$('#places').innerHTML = (b.places || []).map(p => `<div class="place noimg${p.fps2 != null ? ' two' : ''}"><div class="pg">${sparkline(p.graph)}${p.graph2 ? sparkline(p.graph2, 'b') : ''}</div>` +
|
||||
(p.fps2 != null
|
||||
? `<div class="two"><b>${esc(p.name)}</b><span><i>Your settings</i><strong>${p.fps}</strong> fps · low ${p.low}</span><span class="vs"><i>${esc(b.second || '')}</i><strong>${p.fps2}</strong> fps · low ${p.low2}</span></div></div>`
|
||||
: `<div><b>${esc(p.name)}</b><span><strong>${p.fps}</strong> fps · low ${p.low}</span></div></div>`)).join('');
|
||||
$('#verdict').innerHTML = b.verdict || '';
|
||||
$('#recs').innerHTML = (b.recs || []).map(r => `<div class="rec${r.same ? ' same' : ''}"><b>${esc(r.name)}</b><s>${esc(r.from)}</s><em>→</em><strong>${esc(r.to)}</strong></div>`).join('');
|
||||
const c = $('#compareBtn'); c.textContent = b.compare || ''; c.style.display = b.compare ? '' : 'none';
|
||||
$('#applyBtn').classList.toggle('off', !b.apply);
|
||||
$('#applyBtn').textContent = b.apply ? 'Apply' : 'Nothing to change';
|
||||
sfx('success'); go('bench');
|
||||
} else if (b.phase === 'stopped') go('settings');
|
||||
}
|
||||
|
||||
/* ---------------- messages from the launcher ---------------- */
|
||||
onHost(m => {
|
||||
switch (m.t) {
|
||||
case 'hello': document.documentElement.classList.toggle('nochrome', !m.chrome); break;
|
||||
case 'max': document.documentElement.classList.toggle('maxed', m.on); break;
|
||||
case 'state': {
|
||||
const had = { music: S.media.music, sfx: S.media.sfx };
|
||||
for (const k in m) if (k !== 't') S[k] = m[k];
|
||||
if (m.sound) { setVol('music', S.sound.music, true); setVol('sfx', S.sound.sfx, true); }
|
||||
if (m.media) {
|
||||
document.documentElement.classList.toggle('noart', !S.media.art);
|
||||
if (S.media.art) $$('.gamelogo').forEach(i => { if (!i.complete || !i.naturalWidth) i.src = 'img/game/Logo_USEU_00.png?' + (S.media.v || ''); });
|
||||
loadSfx();
|
||||
if (!had.music && S.media.music && screen) { const want = MUSIC[screen]; curTrack = null; music(want === 'itemget' ? 'fairy' : want); }
|
||||
}
|
||||
drawPill(); drawHome(); drawReveal(); drawSaves(); drawSettings(); if (m.mods) drawMods(); nowPlaying();
|
||||
if (m.done) { $('#doneEb').textContent = S.done.eb || ''; $('#doneLead').textContent = S.done.lead || ''; }
|
||||
break;
|
||||
}
|
||||
case 'go': go(m.s); break;
|
||||
case 'check': onCheck(m); break;
|
||||
case 'work': drawWork(m); break;
|
||||
case 'log': addLog(m.lines || []); break;
|
||||
case 'toast': toast(m.html); if (m.sfx) sfx(m.sfx); break;
|
||||
case 'sfx': sfx(m.id); break;
|
||||
case 'choice': openChoice(m); break;
|
||||
case 'ask': openAsk(m); break;
|
||||
case 'bench': onBench(m); break;
|
||||
case 'copy': navigator.clipboard && navigator.clipboard.writeText(m.text).then(() => toast('Copied'), () => toast('Could not copy')); break;
|
||||
}
|
||||
});
|
||||
|
||||
/* ---------------- keyboard ---------------- */
|
||||
document.addEventListener('keydown', e => {
|
||||
if (e.key === 'F2' && !HOST) { e.preventDefault(); return toggleJump(); }
|
||||
if (document.activeElement && document.activeElement.tagName === 'INPUT' && !['Escape', 'Enter', 'ArrowDown', 'ArrowUp', 'Tab'].includes(e.key)) return;
|
||||
const k = e.key; let used = true;
|
||||
if (focused && focused.dataset.vol && (k === 'ArrowLeft' || k === 'ArrowRight')) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + (k === 'ArrowLeft' ? -.05 : .05)); sfx('cursor'); }
|
||||
else if (focused && focused.dataset.gkey && (k === 'ArrowLeft' || k === 'ArrowRight')) gNudge(k === 'ArrowLeft' ? -1 : 1);
|
||||
else if (k === 'ArrowLeft') move(-1, 0); else if (k === 'ArrowRight') move(1, 0);
|
||||
else if (k === 'ArrowUp') move(0, -1); else if (k === 'ArrowDown') move(0, 1);
|
||||
else if (k === 'Enter' || k === ' ') activate(focused);
|
||||
else if (k === 'Escape' || k === 'Backspace') back();
|
||||
else if (k === 'PageUp' || (k === 'q' && !e.ctrlKey)) tab(-1); else if (k === 'PageDown' || (k === 'e' && !e.ctrlKey)) tab(1);
|
||||
else if (k === 'm' || k === 'M') toggleMute();
|
||||
else if (k === 'Tab') { const l = focusables(), i = l.indexOf(focused); setFocus(l[(i + (e.shiftKey ? -1 : 1) + l.length) % l.length], true); }
|
||||
else used = false;
|
||||
if (used) { e.preventDefault(); document.body.classList.add('kb'); }
|
||||
});
|
||||
|
||||
/* ---------------- controller (Xbox layout; the browser maps others to it): A, B, LB, RB, D-pad, left stick, Y mute ---------------- */
|
||||
const held = {}; let stickAt = 0, stickDir = '';
|
||||
function pad(t) {
|
||||
if (!document.hasFocus()) return;
|
||||
const gp = [...(navigator.getGamepads ? navigator.getGamepads() : [])].find(g => g && g.connected); if (!gp) return;
|
||||
const B = i => gp.buttons[i] && gp.buttons[i].pressed;
|
||||
const edge = (i, fn) => { const p = B(i); if (p && !held[i]) { document.body.classList.add('kb'); unlocked = true; fn(); } held[i] = p; };
|
||||
const slide = d => { if (focused && focused.dataset.vol) { setVol(focused.dataset.vol, S.sound[focused.dataset.vol] + d * .05); sfx('cursor'); return true; } return gNudge(d); };
|
||||
edge(0, () => activate(focused)); edge(1, back); edge(4, () => tab(-1)); edge(5, () => tab(1));
|
||||
edge(3, toggleMute); edge(9, () => { if (MAIN.includes(screen)) go('settings'); });
|
||||
edge(12, () => move(0, -1)); edge(13, () => move(0, 1)); edge(14, () => slide(-1) || move(-1, 0)); edge(15, () => slide(1) || move(1, 0));
|
||||
const x = gp.axes[0] || 0, y = gp.axes[1] || 0, dir = Math.abs(x) > .55 ? (x > 0 ? 'r' : 'l') : Math.abs(y) > .55 ? (y > 0 ? 'd' : 'u') : '';
|
||||
if (dir && (dir !== stickDir || t - stickAt > 220)) {
|
||||
document.body.classList.add('kb'); stickAt = t + (dir !== stickDir ? 160 : 0);
|
||||
({ l: () => slide(-1) || move(-1, 0), r: () => slide(1) || move(1, 0), u: () => move(0, -1), d: () => move(0, 1) })[dir]();
|
||||
}
|
||||
stickDir = dir;
|
||||
}
|
||||
function frame(t) { audioTick(t); pad(t); requestAnimationFrame(frame); }
|
||||
requestAnimationFrame(frame);
|
||||
|
||||
/* ---------------- preview only: jump to a screen (the stand-in plays along) ---------------- */
|
||||
function toggleJump() { $('#jump').classList.toggle('open'); }
|
||||
function jump(j) { $('#jump').classList.remove('open'); unlocked = true; if (window.DEMO) window.DEMO.jump(j, fromHost); }
|
||||
if (!HOST && window.DEMO) $('#jump').innerHTML = window.DEMO.jumps.map(([k, n]) => `<a data-j="${k}">${n}</a>`).join('');
|
||||
|
||||
setVol('music', S.sound.music, true); setVol('sfx', S.sound.sfx, true); nowPlaying();
|
||||
send({ t: 'ready' });
|
||||
151
launcher/ui/demo.js
Normal file
151
launcher/ui/demo.js
Normal file
@@ -0,0 +1,151 @@
|
||||
/* The stand-in for the launcher when this page is opened in a plain browser (a design preview): it answers the page's
|
||||
messages with made-up data and sped-up timings. Inside the launcher this file does nothing. Its pictures and sounds
|
||||
(img/save*.jpg, img/game/*, audio/*) are only there in a lab copy, never in the repo or the exe. */
|
||||
'use strict';
|
||||
(function () {
|
||||
if (window.chrome && window.chrome.webview || window.external && typeof window.external.sendMessage === 'function') return;
|
||||
let out = null;
|
||||
const emit = m => setTimeout(() => out && out(m), 0);
|
||||
const FILES = [
|
||||
{ slot: 4, label: 'File 4', place: 'Castle Town Market', when: 'yesterday', meta: '12 h 40 min played · Saved yesterday, 21:40', time: '12 h 40 min played', pic: 'img/save3.jpg', last: true },
|
||||
{ slot: 2, label: 'File 2', place: 'Castle grounds', when: '16 Nov', meta: '9 h 05 min played · Saved 16 Nov', time: '9 h 05 min played', pic: 'img/save1.jpg' },
|
||||
{ slot: 1, label: 'File 1', place: 'Lake Hylia', when: '15 Nov', meta: '7 h 31 min played · Saved 15 Nov', time: '7 h 31 min played', pic: 'img/save0.jpg' },
|
||||
{ slot: 3, label: 'File 3', place: 'Kokiri Forest', when: '12 Nov', meta: '0 h 48 min played · Saved 12 Nov', time: '0 h 48 min played', pic: 'img/save2.jpg' },
|
||||
{ slot: 5, label: 'File 5', place: 'Hyrule Field', when: '11 Nov', meta: '3 h 12 min played · Saved 11 Nov', time: '3 h 12 min played', pic: 'img/save4.jpg' },
|
||||
{ slot: 6, label: 'File 6', place: 'Hyrule Castle', when: '9 Nov', meta: '5 h 50 min played · Saved 9 Nov', time: '5 h 50 min played', pic: 'img/save5.jpg' },
|
||||
];
|
||||
const NEWS = { title: 'New in 0.5.2', items: [{ b: 'Battle music', p: 'ends again after the last enemy.' }, { b: 'Menu text', p: 'always shows on every screen.' }, { b: 'Updates', p: 'download 12 MB and keep your shaders.' }], more: true };
|
||||
const st = { lang: 'English (US)', folder: 'D:\\Games\\Triforce', ver: '0.5.2', update: false, timer: 0, kind: '', sound: { music: .4, sfx: .7, muted: false } };
|
||||
const SET = () => [
|
||||
{ h: 'Launcher' }, { id: 'music', label: 'Music', kind: 'slider' }, { id: 'sfx', label: 'Sounds', kind: 'slider' },
|
||||
{ id: 'autostart', label: 'Start with Windows', value: 'No', actLabel: 'Change' },
|
||||
{ h: 'Game' }, { id: 'folder', label: 'Game folder', value: st.folder, actLabel: 'Move' }, { id: 'glang', label: 'Game language', value: st.lang, actLabel: 'Change' },
|
||||
{ id: 'dlss', label: 'NVIDIA DLSS', value: 'Not included', actLabel: 'Include' }, { id: 'rebuild', label: 'Build the game again', value: 'About 45 minutes', actLabel: 'Build' },
|
||||
{ h: 'Shortcuts' }, { id: 'desktop', label: 'Desktop shortcut', value: 'Yes', actLabel: 'Change' }, { id: 'steam', label: 'Steam', value: 'Not added', actLabel: 'Add to Steam' },
|
||||
{ h: 'Help' }, { id: 'logs', label: 'Log folder', value: '', actLabel: 'Open' }, { id: 'versions', label: 'Versions', value: 'launcher 1.0.0 · game ' + st.ver, actLabel: 'Copy report' },
|
||||
{ h: 'Remove' }, { id: 'uninstall', label: 'Uninstall Triforce', value: 'Your saves stay', actLabel: 'Uninstall', danger: true },
|
||||
];
|
||||
function home() {
|
||||
const s = { t: 'state', files: FILES, settings: SET(), bench: { available: true, last: 'Not run yet on this PC' }, sound: st.sound };
|
||||
if (st.update) {
|
||||
s.home = { mode: 'update', eb: 'An update is ready', title: 'Version 0.5.3', meta: '12 MB download · About 4 minutes · your saves and mods stay', button: 'Update', act: 'update',
|
||||
links: [{ html: '<b>Play 0.5.2 first</b>', act: 'playold' }, { html: 'See all changes', act: 'open:changes' }], news: { title: 'New in 0.5.3', items: [{ b: 'RX 580', p: 'no more white speckles on grass and Link.' }, { b: 'Controller', p: 'LB and RB reach every menu tab.' }, { b: 'Mods', p: 'the whole list, and online co-op.' }] } };
|
||||
s.pill = { text: 'Update ready', dot: 'amber', act: 'update' };
|
||||
} else {
|
||||
s.home = { mode: 'ready', button: 'Play', act: 'play', links: [{ html: `Version ${st.ver} · <b>up to date</b>` }, { html: esc(st.folder), act: 'open:game' }], news: NEWS };
|
||||
s.pill = { text: 'Up to date · ' + st.ver, dot: '' };
|
||||
}
|
||||
return s;
|
||||
}
|
||||
function esc(s) { return String(s).replace(/[&<>]/g, c => ({ '&': '&', '<': '<', '>': '>' }[c])); }
|
||||
function reveal(name) {
|
||||
emit({ t: 'state', media: { art: true, music: true, sfx: true }, reveal: {
|
||||
found: `<b>◆ Your game is ready to build</b> <em>· ${esc(name)} · version 1.0.0</em>`,
|
||||
rows: [{ label: 'Language', value: st.lang, act: 'lang' }, { label: 'Where it goes', value: st.folder, small: '60 GB while building · 212 GB free', act: 'folder' }],
|
||||
under: 'About 45 minutes on this PC, the tools included · you can keep using it meanwhile', canBuild: true } });
|
||||
emit({ t: 'go', s: 'reveal' });
|
||||
}
|
||||
function check(name) {
|
||||
emit({ t: 'check', st: 'checking', name });
|
||||
setTimeout(() => {
|
||||
if (!/\.nup$/i.test(name) && !/folder/.test(name)) return emit({ t: 'check', st: 'bad', msg: `${name} is not a .nup file. Drop your .nup, or the folder with romfs and exefs in it.` });
|
||||
emit({ t: 'check', st: 'idle' }); reveal(name);
|
||||
}, 1200);
|
||||
}
|
||||
function work(kind) {
|
||||
clearInterval(st.timer); st.kind = kind;
|
||||
const steps = kind === 'build' ? [['Downloading Triforce\u2019s tools', 2, '262 MB'], ['Reading your game files', 2, '1 min'], ['Translating the game to PC code', 4.5, '11 min'], ['Compiling', 6, '20 min'], ['Preparing shaders for your graphics card', 5, 'about 13 min on an RTX 4070']]
|
||||
: [['Downloading 0.5.3', 2.5, '12 MB'], ['Rebuilding the changed code', 4, '3 min'], ['Keeping your shaders', 1.2, 'kept']];
|
||||
const mins = kind === 'build' ? 45 : 4, total = steps.reduce((a, s) => a + s[1], 0); let t = 0;
|
||||
const path = kind === 'build' ? [{ name: 'Your game', st: 'done' }, { name: 'Build', st: 'now' }, { name: 'Play' }] : [];
|
||||
const tick = () => {
|
||||
let acc = 0; const p = Math.min(1, t / total), left = Math.ceil(mins * (1 - p));
|
||||
emit({ t: 'work', kind, path, eb: kind === 'build' ? 'Building your game' : 'Updating to 0.5.3', title: left <= 1 ? 'Almost done' : `About ${left} minutes left`, frac: p, canStop: true, error: null,
|
||||
stopTitle: kind === 'build' ? 'Stop the build?' : 'Stop the update?', stopText: 'What is done so far is kept, so it picks up from here next time.',
|
||||
note: kind === 'build' ? 'Keep this window open; you can minimize it. You get a notice when the game is ready.' : 'Your saves, mods and shaders stay.',
|
||||
steps: steps.map(([n, s, real]) => { const a = acc; acc += s; return { name: n, st: t >= acc ? 'd' : t >= a ? 'n' : '', right: t >= acc ? real : t >= a ? 'now' : real }; }) });
|
||||
if (Math.random() < .3) emit({ t: 'log', lines: ['@@progress ' + p.toFixed(3)] });
|
||||
};
|
||||
tick(); emit({ t: 'go', s: 'work' });
|
||||
st.timer = setInterval(() => {
|
||||
t += .1; tick();
|
||||
if (t >= total) {
|
||||
clearInterval(st.timer);
|
||||
setTimeout(() => {
|
||||
if (kind === 'build') { emit(Object.assign(home(), { done: { eb: 'Built in 44 minutes', lead: '24 GB in ' + st.folder + ' · shaders ready for your graphics card · your controller works out of the box' } })); emit({ t: 'go', s: 'done' }); }
|
||||
else { st.update = false; st.ver = '0.5.3'; NEWS.title = 'New in 0.5.3'; emit(home()); emit({ t: 'go', s: 'home' }); emit({ t: 'toast', html: '<b>◆</b> Updated to 0.5.3 · your saves, mods and shaders stayed', sfx: 'success' }); }
|
||||
}, 600);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
const MODS = [
|
||||
{ id: 'sq', name: 'Squadala!', sub: 'Online co-op · daurosk · work in progress', state: 'kit', desc: 'Play together online. Installs its own kit beside your game and starts it.' },
|
||||
{ id: 'a', name: 'Sample: HD Kokiri textures', sub: 'Textures · sample data', state: 'get' }, { id: 'b', name: 'Sample: Classic HUD', sub: 'Interface · sample data', state: 'get' },
|
||||
{ id: 'c', name: 'Sample: Brighter nights', sub: 'Lighting · sample data', state: 'get' }, { id: 'd', name: 'Sample: Faster text', sub: 'Gameplay · sample data', state: 'get' },
|
||||
{ id: 'e', name: 'Sample: Ocarina notes on screen', sub: 'Interface · sample data', state: 'get' },
|
||||
];
|
||||
const MINE = [{ id: 'm1', name: 'Sample: Quieter Navi', sub: 'In your mods folder', state: 'on', removable: true }, { id: 'm2', name: 'Sample: Tunic recolour', sub: 'In your mods folder', state: 'off', removable: true }];
|
||||
function mods(tab, q) {
|
||||
const items = (tab === 'mine' ? MINE : MODS).filter(m => !q || m.name.toLowerCase().includes(q.toLowerCase()));
|
||||
emit({ t: 'state', mods: { tab, items, loaded: true, note: tab === 'mine' ? 'Changes take effect after the game is built again: <b>about 6 minutes</b>.' : '' } });
|
||||
}
|
||||
function bench() {
|
||||
clearInterval(st.timer); let t = 0; const per = 1.6, total = per * 8;
|
||||
const P = [{ img: 'img/save0.jpg', name: 'Lake Hylia', a: 142, b: 118 }, { img: 'img/save4.jpg', name: 'Hyrule Field', a: 96, b: 71 }, { img: 'img/save3.jpg', name: 'Castle Town Market', a: 88, b: 64 }, { img: 'img/save2.jpg', name: 'Kokiri Forest', a: 121, b: 97 }];
|
||||
st.timer = setInterval(() => {
|
||||
t += .1; const k = Math.min(7, Math.floor(t / per)), p = P[k % 4], pass = k < 4 ? 1 : 2;
|
||||
emit({ t: 'bench', phase: 'run', place: p, pass: `Finding your best settings · pass ${pass} of 2 · ${pass === 1 ? 'your settings' : 'with DLSS'}`, fps: Math.round((pass === 1 ? p.a * .55 : p.a) + Math.sin(t * 7) * 6), frac: t / total });
|
||||
if (t >= total) {
|
||||
clearInterval(st.timer);
|
||||
emit({ t: 'bench', phase: 'done', eb: 'Benchmark finished · 3 min 12 s · RTX 4070 SUPER', places: P.map(p => ({ img: p.img, name: p.name, fps: p.a, low: p.b })),
|
||||
verdict: 'Your PC holds <b>above 60 fps everywhere</b> at your current settings. With DLSS on, it holds above 120 almost everywhere, so a 120 cap plays smoother without dips.',
|
||||
recs: [{ name: 'Game frame rate cap', from: '60', to: '120' }, { name: 'Upscaler', from: 'Off', to: 'NVIDIA DLSS' }, { name: 'Render resolution', from: 'Native', to: 'Quality' }, { name: 'Frame generation', from: 'Off', to: 'Off', same: true }, { name: 'Anti-aliasing', from: 'SMAA', to: 'DLSS' }] });
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
window.DEMO = {
|
||||
jumps: [['welcome', 'First run: welcome'], ['reveal', 'First run: game found'], ['build', 'First run: building'], ['fail', 'Build failed'], ['done', 'First run: ready'], ['home', 'Home'], ['update', 'Home with an update ready'], ['saves', 'Saves'], ['mods', 'Mods'], ['settings', 'Settings'], ['bench', 'Benchmark']],
|
||||
jump(j, fn) {
|
||||
out = fn; clearInterval(st.timer);
|
||||
if (j === 'welcome') { emit({ t: 'state', media: { art: false, music: false, sfx: true } }); emit({ t: 'go', s: 'welcome' }); }
|
||||
else if (j === 'reveal') reveal('OcarinaOfTime.nup');
|
||||
else if (j === 'build') { emit({ t: 'state', media: { art: true, music: true, sfx: true } }); work('build'); }
|
||||
else if (j === 'fail') { emit({ t: 'state', media: { art: true, music: true, sfx: true } }); emit({ t: 'go', s: 'work' }); emit({ t: 'work', kind: 'build', eb: 'Building your game', title: 'The build stopped', lead: 'The drive ran out of space while compiling. Free up about 20 GB on D: and try again: it carries on from where it stopped.', error: { msg: 'disk full' }, path: [] }); }
|
||||
else if (j === 'done') { emit(Object.assign(home(), { media: { art: true, music: true, sfx: true }, done: { eb: 'Built in 44 minutes', lead: '24 GB in D:\\Games\\Triforce · shaders ready for your graphics card' } })); emit({ t: 'go', s: 'done' }); }
|
||||
else if (j === 'update') { st.update = true; emit(Object.assign(home(), { media: { art: true, music: true, sfx: true } })); emit({ t: 'go', s: 'home' }); }
|
||||
else if (j === 'bench') { emit(Object.assign(home(), { media: { art: true, music: true, sfx: true } })); bench(); }
|
||||
else { st.update = false; emit(Object.assign(home(), { media: { art: true, music: true, sfx: true } })); emit({ t: 'go', s: j }); }
|
||||
},
|
||||
receive(m, fn) {
|
||||
out = fn;
|
||||
if (m.t === 'ready') { emit({ t: 'hello', chrome: true, os: 'windows' }); emit({ t: 'state', sound: st.sound, media: { art: false, music: false, sfx: true } }); const j = location.hash.slice(1); if (j) window.DEMO.jump(j, fn); else emit({ t: 'go', s: 'welcome' }); return; }
|
||||
if (m.t === 'pick') return check(m.kind === 'folder' ? 'OcarinaOfTime (folder)' : 'OcarinaOfTime.nup');
|
||||
if (m.t === 'drop') return check(m.names[0] || 'file');
|
||||
if (m.t === 'win') return emit({ t: 'toast', html: 'Window button: ' + m.a + ' <span style="color:var(--text3)">· in the launcher only</span>' });
|
||||
if (m.t !== 'cmd') return;
|
||||
const c = m.c;
|
||||
if (c === 'build') work('build');
|
||||
else if (c === 'update') work('update');
|
||||
else if (c === 'stop' || c === 'workback') { clearInterval(st.timer); emit({ t: 'go', s: st.kind === 'update' ? 'home' : 'reveal' }); }
|
||||
else if (c === 'retry') work('build');
|
||||
else if (c === 'play' || c === 'playold') { emit({ t: 'go', s: 'playing' }); setTimeout(() => emit({ t: 'go', s: 'home' }), 6000); }
|
||||
else if (c === 'choose' && m.id === 'lang') emit({ t: 'choice', title: 'Game language', reply: 'lang', options: ['English (US)', 'English (UK)', 'Français (France)', 'Français (Canada)', 'Deutsch', 'Español (España)', 'Español (Latinoamérica)', 'Italiano', 'Nederlands', 'Português', 'Русский', '日本語', '한국어', '简体中文', '繁體中文'].map(n => ({ id: n, name: n, sel: n === st.lang })) });
|
||||
else if (c === 'lang') { st.lang = m.id; reveal('OcarinaOfTime.nup'); }
|
||||
else if (c === 'choose' && m.id === 'folder') emit({ t: 'toast', html: 'The system folder picker opens here' });
|
||||
else if (c === 'mods.list') mods(m.tab, m.q);
|
||||
else if (c === 'mods.main') { const x = MODS.concat(MINE).find(x => x.id === m.id); if (x) { x.state = x.state === 'on' ? 'off' : x.state === 'off' ? 'on' : x.state === 'kit' ? 'start' : 'on'; mods(m.tab, ''); emit({ t: 'sfx', id: 'success' }); } }
|
||||
else if (c === 'saves.list') emit({ t: 'state', saves: { eb: 'Six files in your game folder', found: 'From an emulator on this PC, or a folder. Found: Eden (6 files), Ryujinx (2 files).', items: FILES } });
|
||||
else if (c === 'saves.import') emit({ t: 'choice', title: 'Bring saves in', text: 'Pick where your saves are. Whatever they replace is backed up first.', ok: 'Bring them in', reply: 'saves.importfrom', options: [{ id: 'eden', name: 'Eden', sub: '6 files · last played 2 days ago', sel: true }, { id: 'ryu', name: 'Ryujinx', sub: '2 files · last played in March' }, { id: 'dir', name: 'A folder…', sub: 'choose it yourself' }] });
|
||||
else if (c === 'saves.importfrom') emit({ t: 'toast', html: '<b>◆</b> 6 files brought in from Eden · the old ones are in backups', sfx: 'success' });
|
||||
else if (c === 'saves.export') emit({ t: 'choice', title: 'Copy saves out', text: 'Your files, copied. Nothing here changes.', ok: 'Copy them out', reply: 'saves.exportto', options: [{ id: 'eden', name: 'To Eden', sub: 'its files are backed up first', sel: true }, { id: 'dir', name: 'To a folder…' }] });
|
||||
else if (c === 'saves.exportto') emit({ t: 'toast', html: '<b>◆</b> 6 files copied out', sfx: 'success' });
|
||||
else if (c === 'setting' && m.id === 'uninstall') emit({ t: 'ask', title: 'Uninstall Triforce?', html: '<p>Removes the launcher, its tools and the built game.</p><p>Your saves and mods stay in a backup folder.</p>', reply: 'uninstall', buttons: [{ id: 'no', label: 'Keep it' }, { id: 'yes', label: 'Uninstall', main: true }] });
|
||||
else if (c === 'setting') emit({ t: 'toast', html: m.id + ' <span style="color:var(--text3)">· the launcher does this</span>' });
|
||||
else if (c === 'bench') bench();
|
||||
else if (c === 'benchstop') { clearInterval(st.timer); emit({ t: 'bench', phase: 'stopped' }); }
|
||||
else if (c === 'benchapply') { emit({ t: 'go', s: 'settings' }); emit({ t: 'toast', html: '<b>◆</b> Applied · they take effect the next time you play', sfx: 'success' }); }
|
||||
else if (c === 'report' || c === 'details') { }
|
||||
else if (c === 'open') emit({ t: 'toast', html: 'Opens ' + esc(m.arg || '') });
|
||||
},
|
||||
};
|
||||
})();
|
||||
93
launcher/ui/fonts/OFL-Commissioner.txt
Normal file
93
launcher/ui/fonts/OFL-Commissioner.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2019 The Commissioner Project Authors (https://github.com/kosbarts/Commissioner)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
93
launcher/ui/fonts/OFL-CormorantGaramond.txt
Normal file
93
launcher/ui/fonts/OFL-CormorantGaramond.txt
Normal file
@@ -0,0 +1,93 @@
|
||||
Copyright 2015 the Cormorant Project Authors (github.com/CatharsisFonts/Cormorant)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
BIN
launcher/ui/fonts/commissioner-11a7fd07e9.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-11a7fd07e9.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/commissioner-8c0c3d1302.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-8c0c3d1302.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/commissioner-b8c95ecfa5.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-b8c95ecfa5.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/commissioner-bfda4e68e5.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-bfda4e68e5.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/commissioner-d76970e37f.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-d76970e37f.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/commissioner-f6bbdade6c.woff2
Normal file
BIN
launcher/ui/fonts/commissioner-f6bbdade6c.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-1f799a916c.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-1f799a916c.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-26a769c817.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-26a769c817.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-4db21dbf6b.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-4db21dbf6b.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-63e97a55b2.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-63e97a55b2.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-6a3809d7b3.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-6a3809d7b3.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-abcaa8b479.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-abcaa8b479.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-c8e477690f.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-c8e477690f.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-dc67de7e1c.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-dc67de7e1c.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-e266b787cb.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-e266b787cb.woff2
Normal file
Binary file not shown.
BIN
launcher/ui/fonts/cormorant-f3bda5d4e1.woff2
Normal file
BIN
launcher/ui/fonts/cormorant-f3bda5d4e1.woff2
Normal file
Binary file not shown.
325
launcher/ui/fonts/fonts.css
Normal file
325
launcher/ui/fonts/fonts.css
Normal file
@@ -0,0 +1,325 @@
|
||||
/* Commissioner and Cormorant Garamond (SIL Open Font License 1.1, see OFL.txt), served from inside the launcher. */
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-b8c95ecfa5.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-f6bbdade6c.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* greek */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-bfda4e68e5.woff2) format('woff2');
|
||||
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-d76970e37f.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-11a7fd07e9.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Commissioner';
|
||||
font-style: normal;
|
||||
font-weight: 100 900;
|
||||
font-display: block;
|
||||
src: url(commissioner-8c0c3d1302.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-1f799a916c.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-c8e477690f.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-6a3809d7b3.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-f3bda5d4e1.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-4db21dbf6b.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-1f799a916c.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-c8e477690f.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-6a3809d7b3.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-f3bda5d4e1.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-4db21dbf6b.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-1f799a916c.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-c8e477690f.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-6a3809d7b3.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-f3bda5d4e1.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-4db21dbf6b.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-e266b787cb.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-dc67de7e1c.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-63e97a55b2.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-26a769c817.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: block;
|
||||
src: url(cormorant-abcaa8b479.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-e266b787cb.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-dc67de7e1c.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-63e97a55b2.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-26a769c817.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: block;
|
||||
src: url(cormorant-abcaa8b479.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* cyrillic-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-e266b787cb.woff2) format('woff2');
|
||||
unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
|
||||
}
|
||||
/* cyrillic */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-dc67de7e1c.woff2) format('woff2');
|
||||
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
||||
}
|
||||
/* vietnamese */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-63e97a55b2.woff2) format('woff2');
|
||||
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-26a769c817.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Cormorant Garamond';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: block;
|
||||
src: url(cormorant-abcaa8b479.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
BIN
launcher/ui/img/crest.png
Normal file
BIN
launcher/ui/img/crest.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 277 KiB |
149
launcher/ui/index.html
Normal file
149
launcher/ui/index.html
Normal file
@@ -0,0 +1,149 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Triforce</title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<link rel="stylesheet" href="ui.css"><link rel="stylesheet" href="theme.css"><link rel="stylesheet" href="v3.css"><link rel="stylesheet" href="proto.css"><link rel="stylesheet" href="app.css"></head>
|
||||
<body>
|
||||
<div id="fit"><div class="win" id="win">
|
||||
|
||||
<!-- ============ FIRST RUN: welcome (no game read yet, so no game art and no music) ============ -->
|
||||
<section class="screen" id="s-welcome" data-first="pickFile">
|
||||
<div class="stage"></div>
|
||||
<div class="welcome"><div class="k">Welcome</div><h1>Play Ocarina of Time on your PC.</h1><p>Triforce turns your own copy of the game into a native PC game: high frame rates, wide screens, mods, and your controller.</p><p>Start with your game file. Nothing is uploaded, and nothing of the game comes with Triforce.</p></div>
|
||||
<div class="portal" id="portal"><i class="c c1"></i><i class="c c2"></i><i class="c c3"></i><i class="c c4"></i><div><div class="ic"></div><h2 id="portalH">Drop your game here</h2><p id="portalP">Your .nup file, or the folder with romfs and exefs in it</p><div class="or"><div class="qbtn" data-f id="pickFile" data-act="pick:file">Choose a file</div><div class="qbtn" data-f data-act="pick:folder">Choose a folder</div></div></div></div>
|
||||
<div class="foot4"><span id="needLine">Windows 10 or 11, or Linux · about 60 GB free while building</span><span><b class="lnk" data-f data-act="open:help">Need help?</b> · <span class="lnk" data-f data-act="open:discord">Discord</span></span></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ FIRST RUN: the reveal (the game is read: its logo and Saria's Song) ============ -->
|
||||
<section class="screen" id="s-reveal" data-first="buildBtn" data-back="welcome">
|
||||
<div class="reveal"></div><div class="grain" style="opacity:.1"></div>
|
||||
<div class="rlogo"><div class="aura"></div><div class="glowl"></div><img class="gamelogo" src="img/game/Logo_USEU_00.png" alt=""></div>
|
||||
<div class="found4" id="found"></div>
|
||||
<div class="choices" id="choices"></div>
|
||||
<div class="buildrow"><div class="orn"></div><div class="play" style="width:330px" data-f id="buildBtn" data-act="build" data-big>Build the game</div><div class="orn r"></div></div>
|
||||
<div class="under" id="under"></div>
|
||||
<div class="nowmusic" style="bottom:auto;top:76px;right:150px"><div class="eq"><i></i><i></i><i></i><i></i></div><em>Saria's Song</em> · from your game</div>
|
||||
</section>
|
||||
|
||||
<!-- ============ WORKING: the build, an update, or the tools download (one screen, filled by the launcher) ============ -->
|
||||
<section class="screen" id="s-work" data-first="workStop">
|
||||
<div class="hall"></div>
|
||||
<div class="mini"><div class="aura"></div><img class="gamelogo" src="img/game/Logo_USEU_00.png" alt=""></div>
|
||||
<div class="path" id="workPath" style="top:300px"></div>
|
||||
<div class="center" style="top:334px"><div class="eb" id="workEb"></div><h1 id="workTitle"></h1><p class="lead" id="workLead"></p></div>
|
||||
<div style="position:absolute;left:0;right:0;top:432px" id="workBody"><div class="gline" id="workLine"><i id="workBar"></i><u id="workKnob"></u></div>
|
||||
<div class="stepl" id="workSteps"></div></div>
|
||||
<div class="workerr" id="workErr"><div class="playrow" style="position:static;justify-content:center"><div class="orn"></div><div class="play sm" style="width:260px" data-f id="workRetry" data-act="retry" data-big>Try again</div><div class="orn r"></div></div>
|
||||
<p><span class="lnk" data-f data-act="report">Copy report</span> · <span class="lnk" data-f data-act="open:log">Open the log</span> · <span class="lnk" data-f data-act="workback" data-back-sound>Back</span></p></div>
|
||||
<div class="workfoot" id="workFoot"><span id="workNote"></span> · <span class="lnk" data-f data-act="details">Show details</span><span id="workStopWrap"> · <span class="lnk" data-f id="workStop" data-act="stop">Stop</span></span></div>
|
||||
<div class="nowmusic"><div class="eq"><i></i><i></i><i></i><i></i></div><em>Temple of Time</em> · from your game</div>
|
||||
<div class="drawer" id="drawer"><div class="dhead"><b>Details</b><span class="lnk" data-act="report">Copy report</span><span class="lnk" data-act="details">Close</span></div><pre id="drawerLog"></pre></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ FIRST RUN: done ============ -->
|
||||
<section class="screen" id="s-done" data-first="doneplay">
|
||||
<div class="hall"></div>
|
||||
<div class="mini"><div class="aura"></div><img class="gamelogo" src="img/game/Logo_USEU_00.png" alt=""></div>
|
||||
<div class="path" style="top:300px"><span class="done"><i></i>Your game</span><span class="done"><i></i>Build</span><span class="now"><i></i>Play</span></div>
|
||||
<div class="center" style="top:350px"><div class="eb" id="doneEb">Built</div><h1>Your game is ready</h1>
|
||||
<p class="lead" id="doneLead"></p></div>
|
||||
<div class="playrow" style="left:0;right:0;top:560px;justify-content:center"><div class="orn"></div><div class="play" data-f id="doneplay" data-act="play" data-big>Play</div><div class="orn r"></div></div>
|
||||
<div style="position:absolute;left:0;right:0;top:680px;text-align:center;font-size:14px;color:var(--text2)">Played before on an emulator? <span class="lnk" style="color:var(--gold)" data-f data-act="bringin">Bring your saves in</span> · <span class="lnk" style="color:var(--gold)" data-f data-act="go:home">Go to the launcher</span></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ HOME ============ -->
|
||||
<section class="screen" id="s-home" data-first="playBtn" data-tab="0">
|
||||
<div class="scene"><div class="img" id="homeImg"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div class="logo"><div class="aura"></div><img class="gamelogo" src="img/game/Logo_USEU_00.png" alt=""></div>
|
||||
<div class="cont"><div class="eb" id="hEb"></div><h1 id="hH1"></h1><div class="meta" id="hMeta"></div></div>
|
||||
<div class="frame" id="hFrame"><div class="pic" id="homePic"></div><div class="edge"></div><div class="top"><i></i><i></i></div><div class="cap"><span></span><span id="hCap"></span></div></div>
|
||||
<div class="glow"></div>
|
||||
<div class="playrow"><div class="orn"></div><div class="play" data-f id="playBtn" data-act="play" data-big>Play</div><div class="orn r"></div></div>
|
||||
<div class="links" id="hLinks"></div>
|
||||
<div class="dock"><div class="rule"><i class="a"></i><i class="b"></i></div>
|
||||
<div class="files"><h4>Your files</h4><div class="strip" id="strip"></div></div>
|
||||
<div class="whatsnew" id="whatsnew"></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- ============ PLAYING (the game is running) ============ -->
|
||||
<section class="screen" id="s-playing" data-first="showGame">
|
||||
<div class="scene"><div class="img" id="playImg" style="filter:blur(30px) saturate(1.1) brightness(.35)"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div class="mini"><div class="aura"></div><img class="gamelogo" src="img/game/Logo_USEU_00.png" alt=""></div>
|
||||
<div class="center" style="top:330px"><div class="eb" id="pEb">Playing now</div><h1>Ocarina of Time is running</h1>
|
||||
<p class="lead">The music stops while you play and comes back when you close the game.</p></div>
|
||||
<div class="act" style="left:0;right:0;top:520px;justify-content:center"><div class="qbtn" data-f id="showGame" data-act="showgame" style="width:260px">Show the game</div></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ SAVES ============ -->
|
||||
<section class="screen" id="s-saves" data-first="sc0" data-back="home" data-tab="2">
|
||||
<div class="scene"><div class="img" id="savesImg" style="filter:blur(26px) saturate(1.1) brightness(.5)"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div style="position:absolute;left:64px;top:96px"><div class="cont" style="position:static;width:auto"><div class="eb" id="savesEb"></div><h1 style="font-size:54px">Your files</h1></div></div>
|
||||
<div class="sgrid" id="sgrid"></div>
|
||||
<div class="sside"><div class="fbox"><h3>Bring saves in</h3><p id="foundSaves">From an emulator on this PC, or a folder.</p>
|
||||
<div class="play sm" data-f data-act="bringin">Bring saves in</div></div>
|
||||
<div class="fbox"><h3>Copy saves out</h3><p>To an emulator or a folder, to carry on somewhere else.</p><div class="qbtn" style="width:100%" data-f data-act="copyout">Copy saves out</div></div>
|
||||
<p style="margin-top:14px;font-size:13px;color:var(--text3)">Whatever gets replaced is backed up first. <span class="lnk" style="color:var(--gold)" data-f data-act="open:backups">Open backups</span></p></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ MODS ============ -->
|
||||
<section class="screen" id="s-mods" data-first="modTab0" data-back="home" data-tab="1">
|
||||
<div class="scene"><div class="img" id="modsImg" style="filter:blur(26px) saturate(1.1) brightness(.5)"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div style="position:absolute;left:64px;top:96px"><div class="cont" style="position:static;width:auto"><div class="eb" id="modsEb">From GameBanana, and your mods folder</div><h1 style="font-size:54px">Mods</h1></div></div>
|
||||
<div class="modtabs" id="modTabs"><span data-f id="modTab0" data-act="modtab:browse">Browse</span><span data-f id="modTab1" data-act="modtab:mine">Yours</span></div>
|
||||
<div class="search" id="modSearch"><input id="modQ" data-f placeholder="Search mods" spellcheck="false" autocomplete="off"></div>
|
||||
<div class="mods" id="mods"></div>
|
||||
<div class="modnote" id="modNote"></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ SETTINGS ============ -->
|
||||
<section class="screen" id="s-settings" data-first="row0" data-back="home" data-tab="3">
|
||||
<div class="scene"><div class="img" id="setImg" style="filter:blur(26px) saturate(1.1) brightness(.45)"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div style="position:absolute;left:64px;top:96px"><div class="cont" style="position:static;width:auto"><div class="eb" id="setEb">The launcher and your game</div><h1 style="font-size:54px">Settings</h1></div></div>
|
||||
<div class="settabs" id="setTabs"></div>
|
||||
<div class="set" id="set"></div>
|
||||
<div class="benchcard fbox" id="benchCard"><h3>Find my best settings</h3><p>Your game flies through four places in about 2 minutes with its own panel on screen, then this tells you what your PC runs best.</p>
|
||||
<div class="play sm" style="width:100%;font-size:21px;height:52px" data-f id="benchGo" data-act="bench">Find my best settings</div>
|
||||
<p style="margin:14px 0 0;font-size:12.5px;color:var(--text3)" id="benchLast"></p></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ BENCHMARK RUN ============ -->
|
||||
<section class="screen" id="s-brun" data-first="bStop" data-back="benchstop">
|
||||
<div class="brun"><div class="placebig" id="bPlace"></div><div class="grade"></div><div class="grain"></div>
|
||||
<span class="stop lnk" data-f id="bStop" data-act="benchstop">Stop · Esc</span>
|
||||
<div class="hud"><div class="eb" id="bPass"></div><h1 id="bName"></h1><p class="bline" id="bLine"></p><p class="bhint">About 2 minutes. The game shows where it is and the frame rate. Esc in the game, or Stop here, ends it.</p></div>
|
||||
<div class="prog"><i id="bProg"></i></div></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ BENCHMARK RESULTS ============ -->
|
||||
<section class="screen" id="s-bench" data-first="applyBtn" data-back="settings" data-tab="3">
|
||||
<div class="scene"><div class="img" id="benchImg" style="filter:blur(26px) saturate(1.1) brightness(.5)"></div><div class="grade"></div><div class="grain"></div></div>
|
||||
<div style="position:absolute;left:64px;top:96px"><div class="cont" style="position:static;width:auto"><div class="eb" id="benchEb"></div><h1 style="font-size:54px">Your best settings</h1></div></div>
|
||||
<div class="bench"><div><div class="places" id="places"></div>
|
||||
<p class="verdict" id="verdict"></p></div>
|
||||
<div class="recs"><h3>Recommended</h3><div class="fbox" id="recs"></div>
|
||||
<div class="qbtn compare" data-f data-act="bench.compare" id="compareBtn"></div>
|
||||
<div class="act" style="position:static;margin-top:22px;justify-content:flex-end"><span class="qlink" data-f data-act="go:settings">Keep mine</span><span class="qlink" data-f data-act="bench">Run again</span>
|
||||
<div class="play sm" style="width:220px" data-f id="applyBtn" data-act="benchapply">Apply</div></div></div></div>
|
||||
</section>
|
||||
|
||||
<!-- ============ shared: the bar, the sound panel, the sheet ============ -->
|
||||
<div class="bar" id="bar"><div class="brand flair"><div class="mark"></div><span>Triforce</span></div>
|
||||
<div class="nav" id="nav"><a data-f data-go="home">Play</a><a data-f data-go="mods">Mods</a><a data-f data-go="saves">Saves</a><a data-f data-go="settings">Settings</a></div>
|
||||
<div class="grow"></div><div class="state" id="pill"></div>
|
||||
<div class="spk on" id="spk" data-f data-act="vol"><svg viewBox="0 0 24 24"><path d="M4 9.5h3.5L12 5.5v13l-4.5-4H4z"/><path d="M15.5 9a4.5 4.5 0 0 1 0 6M18 6.5a8 8 0 0 1 0 11"/></svg></div>
|
||||
<div class="wc"><span data-act="win:min"><svg viewBox="0 0 12 12"><path d="M1 6.5h10"/></svg></span><span data-act="win:max"><svg viewBox="0 0 12 12"><rect x="1.5" y="1.5" width="9" height="9"/></svg></span><span data-act="win:close"><svg viewBox="0 0 12 12"><path d="M1.5 1.5l9 9M10.5 1.5l-9 9"/></svg></span></div></div>
|
||||
|
||||
<div class="vol" id="vol"><h5>Sound</h5>
|
||||
<div class="vrow"><b>Music</b><div class="slider" data-f data-vol="music"><i></i><u></u></div><span data-volv="music">40%</span></div>
|
||||
<div class="vrow"><b>Sounds</b><div class="slider" data-f data-vol="sfx"><i></i><u></u></div><span data-volv="sfx">70%</span></div>
|
||||
<div class="nowp" id="nowp"><div class="eq"><i></i><i></i><i></i><i></i></div><em id="nowT">Nothing playing</em><span>· from your game</span></div>
|
||||
<div class="mute"><span>Music stops while you play</span><b data-f data-act="mute" id="muteB">Mute (M)</b></div></div>
|
||||
|
||||
<div class="sheet-bg" id="sheetBg"><div class="sheet fbox" id="sheet"></div></div>
|
||||
<div id="toastHost"></div>
|
||||
</div></div>
|
||||
|
||||
<div id="protonote"><b>Preview</b> · a stand-in answers instead of the launcher: nothing here touches your game · <u style="cursor:pointer" id="jumpBtn">jump to a screen (F2)</u></div>
|
||||
<div id="jump"></div>
|
||||
<script src="demo.js"></script>
|
||||
<script src="app.js"></script>
|
||||
</body></html>
|
||||
113
launcher/ui/proto.css
Normal file
113
launcher/ui/proto.css
Normal file
@@ -0,0 +1,113 @@
|
||||
/* Prototype only: the launcher window fitted into the browser, screens that fade, live controls. */
|
||||
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; margin: 0; }
|
||||
#fit { position: absolute; left: 50%; top: 50%; width: 1280px; height: 800px; transform-origin: 50% 50%; }
|
||||
.win { position: relative !important; left: 0; top: 0; }
|
||||
.screen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .32s ease, visibility 0s linear .32s; }
|
||||
.screen.on { opacity: 1; visibility: visible; transition: opacity .32s ease; }
|
||||
.bar { z-index: 20; }
|
||||
.hidebits .nav, .hidebits .state { display: none; }
|
||||
[data-act], .nav a, .f, .sc, .qbtn, .play, .ch, .qlink, .spk, .state, .wc span, .choices > div, .portal .qbtn, .tabbtn, .row-set, .mod { cursor: pointer; }
|
||||
.play { transition: filter .15s ease, transform .15s ease; }
|
||||
.play:hover { filter: brightness(1.08) saturate(1.05); }
|
||||
.play:active { transform: translateY(1px); filter: brightness(.95); }
|
||||
.qbtn { transition: background .15s, border-color .15s; } .qbtn:hover { background: rgba(243, 234, 213, .12); border-color: rgba(224, 178, 62, .65); }
|
||||
.ch:hover, .qlink:hover, .links b:hover, .lnk:hover { color: var(--gold-hi); }
|
||||
.nav a:hover { color: var(--text); }
|
||||
.f { transition: transform .15s, outline-color .15s; } .f:hover { outline-color: var(--gold); }
|
||||
.sc .p { transition: filter .15s; } .sc:hover .p { filter: brightness(1.08); }
|
||||
.wc span:hover { color: var(--text); } .wc span:last-child:hover { background: #a3272f; color: #fff; }
|
||||
/* the pad / keyboard focus: a gold ring, only when the last input was not the mouse */
|
||||
body.kb .kf { outline: 2px solid var(--gold-hi) !important; outline-offset: 5px; box-shadow: 0 0 0 7px rgba(247, 220, 140, .14); }
|
||||
body.kb .play.kf { outline-offset: 6px; }
|
||||
|
||||
/* the logo rise of the reveal */
|
||||
.screen.on .rlogo { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
|
||||
.screen.on .rlogo .aura, .screen.on .rlogo .glowl { animation: glowin 2.2s ease both; }
|
||||
.screen.on .found4, .screen.on .choices, .screen.on .buildrow, .screen.on .under { animation: fadeup .6s ease both; }
|
||||
.screen.on .found4 { animation-delay: .7s; } .screen.on .choices { animation-delay: .85s; } .screen.on .buildrow { animation-delay: 1s; } .screen.on .under { animation-delay: 1.1s; }
|
||||
@keyframes rise { from { opacity: 0; transform: translateY(26px) scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
|
||||
@keyframes glowin { from { opacity: 0; } }
|
||||
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } }
|
||||
|
||||
/* drop area while a file is over it, and while it is checked */
|
||||
.portal::before, .portal::after, .portal .c { pointer-events: none; } .portal > div { position: relative; z-index: 1; }
|
||||
.portal.hot::before { border-color: var(--gold-hi); box-shadow: 0 0 40px rgba(247, 220, 140, .25) inset; }
|
||||
.portal.checking h2::after { content: '…'; }
|
||||
.portal.bad::before { border-color: #ff6b76; } .portal.bad p { color: #ff6b76; }
|
||||
|
||||
/* the scene backdrop and frame change with the chosen file */
|
||||
.scene .img, .frame .pic { transition: background-image .4s ease; }
|
||||
|
||||
/* sound panel: live sliders */
|
||||
.vol { display: none; } .vol.open { display: block; animation: fadeup .18s ease both; }
|
||||
.slider { cursor: pointer; } .slider u { cursor: grab; }
|
||||
.spk.muted svg path:last-child { display: none; }
|
||||
.spk.muted::after { content: ''; position: absolute; width: 20px; height: 1.6px; background: currentColor; transform: rotate(-45deg); }
|
||||
.spk { position: relative; }
|
||||
.eq i { animation: eq 1s ease-in-out infinite alternate; } .eq i:nth-child(2) { animation-delay: -.4s; } .eq i:nth-child(3) { animation-delay: -.7s; } .eq i:nth-child(4) { animation-delay: -.2s; }
|
||||
@keyframes eq { from { height: 3px; } to { height: 14px; } }
|
||||
.paused .eq i { animation-play-state: paused; }
|
||||
|
||||
/* toasts and sheets */
|
||||
.toast { position: absolute; left: 50%; top: 70px; z-index: 40; transform: translateX(-50%); padding: 13px 22px; font-size: 14.5px; color: var(--text);
|
||||
background: rgba(16, 14, 10, .96); border: 1px solid rgba(224, 178, 62, .5); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); animation: fadeup .2s ease both; }
|
||||
.toast b { color: var(--emerald); }
|
||||
.sheet-bg { position: absolute; inset: 0; z-index: 30; background: rgba(5, 4, 3, .66); display: none; }
|
||||
.sheet-bg.open { display: block; animation: glowin .2s ease both; }
|
||||
.sheet { position: absolute; left: 50%; top: 50%; width: 560px; transform: translate(-50%, -50%); padding: 28px 30px 26px; }
|
||||
.sheet h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 700; }
|
||||
.sheet p { margin-top: 8px; font-size: 14.5px; color: var(--text2); }
|
||||
.opt { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; }
|
||||
.opt:first-of-type { margin-top: 18px; } .opt b { font-weight: 600; } .opt span { font-size: 13px; color: var(--text3); }
|
||||
.opt.sel { border-color: var(--gold-hi); background: rgba(224, 178, 62, .08); }
|
||||
.sheet .acts { margin-top: 22px; display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
|
||||
|
||||
/* settings */
|
||||
.set { position: absolute; left: 64px; top: 196px; width: 760px; }
|
||||
.set h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 19px; color: var(--gold-hi); margin: 22px 0 6px; }
|
||||
.set h4:first-child { margin-top: 0; }
|
||||
.row-set { display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 15px; }
|
||||
.row-set b { font-weight: 600; } .row-set span { color: var(--text2); } .row-set em { font-style: normal; color: var(--gold); font-weight: 600; font-size: 14px; }
|
||||
.row-set .rng { display: flex; align-items: center; gap: 12px; } .row-set .slider { width: 260px; }
|
||||
.benchcard { position: absolute; right: 64px; top: 196px; width: 330px; padding: 24px; }
|
||||
.benchcard h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 26px; font-weight: 700; }
|
||||
.benchcard p { margin: 8px 0 18px; font-size: 14px; color: var(--text2); }
|
||||
|
||||
/* benchmark run */
|
||||
.brun { position: absolute; inset: 0; }
|
||||
.brun .placebig { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(2px) brightness(.85); transition: background-image .5s; }
|
||||
.brun .hud { position: absolute; left: 64px; bottom: 64px; }
|
||||
.brun .hud .eb { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 20px; color: var(--gold-hi); }
|
||||
.brun .hud h1 { font-size: 58px; } .brun .fps { font-size: 64px; font-weight: 750; font-variant-numeric: tabular-nums; }
|
||||
.brun .fps small { font-size: 20px; color: var(--text2); font-weight: 600; margin-left: 8px; }
|
||||
.brun .prog { position: absolute; left: 64px; right: 64px; bottom: 34px; height: 4px; background: rgba(255,255,255,.12); }
|
||||
.brun .prog i { display: block; height: 100%; background: linear-gradient(90deg, #9a6a18, #e0b23e); width: 0; transition: width .2s linear; }
|
||||
.brun .stop { position: absolute; right: 64px; top: 84px; font-size: 14px; color: var(--text2); }
|
||||
|
||||
/* mods */
|
||||
.mods { position: absolute; left: 64px; right: 64px; top: 196px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
|
||||
.mod { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 15px 4px; border-bottom: 1px solid var(--line-soft); }
|
||||
.mod b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 21px; font-weight: 700; } .mod span { display: block; font-size: 13px; color: var(--text3); margin-top: 2px; }
|
||||
.mod em { font-style: normal; font-size: 14px; font-weight: 600; color: var(--gold); } .mod em.inst { color: var(--emerald); }
|
||||
.search { position: absolute; left: 64px; top: 150px; width: 420px; height: 38px; display: flex; align-items: center; padding: 0 14px; font-size: 14px; color: var(--text3);
|
||||
border: 1px solid rgba(224, 178, 62, .35); background: rgba(10, 9, 8, .6); }
|
||||
.cats { position: absolute; left: 510px; top: 158px; display: flex; gap: 22px; font-size: 14px; color: var(--text3); }
|
||||
.cats span.on { color: var(--gold-hi); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold); padding-bottom: 4px; }
|
||||
|
||||
/* the prototype's own note and jump menu (not part of the design) */
|
||||
#protonote { position: fixed; left: 50%; transform: translateX(-50%); white-space: nowrap; bottom: 6px; z-index: 99; font: 12px/1.3 'Segoe UI', sans-serif; color: rgba(255,255,255,.45); }
|
||||
#protonote b { color: rgba(255, 220, 140, .8); }
|
||||
#jump { position: fixed; right: 10px; bottom: 8px; z-index: 99; display: none; padding: 10px 12px; background: rgba(20,18,14,.96); border: 1px solid rgba(224,178,62,.5);
|
||||
font: 13px/1.6 'Segoe UI', sans-serif; color: #ddd; }
|
||||
#jump.open { display: block; } #jump a { display: block; color: #f7dc8c; cursor: pointer; } #jump a:hover { color: #fff; }
|
||||
#gate { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(0,0,0,.82); cursor: pointer;
|
||||
font: 600 16px 'Segoe UI', sans-serif; color: #f7dc8c; text-align: center; }
|
||||
#gate small { display: block; margin-top: 8px; font-weight: 400; color: #aaa; font-size: 13px; }
|
||||
|
||||
/* ---------------- in the real window ---------------- */
|
||||
/* The bar is the title bar: drag it to move the window, double-click to maximize (WebView2's app-region). */
|
||||
.bar { app-region: drag; -webkit-app-region: drag; }
|
||||
.bar .nav a, .bar .state, .bar .spk, .bar .wc span { app-region: no-drag; -webkit-app-region: no-drag; }
|
||||
.nochrome .wc { display: none; } /* Linux: the desktop draws the window's own buttons */
|
||||
.hosted #protonote, .hosted #jump { display: none; }
|
||||
.hosted.devjump #jump.open { display: block; }
|
||||
66
launcher/ui/theme.css
Normal file
66
launcher/ui/theme.css
Normal file
@@ -0,0 +1,66 @@
|
||||
/* Triforce's own theme over the new layout (v2, 11-19): the warm hall, parchment text, gold as the one accent, the crest as
|
||||
the mark, serif titles, the three stones for state (style_tokens.md v3 values). Kept out: the halo, motes, letter-spaced
|
||||
capitals and the painted crest as decoration. */
|
||||
:root {
|
||||
--ink: #0a0908; --panel: rgba(18, 16, 12, .8); --line: rgba(224, 178, 62, .2); --line-soft: #2c2518;
|
||||
--text: #f3ead5; --text2: #cdc2a8; --text3: #948a70;
|
||||
--gold: #e0b23e; --gold-hi: #f7dc8c; --gold-ink: #3d2a08;
|
||||
--emerald: #6be07f; --emerald-ink: #0a5a14; --sapphire: #8fc0ff; --ruby: #ff6b76; --amber: #f7dc8c;
|
||||
}
|
||||
.flair, h1, h2, .side h3, .slot p b, .found b { font-family: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif; font-variation-settings: normal; }
|
||||
h1 { font-weight: 700; font-size: 70px; letter-spacing: -.01em; line-height: .98; }
|
||||
h2 { font-weight: 700; font-size: 46px; letter-spacing: -.005em; }
|
||||
.side h3 { font-size: 22px; font-weight: 700; } .slot p b { font-size: 18px; font-weight: 700; } .found b { font-size: 21px; font-weight: 700; }
|
||||
|
||||
/* the warm hall and the scrims over the save's picture */
|
||||
.bg { filter: blur(34px) saturate(1.15) brightness(.8) sepia(.18); }
|
||||
.scrim { background:
|
||||
linear-gradient(90deg, rgba(10, 9, 8, .8) 0%, rgba(10, 9, 8, .38) 44%, rgba(10, 9, 8, .04) 78%),
|
||||
linear-gradient(180deg, rgba(10, 9, 8, .5) 0%, rgba(10, 9, 8, 0) 24%, rgba(10, 9, 8, .12) 58%, rgba(10, 9, 8, .9) 100%); }
|
||||
.plain { background: radial-gradient(1100px 680px at 50% -18%, #221b10 0%, #110e0a 46%, var(--ink) 74%); }
|
||||
|
||||
/* the mark: the crest itself, and the wordmark in engraved gold */
|
||||
.brand { gap: 12px; font-family: 'Cormorant Garamond', 'Palatino Linotype', Georgia, serif; font-size: 25px; font-weight: 700; letter-spacing: .01em; }
|
||||
.brand span { background: linear-gradient(180deg, #fff1b8 0%, #e8b840 42%, #b57e1c 56%, #f3cf6a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
|
||||
.mark { width: 30px; height: 28px; background: url(img/crest.png) center / contain no-repeat; }
|
||||
.mark i { display: none; }
|
||||
.nav a { border-radius: 0; padding: 9px 4px; margin: 0 12px; color: var(--text3); }
|
||||
.nav a.on { background: none; color: var(--text); box-shadow: inset 0 -2px 0 var(--gold); }
|
||||
.state { background: rgba(10, 9, 8, .6); border-color: var(--line); color: var(--text2); }
|
||||
.dot { background: var(--emerald); } .dot.amber { background: var(--gold-hi); } .dot.blue { background: var(--sapphire); }
|
||||
|
||||
/* the eyebrow: gold, in sentence case, after a gold hairline */
|
||||
.over { color: var(--gold); font-weight: 600; } .over b { background: var(--gold); opacity: .8; height: 1px; width: 28px; }
|
||||
|
||||
/* the one gold action, as the polished bar of the old Setup; everything else is quiet */
|
||||
.btn { background: rgba(243, 234, 213, .07); border-color: var(--line); color: var(--text); }
|
||||
.btn.go { color: var(--gold-ink); background: linear-gradient(180deg, #fff4cc 0%, #f7dc8c 12%, #e0b23e 48%, #9a6a18 100%);
|
||||
box-shadow: 0 12px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 -2px 0 rgba(61, 42, 8, .35);
|
||||
text-shadow: 0 1px 0 rgba(255, 244, 204, .45); }
|
||||
.btn.quiet { background: transparent; border-color: transparent; color: var(--text2); }
|
||||
.focus { outline-color: var(--gold-hi); }
|
||||
|
||||
/* pictures framed with a gold hairline */
|
||||
.card::after, .slot { border-color: rgba(224, 178, 62, .32); }
|
||||
.card::after { border: 1px solid rgba(224, 178, 62, .38); }
|
||||
.thumbs div.on { outline-color: var(--gold); }
|
||||
.tag { background: rgba(10, 9, 8, .78); color: var(--text); }
|
||||
|
||||
.news { border-top-color: var(--line); } .news h4 { color: var(--gold); } .news h4 em { color: var(--text3); }
|
||||
.news p b { color: var(--text); } .foot { color: var(--text3); } .key { border-color: var(--text3); color: var(--text2); }
|
||||
|
||||
/* first run and the build: steps, fields, the progress line in gold */
|
||||
.steps .done i { background: var(--emerald-ink); border-color: var(--emerald); color: var(--emerald); }
|
||||
.steps .now { color: var(--text); } .steps .now i { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
|
||||
.box, .slot { background: var(--panel); border-color: var(--line); }
|
||||
.file { background: rgba(224, 178, 62, .08); border-color: var(--line); color: var(--gold); }
|
||||
.field + .field { border-top-color: var(--line-soft); }
|
||||
.track { background: #262017; height: 6px; } .track i { background: linear-gradient(90deg, #9a6a18, #e0b23e 70%, #fff4cc); }
|
||||
.list div + div { border-top-color: var(--line-soft); }
|
||||
.d .bul { background: var(--emerald-ink); border-color: var(--emerald); } .d .bul::after { border-color: var(--emerald); }
|
||||
.n .bul { border-color: var(--gold); } .n .bul::after { background: var(--gold); } .list .n span { color: var(--gold); }
|
||||
.ok { color: var(--emerald); }
|
||||
|
||||
/* lining numerals: the serif's old-style 1 reads as a dotless i in '31 minutes' */
|
||||
.flair, h1, h2, .brand, .side h3, .slot p b, .found b { font-variant-numeric: lining-nums; font-feature-settings: 'lnum' 1; }
|
||||
.mark { width: 34px; height: 31px; }
|
||||
117
launcher/ui/ui.css
Normal file
117
launcher/ui/ui.css
Normal file
@@ -0,0 +1,117 @@
|
||||
/* Triforce launcher: design mockups, 11-18. One family (Commissioner, SIL OFL): its Flair axis gives the titles flared
|
||||
terminals, close to the game's own menu type; flair 0 is the plain UI text. Colour comes from the player's own save
|
||||
picture; the three stones are status only: emerald = ready / go, sapphire = working, ruby = problem, amber = attention. */
|
||||
@import url('fonts/fonts.css');
|
||||
:root {
|
||||
--ink: #0b0f0d; --panel: rgba(14, 19, 17, .74); --line: rgba(255, 255, 255, .13);
|
||||
--text: #f4f1e8; --text2: rgba(244, 241, 232, .72); --text3: rgba(244, 241, 232, .5);
|
||||
--emerald: #3ccb7f; --emerald-ink: #04170c; --sapphire: #6aa6ff; --ruby: #ff6b6b; --amber: #ffb84d;
|
||||
}
|
||||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
html, body { width: 1280px; height: 800px; overflow: hidden; background: #000; }
|
||||
body { font-family: 'Commissioner', 'Segoe UI', 'Noto Sans', sans-serif; color: var(--text); font-size: 15px; line-height: 1.4;
|
||||
font-variation-settings: 'FLAR' 0, 'VOLM' 0; -webkit-font-smoothing: antialiased; }
|
||||
.win { position: relative; width: 1280px; height: 800px; overflow: hidden; background: var(--ink); }
|
||||
.flair { font-variation-settings: 'FLAR' 100, 'VOLM' 0; }
|
||||
|
||||
/* the backdrop: the newest save's own picture, far out of focus, so its low resolution never shows */
|
||||
.bg { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(34px) saturate(1.4) brightness(.86); }
|
||||
.scrim { position: absolute; inset: 0; background:
|
||||
linear-gradient(90deg, rgba(8, 11, 10, .74) 0%, rgba(8, 11, 10, .3) 44%, rgba(8, 11, 10, 0) 78%),
|
||||
linear-gradient(180deg, rgba(8, 11, 10, .42) 0%, rgba(8, 11, 10, 0) 24%, rgba(8, 11, 10, .1) 58%, rgba(8, 11, 10, .88) 100%); }
|
||||
.plain { position: absolute; inset: 0; background: radial-gradient(1200px 700px at 78% -10%, #17231d 0%, var(--ink) 62%); }
|
||||
|
||||
/* the top bar: brand, the four places, the state of the game, the window's own buttons */
|
||||
.bar { position: absolute; left: 0; right: 0; top: 0; height: 64px; display: flex; align-items: center; padding: 0 8px 0 28px; }
|
||||
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 17px; letter-spacing: .01em; }
|
||||
.mark { width: 20px; height: 18px; position: relative; }
|
||||
.mark i { position: absolute; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8.6px solid var(--text); }
|
||||
.mark i:nth-child(1) { left: 5px; top: 0; } .mark i:nth-child(2) { left: 0; top: 9px; } .mark i:nth-child(3) { left: 10px; top: 9px; }
|
||||
.nav { display: flex; gap: 6px; margin-left: 44px; }
|
||||
.nav a { position: relative; padding: 9px 14px; border-radius: 8px; font-weight: 600; font-size: 15px; color: var(--text2); text-decoration: none; }
|
||||
.nav a.on { color: var(--text); background: rgba(255, 255, 255, .1); }
|
||||
.grow { flex: 1; }
|
||||
.state { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(10, 14, 12, .5);
|
||||
border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text2); }
|
||||
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }
|
||||
.dot.amber { background: var(--amber); } .dot.blue { background: var(--sapphire); }
|
||||
.wc { display: flex; margin-left: 14px; }
|
||||
.wc span { width: 46px; height: 40px; display: grid; place-items: center; color: var(--text2); }
|
||||
.wc svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.3; fill: none; }
|
||||
|
||||
/* text */
|
||||
.over { font-size: 14px; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 10px; }
|
||||
.over b { width: 22px; height: 2px; background: var(--text); opacity: .7; }
|
||||
h1 { font-weight: 720; font-size: 62px; line-height: 1.02; letter-spacing: -.022em; margin-top: 14px; }
|
||||
h2 { font-weight: 700; font-size: 40px; line-height: 1.08; letter-spacing: -.018em; }
|
||||
.meta { margin-top: 16px; font-size: 17px; color: var(--text2); }
|
||||
.meta span + span::before { content: '·'; margin: 0 9px; color: var(--text3); }
|
||||
|
||||
/* buttons: one filled action a screen */
|
||||
.row { display: flex; align-items: center; gap: 14px; }
|
||||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 46px; padding: 0 22px; border-radius: 10px;
|
||||
font: inherit; font-weight: 650; font-size: 15.5px; color: var(--text); background: rgba(255, 255, 255, .1); border: 1px solid var(--line); }
|
||||
.btn.go { height: 64px; min-width: 216px; padding: 0 34px; border: 0; border-radius: 12px; font-size: 22px; font-weight: 720; letter-spacing: .005em;
|
||||
color: var(--emerald-ink); background: var(--emerald); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 -3px 0 rgba(0, 0, 0, .14); }
|
||||
.btn.go.mid { height: 54px; min-width: 0; font-size: 18px; padding: 0 28px; }
|
||||
.btn.go svg { width: 18px; height: 18px; fill: currentColor; }
|
||||
.btn.quiet { background: transparent; border-color: transparent; color: var(--text2); padding: 0 12px; }
|
||||
.focus { outline: 3px solid var(--text); outline-offset: 4px; }
|
||||
.note { margin-top: 18px; font-size: 13.5px; color: var(--text3); }
|
||||
|
||||
/* the save's own picture, sharp, at close to its real size */
|
||||
.card { position: absolute; border-radius: 14px; overflow: hidden; box-shadow: 0 34px 80px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .08) inset; }
|
||||
.card img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
||||
.card::after { content: ''; position: absolute; inset: 0; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .2); }
|
||||
.tag { position: absolute; left: 14px; bottom: 12px; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 650; background: rgba(8, 11, 10, .72); }
|
||||
.thumbs { position: absolute; display: flex; gap: 10px; width: 544px; }
|
||||
.thumbs div { position: relative; width: 100.8px; height: 57px; border-radius: 8px; overflow: hidden; opacity: .78; }
|
||||
.thumbs div.on { opacity: 1; outline: 2px solid var(--text); outline-offset: 2px; }
|
||||
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
||||
.thumbs small { position: absolute; left: 6px; bottom: 4px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }
|
||||
|
||||
/* what's new: three plain lines from the release's notes */
|
||||
.news { position: absolute; left: 64px; right: 64px; bottom: 62px; display: grid; grid-template-columns: 150px 1fr 1fr 1fr; gap: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
|
||||
.news h4 { font-size: 13.5px; font-weight: 650; color: var(--text2); }
|
||||
.news h4 em { display: block; font-style: normal; font-weight: 500; color: var(--text3); margin-top: 3px; }
|
||||
.news p { font-size: 14px; color: var(--text2); } .news p b { display: block; color: var(--text); font-weight: 650; margin-bottom: 2px; }
|
||||
.foot { position: absolute; left: 28px; right: 28px; bottom: 0; height: 46px; display: flex; align-items: center; font-size: 13px; color: var(--text3); }
|
||||
.keys { display: flex; gap: 18px; } .keys span { display: flex; align-items: center; gap: 7px; }
|
||||
.key { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--text2); color: var(--text2); font-size: 11.5px; font-weight: 750; }
|
||||
|
||||
/* the first-run pages and the build */
|
||||
.steps { position: absolute; left: 0; right: 0; top: 96px; display: flex; justify-content: center; gap: 12px; font-size: 14px; font-weight: 600; color: var(--text3); }
|
||||
.steps span { display: flex; align-items: center; gap: 9px; } .steps span + span::before { content: ''; width: 34px; height: 1px; background: var(--line); margin-right: 3px; }
|
||||
.steps i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--text3); font-size: 12.5px; }
|
||||
.steps .done { color: var(--text2); } .steps .done i { background: var(--emerald); border-color: var(--emerald); color: var(--emerald-ink); }
|
||||
.steps .now { color: var(--text); } .steps .now i { background: var(--text); border-color: var(--text); color: var(--ink); }
|
||||
.col { position: absolute; left: 280px; width: 720px; }
|
||||
.lead { margin-top: 12px; font-size: 17px; color: var(--text2); }
|
||||
.box { border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
|
||||
.found { display: flex; align-items: center; gap: 18px; padding: 20px 22px; }
|
||||
.file { width: 46px; height: 56px; border-radius: 7px; background: rgba(255, 255, 255, .1); border: 1px solid var(--line); display: grid; place-items: end center; padding-bottom: 7px; font-size: 10.5px; font-weight: 750; color: var(--text2); }
|
||||
.found b { display: block; font-size: 17px; font-weight: 650; } .found small { font-size: 14px; color: var(--text2); }
|
||||
.ok { color: var(--emerald); font-weight: 650; }
|
||||
.field { display: grid; grid-template-columns: 170px 1fr auto; align-items: center; gap: 16px; padding: 16px 22px; }
|
||||
.field + .field { border-top: 1px solid var(--line); }
|
||||
.field label { font-size: 14.5px; font-weight: 600; color: var(--text2); } .field div b { font-weight: 600; font-size: 15.5px; } .field div small { display: block; font-size: 13px; color: var(--text3); margin-top: 2px; }
|
||||
.bottom { position: absolute; left: 280px; width: 720px; bottom: 70px; display: flex; align-items: center; justify-content: space-between; }
|
||||
.bottom p { font-size: 14.5px; color: var(--text2); max-width: 380px; }
|
||||
|
||||
.track { height: 10px; border-radius: 5px; background: rgba(255, 255, 255, .12); overflow: hidden; margin-top: 34px; }
|
||||
.track i { display: block; height: 100%; border-radius: 5px; background: var(--sapphire); }
|
||||
.list { margin-top: 26px; } .list div { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; padding: 13px 0; font-size: 16px; color: var(--text3); }
|
||||
.list div + div { border-top: 1px solid var(--line); } .list b { font-weight: 600; } .list span { font-size: 14px; }
|
||||
.list .d { color: var(--text2); } .list .n { color: var(--text); } .list .n span { color: var(--sapphire); font-weight: 600; }
|
||||
.bul { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--text3); display: grid; place-items: center; }
|
||||
.d .bul { border-color: var(--emerald); background: var(--emerald); } .d .bul::after { content: ''; width: 8px; height: 4px; border-left: 2px solid var(--emerald-ink); border-bottom: 2px solid var(--emerald-ink); transform: rotate(-45deg) translateY(-1px); }
|
||||
.n .bul { border-color: var(--sapphire); } .n .bul::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--sapphire); }
|
||||
|
||||
/* saves */
|
||||
.grid { position: absolute; left: 64px; top: 196px; display: grid; grid-template-columns: repeat(3, 264px); gap: 20px 20px; }
|
||||
.slot { border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
|
||||
.slot img { display: block; width: 264px; height: 149px; object-fit: cover; }
|
||||
.slot p { padding: 11px 14px 13px; font-size: 13px; color: var(--text2); } .slot p b { display: block; font-size: 15px; font-weight: 650; color: var(--text); }
|
||||
.side { position: absolute; right: 64px; top: 196px; width: 300px; }
|
||||
.side .box { padding: 20px 22px; } .side .box + .box { margin-top: 16px; }
|
||||
.side h3 { font-size: 17px; font-weight: 680; } .side p { margin: 6px 0 16px; font-size: 14px; color: var(--text2); }
|
||||
241
launcher/ui/v3.css
Normal file
241
launcher/ui/v3.css
Normal file
@@ -0,0 +1,241 @@
|
||||
/* v3 (11-19): the title screen. The player's newest save fills the window like the game's own title scene; the game's
|
||||
own logo, glow and button ornament (read from the player's game files at run time, never shipped) sit over it; the
|
||||
files run along the bottom in gold frames. Loaded after ui.css and theme.css. */
|
||||
.scene { position: absolute; inset: 0; overflow: hidden; }
|
||||
.scene .img { position: absolute; inset: -4%; background: url(img/save3.jpg) center 38% / cover no-repeat;
|
||||
filter: blur(10px) saturate(1.2) contrast(1.05) brightness(.78); transform: scale(1.06); }
|
||||
/* film grain: hides the save picture's low resolution and gives the light some texture */
|
||||
.grain { position: absolute; inset: 0; opacity: .16; mix-blend-mode: overlay; background-image:
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
|
||||
.grade { position: absolute; inset: 0; background:
|
||||
radial-gradient(120% 90% at 72% 40%, rgba(10, 9, 8, 0) 30%, rgba(10, 9, 8, .55) 100%),
|
||||
linear-gradient(90deg, rgba(10, 9, 8, .86) 0%, rgba(10, 9, 8, .55) 30%, rgba(10, 9, 8, .05) 60%),
|
||||
linear-gradient(180deg, rgba(10, 9, 8, .55) 0%, rgba(10, 9, 8, 0) 18%, rgba(10, 9, 8, 0) 52%, rgba(10, 9, 8, .82) 74%, #0a0908 100%),
|
||||
linear-gradient(180deg, rgba(255, 196, 92, .07), rgba(255, 196, 92, 0) 50%); }
|
||||
|
||||
/* the game's own logo with its own aura behind it */
|
||||
.logo { position: absolute; left: 38px; top: 58px; width: 470px; height: 362px; }
|
||||
.logo .aura { position: absolute; left: 50%; top: 50%; width: 760px; height: 760px; transform: translate(-50%, -50%);
|
||||
background: url(img/game/TitleLogoAura_00.png) center / contain no-repeat; mix-blend-mode: screen; opacity: .55;
|
||||
filter: sepia(1) saturate(2.2) hue-rotate(-6deg); -webkit-mask: radial-gradient(closest-side, #000 35%, transparent 100%); mask: radial-gradient(closest-side, #000 35%, transparent 100%); }
|
||||
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
|
||||
filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .7)); }
|
||||
|
||||
.cont { position: absolute; left: 72px; top: 410px; width: 560px; }
|
||||
.cont .eb { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 21px; color: var(--gold-hi); }
|
||||
.cont h1 { margin-top: 2px; font-size: 46px; text-shadow: 0 2px 18px rgba(0, 0, 0, .75); }
|
||||
.cont .meta { margin-top: 8px; font-size: 15.5px; color: var(--text2); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
|
||||
|
||||
/* Play: the gold bar with chamfered ends, an inner hairline, and the game's own ornament on each side */
|
||||
.playrow { position: absolute; left: 30px; top: 540px; display: flex; align-items: center; }
|
||||
.orn { width: 74px; height: 74px; background: url(img/game/TitleBtnDeco_00.png) center / contain no-repeat;
|
||||
mix-blend-mode: screen; filter: sepia(1) saturate(3.2) hue-rotate(-10deg) brightness(1.05); opacity: .95; }
|
||||
.orn.r { transform: scaleX(-1); }
|
||||
.play { position: relative; width: 300px; height: 66px; margin: 0 -6px; display: grid; place-items: center;
|
||||
clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);
|
||||
background: linear-gradient(180deg, #fff4cc 0%, #f7dc8c 14%, #e0b23e 50%, #a8761c 100%);
|
||||
font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; font-size: 32px; letter-spacing: .01em; color: #241700; z-index: 1;
|
||||
text-shadow: 0 1px 0 rgba(255, 244, 204, .5); }
|
||||
.play::before { content: ''; position: absolute; inset: 4px; clip-path: inherit;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(255, 255, 255, 0)); box-shadow: inset 0 0 0 1px rgba(61, 42, 8, .45); }
|
||||
.play::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255, 255, 255, 0) 8%, rgba(255, 255, 255, .22) 16%, rgba(255, 255, 255, 0) 26%); }
|
||||
.glow { position: absolute; left: 120px; top: 548px; width: 260px; height: 60px; border-radius: 50%; background: rgba(247, 200, 110, .22); filter: blur(30px); }
|
||||
.links { position: absolute; left: 112px; top: 612px; display: flex; gap: 26px; font-size: 14px; color: var(--text2); }
|
||||
.links span b { color: var(--gold); font-weight: 600; }
|
||||
|
||||
/* the dock: a gold hairline with the ornament at its centre, the files, and what's new */
|
||||
.dock { position: absolute; left: 0; right: 0; bottom: 0; height: 156px; }
|
||||
.rule { position: absolute; left: 64px; right: 64px; top: 0; height: 1px;
|
||||
background: linear-gradient(90deg, rgba(224, 178, 62, 0), rgba(224, 178, 62, .55) 18%, rgba(224, 178, 62, .55) 82%, rgba(224, 178, 62, 0)); }
|
||||
.rule i { position: absolute; top: -14px; width: 28px; height: 28px; background: url(img/game/TitleBtnDeco_00.png) center / contain no-repeat;
|
||||
mix-blend-mode: screen; filter: sepia(1) saturate(3.2) hue-rotate(-10deg); }
|
||||
.rule i.a { left: calc(50% - 30px); } .rule i.b { left: calc(50% + 2px); transform: scaleX(-1); }
|
||||
.files { position: absolute; left: 64px; top: 30px; }
|
||||
.files h4, .whatsnew h4 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
|
||||
.strip { display: flex; gap: 12px; margin-top: 10px; }
|
||||
.f { position: relative; width: 118px; height: 66px; border-radius: 4px; overflow: hidden; outline: 1px solid rgba(224, 178, 62, .35); outline-offset: 0; }
|
||||
.f img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) brightness(.82); }
|
||||
.f small { position: absolute; left: 7px; bottom: 5px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px #000; }
|
||||
.f.on { outline: 2px solid var(--gold-hi); box-shadow: 0 0 22px rgba(247, 220, 140, .35); transform: translateY(-3px); }
|
||||
.f.on img { filter: none; }
|
||||
.whatsnew { position: absolute; left: 862px; right: 64px; top: 30px; }
|
||||
.whatsnew p { margin-top: 8px; font-size: 13.5px; color: var(--text2); line-height: 1.35; }
|
||||
.whatsnew p b { color: var(--text); font-weight: 650; }
|
||||
.whatsnew p::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 9px 2px 0; background: var(--gold); transform: rotate(45deg); }
|
||||
.bar { z-index: 2; }
|
||||
|
||||
/* the save's own picture, sharp, framed in gold with the game's ornament at the top of the frame */
|
||||
.frame { position: absolute; left: 672px; top: 118px; width: 544px; height: 306px; }
|
||||
.frame .pic { position: absolute; inset: 0; background: url(img/save3.jpg) center / cover; box-shadow: 0 40px 90px rgba(0, 0, 0, .7); }
|
||||
.frame .pic::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 120% at 50% 40%, rgba(0, 0, 0, 0) 55%, rgba(10, 9, 8, .45) 100%); }
|
||||
.frame .edge { position: absolute; inset: -9px; border: 1px solid rgba(224, 178, 62, .55); }
|
||||
.frame .edge::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(224, 178, 62, .22); }
|
||||
.frame .top { position: absolute; left: calc(50% - 46px); top: -32px; width: 92px; height: 46px; display: flex; }
|
||||
.frame .top i { flex: 1; background: url(img/game/TitleBtnDeco_00.png) center / 46px no-repeat; mix-blend-mode: screen; filter: sepia(1) saturate(3.2) hue-rotate(-10deg); }
|
||||
.frame .top i + i { transform: scaleX(-1); }
|
||||
.frame .cap { position: absolute; left: 0; right: 0; top: 322px; display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text2); }
|
||||
.frame .cap b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 700; color: var(--text); font-style: italic; }
|
||||
/* sound: the speaker in the bar, and its panel (Music, Sounds, what is playing) */
|
||||
.spk { width: 40px; height: 34px; display: grid; place-items: center; margin-left: 10px; border-radius: 17px; border: 1px solid var(--line); background: rgba(10, 9, 8, .6); color: var(--text); }
|
||||
.spk svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
|
||||
.spk.on { border-color: var(--gold); color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(224, 178, 62, .14); }
|
||||
.vol { position: absolute; right: 150px; top: 60px; width: 318px; padding: 18px 20px 16px; z-index: 5; background: rgba(16, 14, 10, .96);
|
||||
border: 1px solid rgba(224, 178, 62, .45); box-shadow: 0 24px 60px rgba(0, 0, 0, .65); }
|
||||
.vol::before { content: ''; position: absolute; right: 22px; top: -7px; width: 12px; height: 12px; background: rgba(16, 14, 10, .96);
|
||||
border-left: 1px solid rgba(224, 178, 62, .45); border-top: 1px solid rgba(224, 178, 62, .45); transform: rotate(45deg); }
|
||||
.vol h5 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
|
||||
.vrow { display: grid; grid-template-columns: 62px 1fr 36px; align-items: center; gap: 12px; margin-top: 14px; font-size: 14px; color: var(--text2); }
|
||||
.vrow b { font-weight: 600; color: var(--text); } .vrow span { text-align: right; font-variant-numeric: tabular-nums; }
|
||||
.slider { position: relative; height: 4px; background: #262017; }
|
||||
.slider i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9a6a18, #e0b23e); }
|
||||
.slider u { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: #f7dc8c; transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(10, 9, 8, .9); }
|
||||
.nowp { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text3); }
|
||||
.nowp em { font-style: italic; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 16px; color: var(--text2); }
|
||||
.eq { display: flex; gap: 2px; align-items: flex-end; height: 14px; } .eq i { width: 3px; background: var(--gold); }
|
||||
.mute { margin-top: 12px; display: flex; justify-content: space-between; font-size: 13px; color: var(--text3); } .mute b { color: var(--gold); font-weight: 600; }
|
||||
|
||||
/* ---- v3 for the other screens (11-19) ---- */
|
||||
/* the hall before a game is read: warm dark, a soft light from above; the crest is our own art */
|
||||
.hall { position: absolute; inset: 0; background: radial-gradient(900px 560px at 50% -12%, #2a2112 0%, #15110b 42%, #0a0908 72%); }
|
||||
.hall::after { content: ''; position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay; background-image:
|
||||
url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1.6 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
|
||||
.seal { position: absolute; left: calc(50% - 46px); top: 74px; width: 92px; height: 86px; background: url(img/crest.png) center / contain no-repeat;
|
||||
filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .7)); }
|
||||
/* the game's own logo, once the build has read the game's files */
|
||||
.mini { position: absolute; left: calc(50% - 150px); top: 64px; width: 300px; height: 231px; }
|
||||
.mini img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .75)); }
|
||||
.mini .aura { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; transform: translate(-50%, -50%);
|
||||
background: url(img/game/TitleLogoAura_00.png) center / contain no-repeat; mix-blend-mode: screen; opacity: .5;
|
||||
filter: sepia(1) saturate(2.2) hue-rotate(-6deg); -webkit-mask: radial-gradient(closest-side, #000 35%, transparent 100%); }
|
||||
|
||||
/* steps of the first run: gold diamonds on a hairline */
|
||||
.path { position: absolute; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 0; font-size: 14px; color: var(--text3); }
|
||||
.path span { display: flex; align-items: center; gap: 10px; }
|
||||
.path span + span::before { content: ''; width: 64px; height: 1px; margin: 0 16px; background: linear-gradient(90deg, rgba(224,178,62,.15), rgba(224,178,62,.5), rgba(224,178,62,.15)); }
|
||||
.path i { width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid var(--text3); }
|
||||
.path .done { color: var(--text2); } .path .done i { background: var(--gold); border-color: var(--gold); }
|
||||
.path .now { color: var(--gold-hi); font-weight: 600; } .path .now i { border-color: var(--gold-hi); box-shadow: 0 0 0 3px rgba(247,220,140,.18); background: rgba(247,220,140,.25); }
|
||||
|
||||
.center { position: absolute; left: 230px; width: 820px; text-align: center; }
|
||||
.center .eb { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 21px; color: var(--gold-hi); }
|
||||
.center h1 { font-size: 60px; margin-top: 4px; text-shadow: 0 2px 18px rgba(0,0,0,.6); }
|
||||
.center .lead { margin-top: 10px; font-size: 16.5px; color: var(--text2); }
|
||||
|
||||
/* a framed box: two gold hairlines, as the picture frame */
|
||||
.fbox { position: relative; background: rgba(18, 16, 12, .82); border: 1px solid rgba(224, 178, 62, .42); text-align: left; }
|
||||
.fbox::before { content: ''; position: absolute; inset: 4px; border: 1px solid rgba(224, 178, 62, .14); pointer-events: none; }
|
||||
.fbox .row2 { display: grid; grid-template-columns: 200px 1fr auto; align-items: center; gap: 18px; padding: 17px 26px; }
|
||||
.fbox .row2 + .row2 { border-top: 1px solid var(--line-soft); }
|
||||
.fbox label { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 18px; color: var(--gold-hi); }
|
||||
.fbox b { font-size: 16px; font-weight: 600; color: var(--text); } .fbox small { display: block; font-size: 13px; color: var(--text3); margin-top: 3px; }
|
||||
.fbox .ch { font-size: 14px; font-weight: 600; color: var(--gold); }
|
||||
.gamefile { display: flex; align-items: center; gap: 20px; padding: 20px 26px; }
|
||||
.gamefile .nup { width: 50px; height: 62px; display: grid; place-items: end center; padding-bottom: 8px; font-size: 11px; font-weight: 800; color: var(--gold);
|
||||
background: linear-gradient(180deg, rgba(224,178,62,.16), rgba(224,178,62,.04)); border: 1px solid rgba(224,178,62,.45); }
|
||||
.gamefile b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 23px; font-weight: 700; }
|
||||
.gamefile .ok { font-size: 14px; }
|
||||
|
||||
/* the chamfered gold bar at another size, and the quiet button with a gold hairline */
|
||||
.play.sm { width: 240px; height: 56px; font-size: 26px; }
|
||||
.qbtn { height: 48px; padding: 0 24px; display: inline-grid; place-items: center; font-size: 15px; font-weight: 600; color: var(--text);
|
||||
background: rgba(243, 234, 213, .06); border: 1px solid rgba(224, 178, 62, .35); }
|
||||
.qlink { font-size: 15px; font-weight: 600; color: var(--text2); }
|
||||
.act { position: absolute; display: flex; align-items: center; gap: 22px; }
|
||||
|
||||
/* the build: the time left, a gold line with a spark at its head, the steps with their times */
|
||||
.gline { position: relative; height: 6px; margin: 30px auto 0; width: 820px; background: #262017; }
|
||||
.gline i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #9a6a18, #e0b23e 75%, #fff4cc); }
|
||||
.gline u { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; transform: rotate(45deg); background: #fff4cc;
|
||||
box-shadow: 0 0 14px 4px rgba(247, 220, 140, .55); }
|
||||
.gline::before, .gline::after { content: ''; position: absolute; top: -4px; width: 9px; height: 9px; transform: rotate(45deg); border: 1px solid var(--gold); background: #0a0908; }
|
||||
.gline::before { left: -16px; } .gline::after { right: -16px; }
|
||||
.stepl { width: 820px; margin: 26px auto 0; text-align: left; }
|
||||
.stepl div { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; padding: 12px 4px; font-size: 16px; color: var(--text3); border-top: 1px solid var(--line-soft); }
|
||||
.stepl div:first-child { border-top: 0; }
|
||||
.stepl em { width: 11px; height: 11px; transform: rotate(45deg); border: 1px solid var(--text3); margin-left: 4px; }
|
||||
.stepl .d { color: var(--text2); } .stepl .d em { background: var(--emerald); border-color: var(--emerald); }
|
||||
.stepl .n { color: var(--text); } .stepl .n em { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px rgba(247, 220, 140, .6); }
|
||||
.stepl b { font-weight: 600; } .stepl span { font-size: 14px; } .stepl .n span { color: var(--gold-hi); font-weight: 600; }
|
||||
.nowmusic { position: absolute; right: 64px; bottom: 26px; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text3); }
|
||||
.nowmusic em { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 16px; color: var(--text2); }
|
||||
|
||||
/* saves: framed pictures in two rows */
|
||||
.sgrid { position: absolute; left: 64px; top: 196px; display: grid; grid-template-columns: repeat(3, 258px); gap: 34px 26px; }
|
||||
.sc { position: relative; }
|
||||
.sc .p { position: relative; width: 258px; height: 145px; background-size: cover; background-position: center; }
|
||||
.sc .p::after { content: ''; position: absolute; inset: -6px; border: 1px solid rgba(224, 178, 62, .45); }
|
||||
.sc.on .p::after { border-color: var(--gold-hi); box-shadow: 0 0 24px rgba(247, 220, 140, .3); }
|
||||
.sc .t { margin-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
|
||||
.sc .t b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; font-weight: 700; }
|
||||
.sc .t span { font-size: 12.5px; color: var(--text3); }
|
||||
.sc .m { font-size: 13px; color: var(--text2); margin-top: 1px; }
|
||||
.sc .n { position: absolute; left: -2px; top: -18px; font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 15px; color: var(--gold-hi); }
|
||||
.sside { position: absolute; right: 64px; top: 196px; width: 300px; }
|
||||
.sside .fbox { padding: 22px 24px; } .sside .fbox + .fbox { margin-top: 18px; }
|
||||
.sside h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 24px; font-weight: 700; }
|
||||
.sside p { margin: 6px 0 16px; font-size: 13.5px; color: var(--text2); }
|
||||
.sside .play.sm { width: 100%; font-size: 23px; height: 52px; }
|
||||
|
||||
/* benchmark results */
|
||||
.bench { position: absolute; left: 64px; right: 64px; top: 210px; display: grid; grid-template-columns: 1fr 470px; gap: 40px; }
|
||||
.places { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
|
||||
.place { position: relative; height: 112px; background-size: cover; background-position: center; }
|
||||
.place::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,9,8,.1), rgba(10,9,8,.86)); }
|
||||
.place::before { content: ''; position: absolute; inset: -5px; border: 1px solid rgba(224,178,62,.38); z-index: 1; }
|
||||
.place div { position: absolute; left: 14px; right: 14px; bottom: 10px; z-index: 1; display: flex; justify-content: space-between; align-items: baseline; }
|
||||
.place b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 19px; font-weight: 700; }
|
||||
.place span { font-size: 13px; color: var(--text2); } .place span strong { font-size: 22px; color: var(--text); font-weight: 700; }
|
||||
.verdict { margin-top: 22px; font-size: 14.5px; color: var(--text2); } .verdict b { color: var(--emerald); font-weight: 650; }
|
||||
.recs .fbox { padding: 6px 0; }
|
||||
.rec { display: grid; grid-template-columns: 1fr auto 20px auto; gap: 12px; align-items: center; padding: 12px 24px; font-size: 14.5px; }
|
||||
.rec + .rec { border-top: 1px solid var(--line-soft); }
|
||||
.rec b { font-weight: 600; } .rec s { color: var(--text3); text-decoration: none; } .rec em { font-style: normal; color: var(--gold); text-align: center; }
|
||||
.rec strong { color: var(--gold-hi); font-weight: 650; } .rec.same strong, .rec.same s { color: var(--text3); } .rec.same em { color: var(--text3); }
|
||||
.recs h3 { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-size: 20px; font-weight: 600; color: var(--gold-hi); margin-bottom: 12px; }
|
||||
|
||||
/* (the window pinned to the viewport: a page whose content runs past 800 px was scrolled in the headless render) */
|
||||
.win { position: fixed; left: 0; top: 0; }
|
||||
.sc .n { top: -25px; left: 0; }
|
||||
|
||||
/* ---- v4 first run (11-19, "the setup still looks like the old launcher"): a stage, a drop, a reveal ---- */
|
||||
.stage { position: absolute; inset: 0; background: #070605; }
|
||||
.stage::before { content: ''; position: absolute; left: 50%; top: 52%; width: 1100px; height: 640px; transform: translate(-50%, -50%);
|
||||
background: radial-gradient(closest-side, rgba(224, 178, 62, .13), rgba(224, 178, 62, .04) 55%, rgba(0, 0, 0, 0)); }
|
||||
.welcome { position: absolute; left: 96px; top: 120px; width: 520px; }
|
||||
.welcome .k { font-size: 14px; font-weight: 600; color: var(--gold); }
|
||||
.welcome h1 { font-size: 64px; margin-top: 10px; line-height: 1; }
|
||||
.welcome p { margin-top: 18px; font-size: 16.5px; color: var(--text2); line-height: 1.5; }
|
||||
.welcome p + p { margin-top: 10px; font-size: 14px; color: var(--text3); }
|
||||
.portal { position: absolute; left: 660px; top: 120px; width: 524px; height: 520px; display: grid; place-items: center; text-align: center;
|
||||
background: linear-gradient(180deg, rgba(24, 20, 13, .9), rgba(12, 10, 7, .9)); }
|
||||
.portal::before { content: ''; position: absolute; inset: 0; border: 1px solid rgba(224, 178, 62, .55); }
|
||||
.portal::after { content: ''; position: absolute; inset: 10px; border: 1px dashed rgba(224, 178, 62, .32); }
|
||||
.portal .c { position: absolute; width: 22px; height: 22px; border-color: var(--gold-hi); border-style: solid; border-width: 0; }
|
||||
.portal .c1 { left: -1px; top: -1px; border-left-width: 2px; border-top-width: 2px; } .portal .c2 { right: -1px; top: -1px; border-right-width: 2px; border-top-width: 2px; }
|
||||
.portal .c3 { left: -1px; bottom: -1px; border-left-width: 2px; border-bottom-width: 2px; } .portal .c4 { right: -1px; bottom: -1px; border-right-width: 2px; border-bottom-width: 2px; }
|
||||
.portal .ic { width: 66px; height: 82px; margin: 0 auto; position: relative; border: 1.5px solid var(--gold); background: rgba(224, 178, 62, .06); }
|
||||
.portal .ic::before { content: ''; position: absolute; right: -1.5px; top: -1.5px; width: 20px; height: 20px; background: #070605; border-left: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); }
|
||||
.portal .ic::after { content: '.nup'; position: absolute; left: 0; right: 0; bottom: 10px; font-size: 12px; font-weight: 800; color: var(--gold); }
|
||||
.portal h2 { font-size: 34px; margin-top: 26px; } .portal p { margin-top: 8px; font-size: 14.5px; color: var(--text2); }
|
||||
.portal .or { margin-top: 26px; display: flex; gap: 14px; justify-content: center; }
|
||||
.foot4 { position: absolute; left: 96px; right: 96px; bottom: 34px; display: flex; justify-content: space-between; font-size: 13px; color: var(--text3); }
|
||||
.foot4 b { color: var(--gold); font-weight: 600; }
|
||||
|
||||
/* the reveal: the game's own title, its glow, the two choices and the build in one row */
|
||||
.reveal { position: absolute; inset: 0; background: radial-gradient(1000px 620px at 50% 30%, #2a200f 0%, #120e09 48%, #070605 78%); }
|
||||
.rlogo { position: absolute; left: calc(50% - 300px); top: 46px; width: 600px; height: 462px; }
|
||||
.rlogo .aura { position: absolute; left: 50%; top: 50%; width: 1000px; height: 1000px; transform: translate(-50%, -50%);
|
||||
background: url(img/game/TitleLogoAura_00.png) center / contain no-repeat; mix-blend-mode: screen; opacity: .42;
|
||||
filter: sepia(1) saturate(2.4) hue-rotate(-8deg) blur(6px); -webkit-mask: radial-gradient(closest-side, #000 30%, transparent 100%); }
|
||||
.rlogo .glowl { position: absolute; inset: -6% -4%; background: url(img/game/Logo_GlowL_USEU_00.png) center / contain no-repeat; mix-blend-mode: screen; opacity: .55; }
|
||||
.rlogo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .8)); }
|
||||
.found4 { position: absolute; left: 0; right: 0; top: 500px; text-align: center; font-size: 15px; color: var(--text2); }
|
||||
.found4 b { color: var(--emerald); font-weight: 650; } .found4 em { font-style: normal; color: var(--text3); }
|
||||
.choices { position: absolute; left: 150px; right: 150px; top: 556px; display: grid; grid-template-columns: 1fr 1.6fr; border-top: 1px solid rgba(224,178,62,.35); border-bottom: 1px solid rgba(224,178,62,.35); }
|
||||
.choices > div { padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; }
|
||||
.choices > div + div { border-left: 1px solid var(--line-soft); }
|
||||
.choices label { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; font-weight: 600; font-size: 17px; color: var(--gold-hi); display: block; }
|
||||
.choices b { font-size: 15.5px; font-weight: 600; } .choices small { font-size: 12.5px; color: var(--text3); margin-left: 8px; }
|
||||
.choices .ch { font-size: 14px; font-weight: 600; color: var(--gold); }
|
||||
.buildrow { position: absolute; left: 0; right: 0; top: 678px; display: flex; justify-content: center; align-items: center; }
|
||||
.under { position: absolute; left: 0; right: 0; top: 752px; text-align: center; font-size: 13px; color: var(--text3); }
|
||||
Reference in New Issue
Block a user