diff --git a/AvocadoAmber/classes/setting/setting.class.php b/AvocadoAmber/classes/setting/setting.class.php index 0743dd3..6638254 100644 --- a/AvocadoAmber/classes/setting/setting.class.php +++ b/AvocadoAmber/classes/setting/setting.class.php @@ -97,6 +97,15 @@ class Setting case "radius": $this->addRadiusSetting($set["desc"], array_key_exists("default", $set) ? (is_array($set["default"]) ? $set["default"] : []) : []); break; + case "margin": + $this->addMarginSetting($set["desc"], array_key_exists("default", $set) ? (is_array($set["default"]) ? $set["default"] : []) : []); + break; + case "font": + $this->addFontSetting($set["desc"], array_key_exists("default", $set) ? (is_array($set["default"]) ? $set["default"] : "") : []); + break; + case "fontsize": + $this->addFontSizeSetting($set["desc"], array_key_exists("default", $set) ? (is_array($set["default"]) ? $set["default"] : "16") : []); + break; } } @@ -253,6 +262,34 @@ class Setting $this->is_value_added = true; } + public function addFontSetting($desc, $default, $placeholder = "") + { + $idx = $this->getCurrentCount() + 1; + if ($idx <= 20) { + $key1 = "cs_etc_{$idx}"; + $val = $this->$key1 ? $this->$key1 : (isset($default) ? $default : ""); + + $this->settings[] = [ + "type" => "font", + "html" => "