Skip to content

Commit

Permalink
Merge pull request #8 from jggoebel/fix-7
Browse files Browse the repository at this point in the history
Disable input during 3 second wait time
  • Loading branch information
jggoebel authored Sep 9, 2024
2 parents b5afbc2 + a5d5aa2 commit e1144dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/terminals/bashbrawl/bashbrawlterminal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class BashbrawlterminalComponent implements OnInit, AfterViewInit {
public mutationObserver: MutationObserver;

private command = '';
private commandFn: (command: string, params: string) => void =
private commandFn: (command: string, params: string) => Promise<void> =
this.menuCommandsFn;
private inputFn: (command: string) => void = this.handleCommandWithNewline;
private cursorPosition = 0;
Expand Down Expand Up @@ -262,7 +262,7 @@ export class BashbrawlterminalComponent implements OnInit, AfterViewInit {

async confirmBeginGameFn() {
this.input_blocked = true;
this.beginGame();
await this.beginGame();
}

async beginGame() {
Expand Down Expand Up @@ -377,7 +377,6 @@ export class BashbrawlterminalComponent implements OnInit, AfterViewInit {

await this.writeDelayed('Enter your name:', true);
this.terminalSymbol = 'Name:';
this.term.write(` ${this.terminalSymbol} `);

this.commandFn = this.enterNameForLeaderboard;
this.input_blocked = false;
Expand Down Expand Up @@ -750,7 +749,7 @@ export class BashbrawlterminalComponent implements OnInit, AfterViewInit {
this.input_blocked = true;
this.interrupted = false;

this.commandFn(command, params);
await this.commandFn(command, params);

this.term.write(` ${this.terminalSymbol} `);
this.interrupted = false;
Expand Down

0 comments on commit e1144dc

Please sign in to comment.