//********************************** Banshee Engine (www.banshee3d.com) **************************************************// //**************** Copyright (c) 2016 Marko Pintera (marko.pintera@gmail.com). All rights reserved. **********************// using BansheeEngine; namespace BansheeEditor { /// /// Contains style information about inspectable items. /// public abstract class InspectableFieldStyle { /// /// Creates all the relevant style information for a SerializableField. /// /// Field to create the style info structure for. /// Style information retrieved from the field. public static InspectableFieldStyleInfo Create(SerializableField field) { SerializableFieldStyle style = field.Style; var styleInfo = new InspectableFieldStyleInfo(); styleInfo.RangeStyle = style.HasRange ? new InspectableFieldRangeStyle(style.RangeMin, style.RangeMax, style.DisplayAsSlider) : null; styleInfo.StepStyle = style.HasStep ? new InspectableFieldStepStyle(style.StepIncrement) : null; return styleInfo; } } }