Skip to content

Commit 48a79ad

Browse files
committed
save and load settings from original setting core
1 parent 1fb0738 commit 48a79ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/com/lambda/config/Setting.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ class Setting<T : SettingCore<R>, R : Any>(
182182
fun ImGuiBuilder.buildLayout() = with(core) { buildLayout() }
183183
fun CommandBuilder.buildCommand(registry: CommandRegistryAccess) = with(core) { buildCommand(registry) }
184184

185-
fun toJson() = core.toJson()
186-
fun loadFromJson(serialized: JsonElement) = core.loadFromJson(serialized)
185+
fun toJson() = originalCore.toJson()
186+
fun loadFromJson(serialized: JsonElement) = originalCore.loadFromJson(serialized)
187187

188188
class ValueListener<T>(val requiresValueChange: Boolean, val execute: (from: T, to: T) -> Unit)
189189

0 commit comments

Comments
 (0)