本文整理汇总了C#中Rect.BottomCenter方法的典型用法代码示例。如果您正苦于以下问题:C# Rect.BottomCenter方法的具体用法?C# Rect.BottomCenter怎么用?C# Rect.BottomCenter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rect
的用法示例。
在下文中一共展示了Rect.BottomCenter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
void Draw(Rect a) {
GUI.skin = skin;
GUI.skin.FontSize(fontSize);
GUIContent c;
if (tex == null) { c = new GUIContent(message); }
else { c = new GUIContent(message, tex); }
GUIF.Box(a, c);
if (GUIF.Button(a.BottomCenter(.3f, .2f).MoveUp(.1f), "Ok")) {
dismissed = true;
slider.Slide(direction.Flip(), slidePower);
}
GUIF.InvisibleButton(ScreenF.all);
}
示例2: GetArea
public static Rect GetArea(Rect area, Vector2 size, GUIStyle style)
{
Vector2 s = new Vector2(size.x/area.width, size.y/area.height);
switch (style.alignment) {
case TextAnchor.UpperLeft: return area.UpperLeft(s);
case TextAnchor.UpperCenter: return area.UpperCenter(s);
case TextAnchor.UpperRight: return area.UpperRight(s);
case TextAnchor.MiddleLeft: return area.MiddleLeft(s);
case TextAnchor.MiddleCenter: return area.MiddleCenter(s);
case TextAnchor.MiddleRight: return area.MiddleRight(s);
case TextAnchor.LowerLeft: return area.BottomLeft(s);
case TextAnchor.LowerCenter: return area.BottomCenter(s);
case TextAnchor.LowerRight: return area.BottomRight(s);
}
return area;
}