Exemplo n.º 1
0
 private void DrawVariableNameEnterButton(ICacheEntry field)
 {
     if (GUILayout.Button(field.Name(), _alignedButtonStyle, _inspectorNameWidth))
     {
         var val = field.EnterValue();
         if (val != null)
         {
             _nextToPush = new InstanceStackEntry(val, field.Name());
         }
     }
 }
Exemplo n.º 2
0
        private void DrawVariableNameEnterButton(ICacheEntry field)
        {
            if (_alignedButtonStyle == null)
            {
                _alignedButtonStyle = new GUIStyle(GUI.skin.button)
                {
                    alignment = TextAnchor.MiddleLeft,
                    wordWrap  = true
                };
            }

            if (GUILayout.Button(field.Name(), _alignedButtonStyle, _inspectorNameWidth))
            {
                var val = field.EnterValue();
                if (val != null)
                {
                    var entry = val as InspectorStackEntryBase ?? new InstanceStackEntry(val, field.Name(), field);
                    Push(entry, IsContextClick());
                }
            }
        }