Fixes for dropdown and slider entries to settings

This commit is contained in:
Pyro Nicampt committed 2026-04-19 14:33:56 -05:00
1 parent eed661e6d2
commit 8f7f5ae384
1 file changed
+2
+2
View File
@@ -371,6 +371,7 @@ function addSettingEntry(thisSetting, parent, indent=0){
if(inputEntry == thisSetting.state) optionElement.selected = true;
thisSetting.inputElement.appendChild(optionElement);
}
if(thisSetting.state) thisSetting.inputElement.value = thisSetting.state;
if(thisSetting.func){
thisSetting.inputElement.addEventListener('change', e =>{
thisSetting.func(e.target.value);
@@ -385,6 +386,7 @@ function addSettingEntry(thisSetting, parent, indent=0){
thisSetting.inputElement.min = thisSetting.min ?? 0;
thisSetting.inputElement.max = thisSetting.max ?? 100;
thisSetting.inputElement.step = thisSetting.step ?? 1;
thisSetting.inputElement.value = thisSetting.state ?? 0;
if(thisSetting.func){
thisSetting.inputElement.addEventListener('input', e => {
thisSetting.func(e.target.value);