@@ -196,6 +196,8 @@ private void OnPathEndEdit(string input)
196
196
197
197
private void DoSetParent ( Transform transform )
198
198
{
199
+ ExplorerCore . Log ( $ "Setting target's transform parent to: { ( transform == null ? "null" : $ "'{ transform . name } '") } ") ;
200
+
199
201
if ( GOTarget . GetComponent < RectTransform > ( ) )
200
202
GOTarget . transform . SetParent ( transform , false ) ;
201
203
else
@@ -434,9 +436,10 @@ public void UpdateVectorSlider()
434
436
435
437
private void ConstructTopInfo ( )
436
438
{
437
- var topInfoHolder = UIFactory . CreateVerticalGroup ( Parent . UIRoot , "TopInfoHolder" , false , false , true , true , 3 ,
439
+ var topInfoHolder = UIFactory . CreateVerticalGroup ( Parent . Content , "TopInfoHolder" , false , false , true , true , 3 ,
438
440
new Vector4 ( 3 , 3 , 3 , 3 ) , new Color ( 0.1f , 0.1f , 0.1f ) , TextAnchor . MiddleLeft ) ;
439
- UIFactory . SetLayoutElement ( topInfoHolder , minHeight : 25 , flexibleWidth : 9999 ) ;
441
+ UIFactory . SetLayoutElement ( topInfoHolder , minHeight : 100 , flexibleWidth : 9999 ) ;
442
+ topInfoHolder . AddComponent < ContentSizeFitter > ( ) . verticalFit = ContentSizeFitter . FitMode . PreferredSize ;
440
443
441
444
// first row (parent, path)
442
445
@@ -449,11 +452,16 @@ private void ConstructTopInfo()
449
452
UIFactory . SetLayoutElement ( ViewParentButton . Component . gameObject , minHeight : 25 , minWidth : 100 ) ;
450
453
ViewParentButton . OnClick += OnViewParentClicked ;
451
454
452
- this . PathInput = UIFactory . CreateInputField ( firstRow , "PathInput" , "Enter a GameObject name or path ..." ) ;
455
+ this . PathInput = UIFactory . CreateInputField ( firstRow , "PathInput" , "..." ) ;
453
456
PathInput . Component . textComponent . color = Color . grey ;
457
+ PathInput . Component . textComponent . fontSize = 14 ;
454
458
UIFactory . SetLayoutElement ( PathInput . UIRoot , minHeight : 25 , minWidth : 100 , flexibleWidth : 9999 ) ;
455
459
PathInput . Component . lineType = InputField . LineType . MultiLineSubmit ;
456
460
461
+ //var pathApplyBtn = UIFactory.CreateButton(firstRow, "PathButton", "Set Parent Path", new Color(0.2f, 0.2f, 0.2f));
462
+ //UIFactory.SetLayoutElement(pathApplyBtn.Component.gameObject, minHeight: 25, minWidth: 120);
463
+ //pathApplyBtn.OnClick += () => { OnPathEndEdit(PathInput.Text); };
464
+
457
465
PathInput . Component . onEndEdit . AddListener ( ( string val ) => { OnPathEndEdit ( val ) ; } ) ;
458
466
459
467
// Title and update row
@@ -597,11 +605,14 @@ private static void GetHideFlagNames()
597
605
598
606
private void ConstructTransformControls ( )
599
607
{
600
- //var transformGroup = UIFactory.CreateUIObject("TransformGroup", UIRoot);
601
- //UIFactory.SetLayoutGroup<VerticalLayoutGroup>(transformGroup, false, false, true, true, 2, 2, 2);
602
- var transformGroup = UIFactory . CreateVerticalGroup ( Parent . UIRoot , "TransformControls" , false , false , true , true , 2 ,
608
+ var transformGroup = UIFactory . CreateVerticalGroup ( Parent . Content , "TransformControls" , false , false , true , true , 2 ,
603
609
new Vector4 ( 2 , 2 , 0 , 0 ) , new Color ( 0.1f , 0.1f , 0.1f ) ) ;
604
- UIFactory . SetLayoutElement ( transformGroup , minHeight : 25 , flexibleWidth : 9999 ) ;
610
+ UIFactory . SetLayoutElement ( transformGroup , minHeight : 100 , flexibleWidth : 9999 ) ;
611
+ //transformGroup.SetActive(false);
612
+ //var groupRect = transformGroup.GetComponent<RectTransform>();
613
+ //groupRect.anchorMin = new Vector2(0, 1);
614
+ //groupRect.anchorMax = new Vector2(1, 1);
615
+ //groupRect.SetInsetAndSizeFromParentEdge(RectTransform.Edge.Top, 0, 100);
605
616
606
617
PositionControl = AddTransformRow ( transformGroup , "Position:" , TransformType . Position ) ;
607
618
LocalPositionControl = AddTransformRow ( transformGroup , "Local Position:" , TransformType . LocalPosition ) ;
0 commit comments