@@ -16,15 +16,15 @@ public class TransformCell : ICell
16
16
{
17
17
public float DefaultHeight => 25f ;
18
18
19
- public bool Enabled => m_enabled ;
20
- private bool m_enabled ;
19
+ public bool Enabled => enabled ;
20
+ private bool enabled ;
21
21
22
22
public Action < CachedTransform > OnExpandToggled ;
23
23
public Action < CachedTransform > OnEnableToggled ;
24
24
public Action < GameObject > OnGameObjectClicked ;
25
25
26
26
public CachedTransform cachedTransform ;
27
- public int _cellIndex ;
27
+ public int cellIndex ;
28
28
29
29
public GameObject UIRoot { get ; set ; }
30
30
public RectTransform Rect { get ; set ; }
@@ -37,13 +37,13 @@ public class TransformCell : ICell
37
37
38
38
public void Enable ( )
39
39
{
40
- m_enabled = true ;
40
+ enabled = true ;
41
41
UIRoot . SetActive ( true ) ;
42
42
}
43
43
44
44
public void Disable ( )
45
45
{
46
- m_enabled = false ;
46
+ enabled = false ;
47
47
UIRoot . SetActive ( false ) ;
48
48
}
49
49
@@ -58,14 +58,17 @@ public void ConfigureCell(CachedTransform cached, int cellIndex)
58
58
if ( ! Enabled )
59
59
Enable ( ) ;
60
60
61
- _cellIndex = cellIndex ;
61
+ this . cellIndex = cellIndex ;
62
62
cachedTransform = cached ;
63
63
64
64
spacer . minWidth = cached . Depth * 15 ;
65
65
66
66
if ( cached . Value )
67
67
{
68
- NameButton . ButtonText . text = cached . Value . name ;
68
+ string name = cached . Value . name ? . Trim ( ) ;
69
+ if ( string . IsNullOrEmpty ( name ) )
70
+ name = "<i><color=grey>untitled</color></i>" ;
71
+ NameButton . ButtonText . text = name ;
69
72
NameButton . ButtonText . color = cached . Value . gameObject . activeSelf ? Color . white : Color . grey ;
70
73
71
74
EnabledToggle . Set ( cached . Value . gameObject . activeSelf , false ) ;
0 commit comments