修复'再来一局'进错模式:b-again/b-restart改用刚结束局自身的mode/ship/diff重开(原读SETUP.mode,玩过无尽后SETUP漂移导致闯关/rush死了都进无尽);rush局重开回同一Boss。大厅布局:排行榜上移flex:1撑满、进入基地/登出沉底、面板按钮全半透明露出背后模拟战。playwright回归:stage/endless/rush三模式再来一局全部正确,布局层级与半透明断言通过
This commit is contained in:
parent
4b9ee4e439
commit
2cea368db6
@ -128,7 +128,10 @@ h1.logo{font-size:clamp(20px,5.4vw,44px);color:#fff;letter-spacing:4px;line-heig
|
||||
.auth-f .btn{width:100%;min-width:0;margin-top:2px}
|
||||
/* ---------- 飞行员大厅 ---------- */
|
||||
#o-home{background:rgba(4,7,16,.42);justify-content:flex-start;gap:8px;overflow-y:auto}
|
||||
#o-home .lb{width:min(94%,430px);flex:1;min-height:0;display:flex;flex-direction:column;background:var(--panel);border:3px solid var(--line);padding:10px 10px 8px;margin-bottom:2%}
|
||||
#o-home .lb{width:min(94%,430px);flex:1;min-height:0;display:flex;flex-direction:column;background:rgba(11,18,38,.55);border:3px solid var(--line);padding:10px 10px 8px}
|
||||
#o-home .btn{background:rgba(16,26,51,.55)}
|
||||
#o-home .btn.primary{background:rgba(65,230,255,.68)}
|
||||
#o-home .lb-tabs button{background:rgba(16,26,51,.5)}
|
||||
.lb-tabs{display:flex;gap:6px;justify-content:center;margin:6px 0 8px}
|
||||
.lb-tabs button{font:inherit;font-size:clamp(7px,1.3vw,9px);background:var(--panel2);color:var(--dim);
|
||||
border:2px solid var(--line);padding:6px 10px;cursor:pointer;letter-spacing:1px}
|
||||
|
||||
@ -45,10 +45,6 @@
|
||||
<div class="ovl hide" id="o-home">
|
||||
<div class="h2" style="margin-top:2%">— 飞行员大厅 —</div>
|
||||
<div class="h3" id="home-stats"> </div>
|
||||
<div class="row">
|
||||
<button class="btn primary" id="b-base" style="min-width:min(56vw,200px)">▶ 进入基地</button>
|
||||
<button class="btn" id="b-logout" style="min-width:0">登出</button>
|
||||
</div>
|
||||
<div class="lb">
|
||||
<div class="h3" style="color:var(--cyan);letter-spacing:3px">— 全服排行榜 TOP 100 —</div>
|
||||
<div class="lb-tabs">
|
||||
@ -59,6 +55,10 @@
|
||||
<div class="lb-row lb-head"><span>#</span><span>飞行员</span><span>击坠</span><span>图鉴</span><span>无尽最高</span></div>
|
||||
<div class="lb-list" id="lb-list"></div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom:2%">
|
||||
<button class="btn primary" id="b-base" style="min-width:min(56vw,200px)">▶ 进入基地</button>
|
||||
<button class="btn" id="b-logout" style="min-width:0">登出</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 标题 -->
|
||||
|
||||
@ -19,9 +19,16 @@ $("b-back5").onclick=exitDemoSim;
|
||||
$("b-start").onclick=()=>startGame();
|
||||
if("ontouchstart" in window){const pb=$("tb-pause");pb.style.display="block";pb.onclick=()=>togglePause();}
|
||||
$("b-resume").onclick=()=>togglePause();
|
||||
$("b-restart").onclick=()=>{show("");if(G&&G.mode==="rush")startRush(G.rushIdx);else startGame();}; // Boss挑战重开仍在挑战模式
|
||||
$("b-restart").onclick=()=>{show("");restartSameRun();};
|
||||
$("b-quit").onclick=()=>{bank();G=null;MUS.stop();UI="title";bestLine();show("o-title");};
|
||||
$("b-again").onclick=()=>startGame();
|
||||
/* 再来一局:按刚结束那一局自己的 mode/ship/diff 重开(修复 SETUP 漂移导致进错模式,如 rush/闯关死后进了无尽) */
|
||||
function restartSameRun(){
|
||||
if(!G){startGame();return;}
|
||||
if(G.mode==="rush"){startRush(G.rushIdx);return;}
|
||||
SETUP.mode=G.mode;SETUP.ship=G.ship;SETUP.diff=G.diff;
|
||||
startGame();
|
||||
}
|
||||
$("b-again").onclick=()=>restartSameRun();
|
||||
$("b-home").onclick=()=>{G=null;UI="title";bestLine();show("o-title");};
|
||||
$("mode-pick").addEventListener("click",e=>{
|
||||
const c=e.target.closest(".pcard");if(!c)return;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user