diff --git a/loader/include/Geode/loader/Setting.hpp b/loader/include/Geode/loader/Setting.hpp index 3ae2ef7b..cc5f4f23 100644 --- a/loader/include/Geode/loader/Setting.hpp +++ b/loader/include/Geode/loader/Setting.hpp @@ -1,4 +1,5 @@ #pragma once + #include "SettingV3.hpp" namespace geode { @@ -26,9 +27,6 @@ namespace geode { using SettingNodeSizeChangeEvent = SettingNodeSizeChangeEventV3; using SettingNodeValueChangeEvent = SettingNodeValueChangeEventV3; - template - using SettingTypeForValueType = SettingTypeForValueTypeV3; - template EventListener* listenForSettingChanges(std::string_view settingKey, Lambda&& callback, Mod* mod = getMod()) { return listenForSettingChangesV3(settingKey, std::forward(callback), mod); @@ -45,4 +43,4 @@ namespace geode { ) { return listenForAllSettingChangesV3(callback, mod); } -} \ No newline at end of file +} diff --git a/loader/include/Geode/loader/SettingV3.hpp b/loader/include/Geode/loader/SettingV3.hpp index b9e380c1..1c2cb7fa 100644 --- a/loader/include/Geode/loader/SettingV3.hpp +++ b/loader/include/Geode/loader/SettingV3.hpp @@ -694,45 +694,45 @@ namespace geode { }; template - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { static_assert( !std::is_same_v, - "specialize the SettingTypeForValueTypeV3 class to use Mod::getSettingValue for custom settings" + "specialize the SettingTypeForValueType class to use Mod::getSettingValue for custom settings" ); }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = BoolSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = IntSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = FloatSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = StringSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = FileSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = Color3BSettingV3; }; template <> - struct SettingTypeForValueTypeV3 { + struct SettingTypeForValueType { using SettingType = Color4BSettingV3; }; template EventListener* listenForSettingChangesV3(std::string_view settingKey, auto&& callback, Mod* mod = getMod()) { - using Ty = typename SettingTypeForValueTypeV3::SettingType; + using Ty = typename SettingTypeForValueType::SettingType; return new EventListener( [callback = std::move(callback)](std::shared_ptr setting) { if (auto ty = geode::cast::typeinfo_pointer_cast(setting)) {