@@ -153,7 +153,7 @@ public GameObject CreateContent(GameObject parent)
153
153
Rect . sizeDelta = new Vector2 ( 25 , 25 ) ;
154
154
UIFactory . SetLayoutElement ( UIRoot , minWidth : 100 , flexibleWidth : 9999 , minHeight : 25 , flexibleHeight : 0 ) ;
155
155
156
- var spacerObj = UIFactory . CreateUIObject ( "Spacer" , UIRoot , new Vector2 ( 0 , 0 ) ) ;
156
+ GameObject spacerObj = UIFactory . CreateUIObject ( "Spacer" , UIRoot , new Vector2 ( 0 , 0 ) ) ;
157
157
UIFactory . SetLayoutElement ( spacerObj , minWidth : 0 , flexibleWidth : 0 , minHeight : 0 , flexibleHeight : 0 ) ;
158
158
this . spacer = spacerObj . GetComponent < LayoutElement > ( ) ;
159
159
@@ -164,15 +164,20 @@ public GameObject CreateContent(GameObject parent)
164
164
165
165
// Enabled toggle
166
166
167
- var toggleObj = UIFactory . CreateToggle ( UIRoot , "BehaviourToggle" , out EnabledToggle , out var behavText , default , 17 , 17 ) ;
167
+ GameObject toggleObj = UIFactory . CreateToggle ( UIRoot , "BehaviourToggle" , out EnabledToggle , out Text behavText , default , 17 , 17 ) ;
168
168
UIFactory . SetLayoutElement ( toggleObj , minHeight : 17 , flexibleHeight : 0 , minWidth : 17 ) ;
169
169
EnabledToggle . onValueChanged . AddListener ( OnEnableClicked ) ;
170
170
171
171
// Name button
172
172
173
- NameButton = UIFactory . CreateButton ( this . UIRoot , "NameButton" , "Name" , null ) ;
173
+ GameObject nameBtnHolder = UIFactory . CreateHorizontalGroup ( this . UIRoot , "NameButtonHolder" ,
174
+ false , false , true , true , childAlignment : TextAnchor . MiddleLeft ) ;
175
+ UIFactory . SetLayoutElement ( nameBtnHolder , flexibleWidth : 9999 , minHeight : 25 , flexibleHeight : 0 ) ;
176
+ nameBtnHolder . AddComponent < Mask > ( ) . showMaskGraphic = false ;
177
+
178
+ NameButton = UIFactory . CreateButton ( nameBtnHolder , "NameButton" , "Name" , null ) ;
174
179
UIFactory . SetLayoutElement ( NameButton . Component . gameObject , flexibleWidth : 9999 , minHeight : 25 , flexibleHeight : 0 ) ;
175
- var nameLabel = NameButton . Component . GetComponentInChildren < Text > ( ) ;
180
+ Text nameLabel = NameButton . Component . GetComponentInChildren < Text > ( ) ;
176
181
nameLabel . horizontalOverflow = HorizontalWrapMode . Overflow ;
177
182
nameLabel . alignment = TextAnchor . MiddleLeft ;
178
183
@@ -181,7 +186,7 @@ public GameObject CreateContent(GameObject parent)
181
186
SiblingIndex = UIFactory . CreateInputField ( this . UIRoot , "SiblingIndexInput" , string . Empty ) ;
182
187
SiblingIndex . Component . textComponent . fontSize = 11 ;
183
188
SiblingIndex . Component . textComponent . alignment = TextAnchor . MiddleRight ;
184
- var siblingImage = SiblingIndex . GameObject . GetComponent < Image > ( ) ;
189
+ Image siblingImage = SiblingIndex . GameObject . GetComponent < Image > ( ) ;
185
190
siblingImage . color = new ( 0f , 0f , 0f , 0.25f ) ;
186
191
UIFactory . SetLayoutElement ( SiblingIndex . GameObject , 35 , 20 , 0 , 0 ) ;
187
192
SiblingIndex . Component . GetOnEndEdit ( ) . AddListener ( OnSiblingIndexEndEdit ) ;
0 commit comments