rename attribute and fix parsing
This commit is contained in:
@@ -4,7 +4,7 @@ using System;
|
||||
using System.Linq;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEngine;
|
||||
using Utils = FlaxEditor.Utilities.Utils;
|
||||
using Utils = FlaxEngine.Utils;
|
||||
|
||||
namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
@@ -26,8 +26,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
|
||||
// Try get limit attribute for value min/max range setting and slider speed
|
||||
var attributes = Values.GetAttributes();
|
||||
var categoryAttribute = attributes.FirstOrDefault(x => x is ValueCategoryAttribute);
|
||||
var valueCategory = ((ValueCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None;
|
||||
var categoryAttribute = attributes.FirstOrDefault(x => x is NumberCategoryAttribute);
|
||||
var valueCategory = ((NumberCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None;
|
||||
if (attributes != null)
|
||||
{
|
||||
var limit = attributes.FirstOrDefault(x => x is LimitAttribute);
|
||||
|
||||
@@ -4,7 +4,7 @@ using System;
|
||||
using System.Linq;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEngine;
|
||||
using Utils = FlaxEditor.Utilities.Utils;
|
||||
using Utils = FlaxEngine.Utils;
|
||||
|
||||
namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
@@ -31,8 +31,8 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
|
||||
// Try get limit attribute for value min/max range setting and slider speed
|
||||
var attributes = Values.GetAttributes();
|
||||
var categoryAttribute = attributes.FirstOrDefault(x => x is ValueCategoryAttribute);
|
||||
var valueCategory = ((ValueCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None;
|
||||
var categoryAttribute = attributes.FirstOrDefault(x => x is NumberCategoryAttribute);
|
||||
var valueCategory = ((NumberCategoryAttribute)categoryAttribute)?.Category ?? Utils.ValueCategory.None;
|
||||
if (attributes != null)
|
||||
{
|
||||
var range = attributes.FirstOrDefault(x => x is RangeAttribute);
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using FlaxEditor.CustomEditors.Elements;
|
||||
using FlaxEngine;
|
||||
using FlaxEngine.GUI;
|
||||
using Utils = FlaxEditor.Utilities.Utils;
|
||||
using Utils = FlaxEngine.Utils;
|
||||
|
||||
namespace FlaxEditor.CustomEditors.Editors
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
if (attributes != null)
|
||||
{
|
||||
limit = (LimitAttribute)attributes.FirstOrDefault(x => x is LimitAttribute);
|
||||
var categoryAttribute = (ValueCategoryAttribute)attributes.FirstOrDefault(x => x is ValueCategoryAttribute);
|
||||
var categoryAttribute = (NumberCategoryAttribute)attributes.FirstOrDefault(x => x is NumberCategoryAttribute);
|
||||
if (categoryAttribute != null)
|
||||
category = categoryAttribute.Category;
|
||||
}
|
||||
@@ -261,7 +261,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
||||
if (attributes != null)
|
||||
{
|
||||
limit = (LimitAttribute)attributes.FirstOrDefault(x => x is LimitAttribute);
|
||||
var categoryAttribute = (ValueCategoryAttribute)attributes.FirstOrDefault(x => x is ValueCategoryAttribute);
|
||||
var categoryAttribute = (NumberCategoryAttribute)attributes.FirstOrDefault(x => x is NumberCategoryAttribute);
|
||||
if (categoryAttribute != null)
|
||||
category = categoryAttribute.Category;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user