Merge pull request #540 from DanielNoord/jscolorfix

Fixed JSColor display not updating #539
This commit is contained in:
DanielNoord
2021-01-30 11:36:00 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -3322,7 +3322,7 @@ CM.Disp.CreatePrefOption = function(config) {
input.style.width = '65px';
input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]);
innerDiv.appendChild(input);
let change = function() {CM.Options.Colors[this.targetElement.id] = this.toHEXString(); CM.Disp.UpdateColors(); CM.Config.SaveConfig();};
let change = function() {CM.Options.Colors[this.targetElement.id] = this.toHEXString(); CM.Disp.UpdateColors(); CM.Config.SaveConfig(); Game.UpdateMenu();};
let picker = new JSColor(input, {hash: true, position: "right", onInput: change})
var label = document.createElement('label');
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];

View File

@@ -2110,7 +2110,7 @@ CM.Disp.CreatePrefOption = function(config) {
input.style.width = '65px';
input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]);
innerDiv.appendChild(input);
let change = function() {CM.Options.Colors[this.targetElement.id] = this.toHEXString(); CM.Disp.UpdateColors(); CM.Config.SaveConfig();};
let change = function() {CM.Options.Colors[this.targetElement.id] = this.toHEXString(); CM.Disp.UpdateColors(); CM.Config.SaveConfig(); Game.UpdateMenu();};
let picker = new JSColor(input, {hash: true, position: "right", onInput: change})
var label = document.createElement('label');
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];