Skip to content

Commit

Permalink
Update 95_renderer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed May 12, 2020
1 parent 289b113 commit d97faa2
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions 95_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ function NewRenderer() {
// drawing the infobox for real, we'll need to flash it up in the status box instead...

if (this.info_handler.ever_received_info) {
this.info_handler.set_special_message(s, "red");
this.set_special_message(s, "red");
}
this.info_handler.err_receive(s);

Expand Down Expand Up @@ -687,8 +687,7 @@ function NewRenderer() {
val = "";
}
let sent = this.engine.setoption(name, val);
this.info_handler.set_special_message(sent, "blue");
this.draw_statusbox() // Just to make the message show up instantly
this.set_special_message(sent, "blue");
this.go_or_halt();
};

Expand Down Expand Up @@ -763,9 +762,9 @@ function NewRenderer() {
let ack_type = special_flag ? "ack_special_node_limit" : "ack_node_limit";

if (val) {
this.info_handler.set_special_message(`${msg_start} now ${CommaNum(val)}`, "blue");
this.set_special_message(`${msg_start} now ${CommaNum(val)}`, "blue");
} else {
this.info_handler.set_special_message(`${msg_start} removed!`, "blue");
this.set_special_message(`${msg_start} removed!`, "blue");
}

this.draw_statusbox() // Just to make the message show up instantly
Expand Down Expand Up @@ -1603,6 +1602,11 @@ function NewRenderer() {
this.hoverdraw_div);
};

renderer.set_special_message = function(s, css_class) {
this.info_handler.set_special_message(s, css_class);
this.draw_statusbox()
};

renderer.spin = function() {
this.tick++;
this.draw();
Expand Down

0 comments on commit d97faa2

Please sign in to comment.