Remove some old stuff; stub out replay progress bar

This commit is contained in:
Eevee (Evelyn Woods) 2020-12-11 21:40:40 -07:00
parent fec09c03ba
commit fde7d9a11c
3 changed files with 16 additions and 39 deletions

View File

@ -228,8 +228,12 @@
edit manually? edit manually?
--> -->
<div id="player-debug-input"></div> <div id="player-debug-input"></div>
<p id="player-debug-demo-progress"></p> <p id="player-debug-demo-playback">
<div class="input"></div> <progress max="0" value="0"></progress>
<output>100%</output>
of
<span>0 tics (0:00s)</span>
</p>
<h3>Options</h3> <h3>Options</h3>
<p>Viewport size: <p>Viewport size:

View File

@ -275,7 +275,6 @@ class Player extends PrimaryView {
this.time_el = this.root.querySelector('.time output'); this.time_el = this.root.querySelector('.time output');
this.bonus_el = this.root.querySelector('.bonus output'); this.bonus_el = this.root.querySelector('.bonus output');
this.inventory_el = this.root.querySelector('.inventory'); this.inventory_el = this.root.querySelector('.inventory');
this.input_el = this.root.querySelector('.input');
this.demo_el = this.root.querySelector('.demo'); this.demo_el = this.root.querySelector('.demo');
this.music_el = this.root.querySelector('#player-music'); this.music_el = this.root.querySelector('#player-music');
@ -604,15 +603,7 @@ class Player extends PrimaryView {
} }
}); });
// Populate input debugger
this.debug = { enabled: false }; 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._advance_bound = this.advance.bind(this);
this._redraw_bound = this.redraw.bind(this); this._redraw_bound = this.redraw.bind(this);
@ -1200,10 +1191,6 @@ class Player extends PrimaryView {
this.current_toolbelt[i] = tool; 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) { if (this.debug.enabled) {
let t = this.level.tic_counter; let t = this.level.tic_counter;
this.debug.time_tics_el.textContent = `${t}`; this.debug.time_tics_el.textContent = `${t}`;

View File

@ -953,33 +953,19 @@ dl.score-chart .-sum {
#player-debug-input > svg.--held { #player-debug-input > svg.--held {
fill: white; fill: white;
} }
.input { #player-debug-demo-playback {
display: grid; display: flex;
/* TODO finish this later */
display: none; 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 { #player-debug-demo-playback progress {
padding: 0.25em; flex: 1;
line-height: 1;
color: #fff4;
background: #202020;
} }
.input-action[data-action=up] { grid-area: up; } #player-debug-demo-playback output {
.input-action[data-action=down] { grid-area: down; } width: 4em;
.input-action[data-action=left] { grid-area: left; } }
.input-action[data-action=right] { grid-area: right; } #player-debug-demo-playback span {
.input-action[data-action=swap] { grid-area: swap; } flex: none;
.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%);
} }