From ea85c71523fbf5145b4a8f9becb7ef59f57dfe4e Mon Sep 17 00:00:00 2001 From: Ralty <78720179+Raltyro@users.noreply.github.com> Date: Sat, 26 Jul 2025 19:11:18 +0700 Subject: [PATCH] please actions --- source/funkin/options/type/Checkbox.hx | 3 ++- source/funkin/options/type/NumOption.hx | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/funkin/options/type/Checkbox.hx b/source/funkin/options/type/Checkbox.hx index 0659314a..5241686c 100644 --- a/source/funkin/options/type/Checkbox.hx +++ b/source/funkin/options/type/Checkbox.hx @@ -37,7 +37,8 @@ class Checkbox extends TextOption { __text.x = 100; var fieldValue = Reflect.field(parent, optionName); - checked = fieldValue != null ? fieldValue : false; + if (optionName != null) checked = Reflect.field(parent, optionName); + else checked = false; } public var firstFrame:Bool = true; diff --git a/source/funkin/options/type/NumOption.hx b/source/funkin/options/type/NumOption.hx index a98ac732..6590afd9 100644 --- a/source/funkin/options/type/NumOption.hx +++ b/source/funkin/options/type/NumOption.hx @@ -31,8 +31,7 @@ class NumOption extends TextOption { this.optionName = optionName; this.parent = parent = parent != null ? parent : Options; - var fieldValue = Reflect.field(parent, optionName); - currentSelection = fieldValue != null ? fieldValue : 0; + if (Reflect.field(parent, optionName) != null) currentSelection = Reflect.field(parent, optionName); __number = new Alphabet(0, 20, ': $currentSelection', 'bold'); super(text, desc);