Skip to content

Commit

Permalink
show cp hidden option
Browse files Browse the repository at this point in the history
  • Loading branch information
fohristiwhirl committed Jun 23, 2019
1 parent 0d58be8 commit b05bc14
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion 80_info.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,19 @@ function NewInfoHandler() {

let info = info_list[i];

let value_string = "?";
if (config.show_cp) {
value_string = info.cp.toString();
if (info.cp > 0) {
value_string = "+" + value_string;
}
} else {
value_string = info.value_string(1);
}

new_elements.push({
class: "blue",
text: `${info.value_string(1)} `,
text: value_string + " ",
});

let colour = active_colour;
Expand Down
3 changes: 2 additions & 1 deletion config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
"terrible_move_threshold": 0.04,
"uncertainty_cutoff": 0.1,
"arrowhead_type": 0,
"show_cp": false,
"show_n": true,
"show_p": true,
"show_u": false,
"show_u": true,
"max_info_lines": 10,
"update_delay": 170,
"search_nodes": "infinite",
Expand Down
1 change: 1 addition & 0 deletions modules/load_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function apply_defaults(o) {
"terrible_move_threshold": 0.04,
"uncertainty_cutoff": 0.1,
"arrowhead_type": 0,
"show_cp": false,
"show_n": true,
"show_p": true,
"show_u": true,
Expand Down

0 comments on commit b05bc14

Please sign in to comment.