Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
rooklift committed May 5, 2024
1 parent 09fc454 commit 1c5d32e
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions files/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function startup() {
break;

case "tempdecaymoves": // Not so sketchy because it should be a string of an integer.
set_checks("Play", "TempDecayMoves", msg.val === "0" ? "Infinite" : msg.val);
set_checks("Play", "Temp Decay Moves", msg.val === "0" ? "Infinite" : msg.val);
break;

case "contemptmode": // All the menu items are different from the UCI values...
Expand All @@ -287,6 +287,10 @@ function startup() {
set_checks("Engine", "WDL Calibration Elo", msg.val === "0" ? "Use default WDL" : msg.val);
break;

case "scoretype":
set_checks("Engine", "Score Type", msg.val);
break;

}

});
Expand Down Expand Up @@ -3656,6 +3660,35 @@ function menu_build() {
},
]
},
{
label: "Score Type",
submenu: [
{
label: "WDL_mu",
type: "checkbox",
checked: false,
click: () => {
win.webContents.send("call", {
fn: "set_uci_option_permanent",
args: ["ScoreType", "WDL_mu"]
});
// Will receive an ack IPC which sets menu checks.
}
},
{
label: "centipawn",
type: "checkbox",
checked: false,
click: () => {
win.webContents.send("call", {
fn: "set_uci_option_permanent",
args: ["ScoreType", "centipawn"]
});
// Will receive an ack IPC which sets menu checks.
}
}
]
},
{
type: "separator"
},
Expand Down Expand Up @@ -4017,7 +4050,7 @@ function menu_build() {
]
},
{
label: "TempDecayMoves",
label: "Temp Decay Moves",
submenu: [
{
label: "Infinite",
Expand Down

0 comments on commit 1c5d32e

Please sign in to comment.