コード例 #1
0
        /// <summary>
        /// Draws the property.
        /// </summary>
        protected override void DrawPropertyLayout(IPropertyValueEntry <ulong> entry, GUIContent label)
        {
            long value = SirenixEditorFields.LongField(label, (long)entry.SmartValue);

            if (value < 0)
            {
                value = 0;
            }

            entry.SmartValue = (ulong)value;
        }
コード例 #2
0
        /// <summary>
        /// Draws the property.
        /// </summary>
        protected override void DrawPropertyLayout(IPropertyValueEntry <uint> entry, GUIContent label)
        {
            long value = SirenixEditorFields.LongField(label, entry.SmartValue);

            if (value > uint.MaxValue)
            {
                value = uint.MaxValue;
            }
            else if (value < 0)
            {
                value = 0;
            }

            entry.SmartValue = (uint)value;
        }
コード例 #3
0
 protected override long DrawElement(Rect rect, long value)
 {
     return(SirenixEditorFields.LongField(rect.Padding(2), value));
 }
コード例 #4
0
 /// <summary>
 /// Draws the property.
 /// </summary>
 protected override void DrawPropertyLayout(IPropertyValueEntry <long> entry, GUIContent label)
 {
     entry.SmartValue = SirenixEditorFields.LongField(label, entry.SmartValue);
 }
コード例 #5
0
        /// <summary>
        /// Draws the property.
        /// </summary>
        protected override void DrawPropertyLayout(GUIContent label)
        {
            var entry = this.ValueEntry;

            entry.SmartValue = SirenixEditorFields.LongField(label, entry.SmartValue);
        }