Remove some old stuff; stub out replay progress bar
This commit is contained in:
parent
fec09c03ba
commit
fde7d9a11c
@ -228,8 +228,12 @@
|
||||
edit manually?
|
||||
-->
|
||||
<div id="player-debug-input"></div>
|
||||
<p id="player-debug-demo-progress"></p>
|
||||
<div class="input"></div>
|
||||
<p id="player-debug-demo-playback">
|
||||
<progress max="0" value="0"></progress>
|
||||
<output>100%</output>
|
||||
of
|
||||
<span>0 tics (0:00s)</span>
|
||||
</p>
|
||||
|
||||
<h3>Options</h3>
|
||||
<p>Viewport size:
|
||||
|
||||
13
js/main.js
13
js/main.js
@ -275,7 +275,6 @@ class Player extends PrimaryView {
|
||||
this.time_el = this.root.querySelector('.time output');
|
||||
this.bonus_el = this.root.querySelector('.bonus output');
|
||||
this.inventory_el = this.root.querySelector('.inventory');
|
||||
this.input_el = this.root.querySelector('.input');
|
||||
this.demo_el = this.root.querySelector('.demo');
|
||||
|
||||
this.music_el = this.root.querySelector('#player-music');
|
||||
@ -604,15 +603,7 @@ class Player extends PrimaryView {
|
||||
}
|
||||
});
|
||||
|
||||
// Populate input debugger
|
||||
this.debug = { enabled: false };
|
||||
this.input_el = this.root.querySelector('.input');
|
||||
this.input_action_elements = {};
|
||||
for (let [action, label] of Object.entries(ACTION_LABELS)) {
|
||||
let el = mk('span.input-action', {'data-action': action}, label);
|
||||
this.input_el.append(el);
|
||||
this.input_action_elements[action] = el;
|
||||
}
|
||||
|
||||
this._advance_bound = this.advance.bind(this);
|
||||
this._redraw_bound = this.redraw.bind(this);
|
||||
@ -1200,10 +1191,6 @@ class Player extends PrimaryView {
|
||||
this.current_toolbelt[i] = tool;
|
||||
}
|
||||
|
||||
for (let action of Object.keys(ACTION_LABELS)) {
|
||||
this.input_action_elements[action].classList.toggle('--pressed', this.previous_input.has(action));
|
||||
}
|
||||
|
||||
if (this.debug.enabled) {
|
||||
let t = this.level.tic_counter;
|
||||
this.debug.time_tics_el.textContent = `${t}`;
|
||||
|
||||
34
style.css
34
style.css
@ -953,33 +953,19 @@ dl.score-chart .-sum {
|
||||
#player-debug-input > svg.--held {
|
||||
fill: white;
|
||||
}
|
||||
.input {
|
||||
display: grid;
|
||||
#player-debug-demo-playback {
|
||||
display: flex;
|
||||
/* TODO finish this later */
|
||||
display: none;
|
||||
grid:
|
||||
"drop up cycle" 1.5em
|
||||
"left swap right" 1.5em
|
||||
". down . " 1.5em
|
||||
/ 1.5em 1.5em 1.5em
|
||||
;
|
||||
gap: 0.5em;
|
||||
}
|
||||
.input-action {
|
||||
padding: 0.25em;
|
||||
line-height: 1;
|
||||
color: #fff4;
|
||||
background: #202020;
|
||||
#player-debug-demo-playback progress {
|
||||
flex: 1;
|
||||
}
|
||||
.input-action[data-action=up] { grid-area: up; }
|
||||
.input-action[data-action=down] { grid-area: down; }
|
||||
.input-action[data-action=left] { grid-area: left; }
|
||||
.input-action[data-action=right] { grid-area: right; }
|
||||
.input-action[data-action=swap] { grid-area: swap; }
|
||||
.input-action[data-action=cycle] { grid-area: cycle; }
|
||||
.input-action[data-action=drop] { grid-area: drop; }
|
||||
.input-action.--pressed {
|
||||
color: white;
|
||||
background: hsl(225, 75%, 25%);
|
||||
#player-debug-demo-playback output {
|
||||
width: 4em;
|
||||
}
|
||||
#player-debug-demo-playback span {
|
||||
flex: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user