diff --git a/Source/Editor/GUI/EnumComboBox.cs b/Source/Editor/GUI/EnumComboBox.cs index 34a2dae35..ed1c80cd6 100644 --- a/Source/Editor/GUI/EnumComboBox.cs +++ b/Source/Editor/GUI/EnumComboBox.cs @@ -29,7 +29,7 @@ namespace FlaxEditor.GUI /// /// The cached value from the UI. /// - protected ulong _cachedValue; + protected long _cachedValue; /// /// True if has value cached, otherwise false. @@ -54,7 +54,7 @@ namespace FlaxEditor.GUI /// /// The value. /// - public ulong Value; + public long Value; /// /// Initializes a new instance of the struct. @@ -62,7 +62,7 @@ namespace FlaxEditor.GUI /// The name. /// The tooltip. /// The value. - public Entry(string name, ulong value, string tooltip = null) + public Entry(string name, long value, string tooltip = null) { Name = name; Tooltip = tooltip; @@ -88,13 +88,13 @@ namespace FlaxEditor.GUI public object EnumTypeValue { get => Enum.ToObject(_enumType, Value); - set => Value = Convert.ToUInt64(value); + set => Value = Convert.ToInt64(value); } /// /// Gets or sets the value. /// - public ulong Value + public long Value { get => _cachedValue; set @@ -209,7 +209,7 @@ namespace FlaxEditor.GUI /// protected void CacheValue() { - ulong value = 0; + long value = 0; if (IsFlags) { var selection = Selection; @@ -276,7 +276,7 @@ namespace FlaxEditor.GUI tooltip = tooltipAttr.Text; } - entries.Add(new Entry(name, Convert.ToUInt64(field.GetRawConstantValue()), tooltip)); + entries.Add(new Entry(name, Convert.ToInt64(field.GetRawConstantValue()), tooltip)); } } @@ -295,9 +295,9 @@ namespace FlaxEditor.GUI } // Calculate value that will be set after change - ulong valueAfter = 0; + long valueAfter = 0; bool isSelected = _selectedIndices.Contains(index); - ulong selectedValue = entries[index].Value; + long selectedValue = entries[index].Value; for (int i = 0; i < _selectedIndices.Count; i++) { int selectedIndex = _selectedIndices[i]; diff --git a/Source/Editor/Surface/Elements/EnumValue.cs b/Source/Editor/Surface/Elements/EnumValue.cs index a66031f35..dbd1620ab 100644 --- a/Source/Editor/Surface/Elements/EnumValue.cs +++ b/Source/Editor/Surface/Elements/EnumValue.cs @@ -32,7 +32,7 @@ namespace FlaxEditor.Surface.Elements Width = archetype.Size.X; ParentNode = parentNode; Archetype = archetype; - Value = (ulong)(int)ParentNode.Values[Archetype.ValueIndex]; + Value = (int)ParentNode.Values[Archetype.ValueIndex]; } ///