Merge pull request #540 from DanielNoord/jscolorfix
Fixed JSColor display not updating #539
This commit is contained in:
@@ -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]];
|
||||||
|
|||||||
@@ -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]];
|
||||||
|
|||||||
Reference in New Issue
Block a user