blob: d0e151048b631851798d53dafb9571d9a740e430 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
using UnityEngine;
using System.Collections;
namespace UnityEngine.UI
{
public interface ILayoutElement
{
#region LayoutGroup的派生类才会实现,其他ILayoutElement比如Image,Text不会实现
// After this method is invoked, layout horizontal input properties should return up-to-date values.
// Children will already have up-to-date layout horizontal inputs when this methods is called.
void CalculateLayoutInputHorizontal();
// After this method is invoked, layout vertical input properties should return up-to-date values.
// Children will already have up-to-date layout vertical inputs when this methods is called.
void CalculateLayoutInputVertical();
#endregion
// Layout horizontal inputs
float minWidth { get; }
float preferredWidth { get; }
float flexibleWidth { get; }
// Layout vertical inputs
float minHeight { get; }
float preferredHeight { get; }
float flexibleHeight { get; }
int layoutPriority { get; }
}
public interface ILayoutController
{
void SetLayoutHorizontal();
void SetLayoutVertical();
}
// An ILayoutGroup component should drive the RectTransforms of its children.
public interface ILayoutGroup : ILayoutController
{
}
// An ILayoutSelfController component should drive its own RectTransform.
public interface ILayoutSelfController : ILayoutController
{
}
// An ILayoutIgnorer component is ignored by the auto-layout system.
public interface ILayoutIgnorer
{
bool ignoreLayout { get; }
}
}
|