Merge pull request #540 from DanielNoord/jscolorfix

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

No files matched your search

+1 -1
View File
@@ -3322,7 +3322,7 @@ CM.Disp.CreatePrefOption = function(config) {
input.style.width = '65px'; input.style.width = '65px';
input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]); input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]);
innerDiv.appendChild(input); 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}) let picker = new JSColor(input, {hash: true, position: "right", onInput: change})
var label = document.createElement('label'); var label = document.createElement('label');
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]]; label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];
+1 -1
View File
@@ -2110,7 +2110,7 @@ CM.Disp.CreatePrefOption = function(config) {
input.style.width = '65px'; input.style.width = '65px';
input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]); input.setAttribute('value', CM.Options.Colors[CM.Disp.colors[i]]);
innerDiv.appendChild(input); 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}) let picker = new JSColor(input, {hash: true, position: "right", onInput: change})
var label = document.createElement('label'); var label = document.createElement('label');
label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]]; label.textContent = CM.ConfigData.Colors.desc[CM.Disp.colors[i]];