Merge pull request #60 from Akeit0/support2021

Fix: wrong type conversion
This commit is contained in:
Annulus Games 2024-03-04 23:42:16 +09:00 committed by GitHub
commit bcaeef5ea9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -133,8 +133,8 @@ namespace Alchemy.Editor.Elements
control.value = (long)value; control.value = (long)value;
control.RegisterValueChangedCallback(x => control.RegisterValueChangedCallback(x =>
{ {
var newValue = (long)Math.Clamp(control.value, 0, long.MaxValue); var newValue = Math.Clamp(control.value, 0, long.MaxValue);
OnValueChanged?.Invoke(newValue); OnValueChanged?.Invoke((ulong)newValue);
control.value = newValue; control.value = newValue;
}); });